Bug 963839 - newt: Add support for Python 3
newt: Add support for Python 3
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: newt (Show other bugs)
rawhide
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 984907
  Show dependency treegraph
 
Reported: 2013-05-16 12:40 EDT by Keith Hughitt
Modified: 2014-11-08 18:57 EST (History)
4 users (show)

See Also:
Fixed In Version: newt-0.52.16-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 22:43:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Keith Hughitt 2013-05-16 12:40:08 EDT
It seems like the snack interface to libnewt is currently capable of supporting Python 3 (e.g. https://launchpad.net/ubuntu/raring/i386/python3-newt), however, at the moment, there are some python2-specific entries hard-coded into the configuration, making this difficult to achieve.

Would it be possible to add native python3 support?
Comment 1 Fedora End Of Life 2013-09-16 09:56:59 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 2 Miro Hrončok 2013-10-01 10:29:26 EDT
If you need any extra hand with this, feel free to use me :)
Comment 3 Miro Hrončok 2013-10-02 07:35:14 EDT
Hi, we would like to use Python 3 on the default installation instead of Python 2 on Fedora 22.

From that perspective, your package is considered as IMPORTANT - that means, is has to be updated to Python 3, for our intention come true.

The goal here is, that at least for F22 you should provide python3 subpackage.

Please, help use update to Python 3 flawlessly.

Check if upstream already support Python 3, if yes, use it and add te support to the package.

If upstream doesn't support Python 3 yet, encourage it to do so by sending patches and offering your help.

When upstream is dead or unwilling to support Python 3, you'll need to patch this package on Fedora level. Try to avoid this as much as you can, but use it, if it's the last option.

Chances are, that you ARE the upstream. In that case, everything is easier, just do it yourself.

There is a table on wiki, that should list your package. Chances are, that you can see an upstream link that covers the problem. Anyway, please update the table with information you know.

https://fedoraproject.org/wiki/User:Churchyard/python3

I offer my help with this task, so if you have no idea, how to work on this, or it is just not your priority, don't hesitate to ask for help.

(As you've already realized, this is a bulk text, so if something is not quite exact about your package, sorry for that, just ask)
Comment 4 Keith Hughitt 2013-10-02 09:20:46 EDT
Hello,

As far as I can tell, this *is* upstream :)

https://fedorahosted.org/newt/
Comment 5 Toshio Ernie Kuratomi 2013-10-02 18:45:00 EDT
Note: do not follow this portion of the advice as it is against the Packaging Guidelines: "When upstream is dead or unwilling to support Python 3, you'll need to patch this package on Fedora level. Try to avoid this as much as you can, but use it, if it's the last option."

If you are in this situation, you'll essentially be forking upstream in order to produce a python3 port.  In that situation, the proper thing to do is to create a new package with the python3 port.  It would be even better to create the proper upstream infrastructure as well (new upstream scm and issue tracker) but that isn't 100% required by the guidelines.
Comment 6 Miroslav Lichvar 2013-10-03 04:27:20 EDT
Yes, I'm the upstream maintainer and I'll be happy to include patches adding support for Python 3. I don't have much time to work on it now.
Comment 7 Miro Hrončok 2013-10-15 10:35:00 EDT
Working on it.
Comment 8 Miro Hrončok 2013-10-16 07:31:56 EDT
OK, so the patch from Debian is working, except in Python 3 _snackmodule.so should be renamed in _snack.so.

The patch itself: http://churchyard.fedorapeople.org/newt-python3.patch
Updated spec (uses the patch): http://churchyard.fedorapeople.org/newt.spec

The spec now applies the patch and renames the .so module. The patch should be merged upstream and the renaming should be done in build mechanism (autotools), rather than in spec.

After the patch, I've tested the examples in Python 2.6 (on CentOS 6.4), Python 2.7 an 3.3 (on Fedora 19).

Assigning this back to you, so you can merge this upstream.
Comment 9 Miro Hrončok 2013-10-17 06:08:47 EDT
Ah, renaming _snackmodule.so to _snack.so also works with Python 2.7 and 2.6, so you don't need any extra condition in autotools.

So you can merge this and just change the filename of the compiled library in Makefile.in
Comment 10 Miroslav Lichvar 2013-10-17 12:17:24 EDT
The patches are now with some minor modifications in the upstream git. In Fedora, the support is included in newt-0.52.16-2.fc20.

Miro, thanks for preparing the patches. Thanks to Matthias Klose for the original patch.
Comment 11 Fedora Update System 2013-10-17 12:19:42 EDT
newt-0.52.16-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/newt-0.52.16-2.fc20
Comment 12 Fedora Update System 2013-10-17 16:32:11 EDT
Package newt-0.52.16-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing newt-0.52.16-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19204/newt-0.52.16-2.fc20
then log in and leave karma (feedback).
Comment 13 Fedora Update System 2013-12-13 22:43:28 EST
newt-0.52.16-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Keith Hughitt 2013-12-14 07:06:21 EST
Great. Thanks for tackling this!

Note You need to log in before you can comment on or make changes to this bug.