Bug 1014563 (PY3DNF) - Support Python 3 in DNF
Summary: Support Python 3 in DNF
Alias: PY3DNF
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
Depends On: 1014568 1014574
Blocks: F23PYTHON3 1014559 1014597 1024805 1024809
TreeView+ depends on / blocked
Reported: 2013-10-02 10:59 UTC by Miro Hrončok
Modified: 2013-11-24 23:41 UTC (History)
5 users (show)

Fixed In Version: dnf-0.4.8-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-11-24 23:41:42 UTC
Type: Bug

Attachments (Terms of Use)
fix in rpm-python3 in transation.py (1.86 KB, patch)
2013-11-15 08:48 UTC, Honza Silhan
no flags Details | Diff

Description Miro Hrončok 2013-10-02 10:59:51 UTC
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 this package uses Python 3 as default in Fedora 22.

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.

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

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.


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 1 Ales Kozumplik 2013-10-02 11:43:02 UTC
Hi Miroslav,

we are already working on this and should meet Py3 compatibility by F22.


this is what you are already working on. Notice that Miro is offering his help so if there's any issues in porting related components (like python-iniparser), you can talk to him too.

Comment 2 Toshio Ernie Kuratomi 2013-10-02 22:28:25 UTC
noting this for people finding this via web searches.  Since we're the upstream for DNF this won't be applicable 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 3 Honza Silhan 2013-11-11 15:03:43 UTC
Package for Python3 will be called python3-dnf. For testing use "python3 /usr/bin/dnf ...". Right now it doesn't run because of rpm-python3 bug.

Comment 5 Honza Silhan 2013-11-15 08:48:31 UTC
Created attachment 824356 [details]
fix in rpm-python3 in transation.py

Comment 6 Honza Silhan 2013-11-15 08:50:18 UTC
I don't know if you get my mail. I made a pull request here http://lists.rpm.org/pipermail/rpm-maint/2013-October/003635.html and then it continued with private massagess with Panu. We agreed about patch in attachment, but it's still not in upstream.

Comment 7 Fedora Update System 2013-11-21 15:55:35 UTC
dnf-0.4.8-1.fc20 has been submitted as an update for Fedora 20.

Comment 8 Fedora Update System 2013-11-24 04:03:46 UTC
Package dnf-0.4.8-1.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 dnf-0.4.8-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-11-24 23:41:42 UTC
dnf-0.4.8-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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