Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1014549 - Update gdb to Python 3
Summary: Update gdb to Python 3
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-10-02 10:38 UTC by Miro Hrončok
Modified: 2015-02-16 16:16 UTC (History)
9 users (show)

Fixed In Version: gdb-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-16 15:44:49 UTC
Type: Bug

Attachments (Terms of Use)

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.

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:

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.



Comment 7 Jan Kratochvil 2015-02-16 15:44:49 UTC
Just Rawhide is not yet rebuilt due to Koji:
DEBUG    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- is also built now, it was only some temporary Koji issue.

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