Bug 1014549 - Update gdb to Python 3
Update gdb to Python 3
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks: PY3PACKAGER F23PYTHON3
  Show dependency treegraph
 
Reported: 2013-10-02 06:38 EDT by Miro Hrončok
Modified: 2015-02-16 11:16 EST (History)
9 users (show)

See Also:
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 10:44:49 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 Miro Hrončok 2013-10-02 06:38:54 EDT
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 06:43:28 EDT
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 07:41:36 EDT
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 10:47:02 EDT
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 18:30:28 EDT
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 09:20:20 EDT
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 10:24:57 EST
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 10:44:49 EST
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 11:16:57 EST
gdb-7.8.90.20150214-7.fc23 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.