Bug 1014549

Summary: Update gdb to Python 3
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: a.badger, bkabrda, gbenson, jan.kratochvil, palves, patrickm, pmuldoon, redhat-bugzilla, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-7.8.90.20150214-7.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 15:44:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1014209, 1024796    

Description Miro Hrončok 2013-10-02 10:38:54 UTC
Congratulations! Your package has been chosen as a MUST to be updated to Python 3 :)

The goal here is, that this package uses Python 3 as default in Fedora 22.

And how to do it? Follows those easy steps:

1. Check if upstream already support Python 3, if yes, use it
2. If upstream doesn't support Python 3 yet, encourage it to do so by sending patches and offering your help, then go to 1.

If you end up in infinite loop, there's something broken. I.e. upstream is dead or unwilling to support Python 3. In that case, 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.

Once Python 3 is supported, check your package, if it works with it. If you don't want to switch to Python 3 yet as a default (that's still against guidelines), I recommend to prepare your spec and conditionalize the thing with something like %global default_python 2.

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

And, of course, if you need help, that's why I am here :)

(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 1 Jan Kratochvil 2013-10-02 10:43:28 UTC
Upstream GDB should support Python 3, Rawhide is still for F-21 so there is currently nothing to do.

Comment 2 Miro Hrončok 2013-10-02 11:41:36 UTC
Agreed. I opened this sooner, in case you want to prepare for the update before rawhide becomes F22. Otherwise, just let it be until then.

Thanks for fast reply.

Comment 3 Tom Tromey 2013-10-02 14:47:02 UTC
It's worth noting that if gdb switches, then any pretty-printers
or other gdb plugins must also be updated.
Pretty printers appear in Python itself (including Python 2.x),
glib, gcc, mono, and others.
For gdb plugins I only know of gdb-heap.
Our team will most likely handle gcc, but the other packages
haven't historically been our purview.

Comment 4 Toshio Ernie Kuratomi 2013-10-02 22:30:28 UTC
Noting this for people who might run across this via web searches; since we're fixing this via an upstream update this shouldn't be an issue here:

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 5 Tom Tromey 2013-10-30 13:20:20 UTC
FWIW there's already a port of the libstdc++ printers to Python 3:

http://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-4.8/debian/patches/libstdc%2B%2B-python3.diff?revision=6978&view=markup

Doko said he'll send the patch upstream when it is ready.

Comment 6 Bohuslav "Slavek" Kabrda 2015-01-28 15:24:57 UTC
Hi, since we're nearing Fedora 22 alpha and packages should now be preferably built with Python 3 [1], I'd like to ask you to rebuild gdb with Python 3.

Thanks.

[1] https://fedoraproject.org/wiki/Packaging:Python#Guidelines

Comment 7 Jan Kratochvil 2015-02-16 15:44:49 UTC
Just Rawhide is not yet rebuilt due to Koji:
DEBUG util.py:389:    4:texlive-cm-super-svn15878.0-6.fc22.noarch: [Errno 256] No more mirrors to try.

Comment 8 Jan Kratochvil 2015-02-16 16:16:57 UTC
gdb-7.8.90.20150214-7.fc23 is also built now, it was only some temporary Koji issue.