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 bugzilla.redhat.com.
Bug 1314043 - dnsyo: Switch to Python 3
Summary: dnsyo: Switch to Python 3
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnsyo
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rick Elrod
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PY3PATCH-AVAILABLE
TreeView+ depends on / blocked
 
Reported: 2016-03-02 19:22 UTC by Tomas Orsava
Modified: 2019-03-19 14:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-19 14:12:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
pure python3 spec patch (deleted)
2016-08-17 04:23 UTC, J. Randall Owens
no flags Details | Diff

Description Tomas Orsava 2016-03-02 19:22:11 UTC
Upstream, this software supports Python 3. Please provide a Python 3
package for Fedora.


According to the Python packaging guidelines [0], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [1].

Since users aren't expected to import this tool from Python code,
you can just switch to /usr/bin/python3. Alternatively, if you want or
need to keep a Python 2 version, the current best practice is to provide
subpackages -- this is called "Common SRPM" in the guidelines.

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 24 as well.


If anything is unclear, or if you need any kind of assistance with the
porting, you can ask on IRC (#fedora-python on Freenode), or reply here.
We'll be happy to help!


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

Comment 1 Dominika Krejčí 2016-04-22 14:57:43 UTC
Hello Ricky,

Do you need any help adding Python 3 support to the RPM?

If you need more instructions, a [guide] for porting Python-based RPMs is available.

[guide] http://python-rpm-porting.readthedocs.org/en/latest/index.html

Comment 2 Jan Kurik 2016-07-26 04:58:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 3 J. Randall Owens 2016-08-17 04:23:16 UTC
Created attachment 1191466 [details]
pure python3 spec patch

The new koji build 2.0.7-1.fc26 Requires all the python2 and python3 stuff to install, and includes both dnsyo (for python2) and python3-dnsyo. Is this what we want? I'd think we'd want either just python3 in this one, or separate python2 & python3 subpackages, from vague impressions I've gotten of the packages I've installed and updated. But python certainly isn't my thing, much less the multiversioning of it, so I could be very wrong. If you do want just the python3, though, here's a spec patch for that (not that it isn't obvious & simple, if this were one's goal).

Comment 4 J. Randall Owens 2016-08-17 04:43:35 UTC
After a quick scan of https://fedoraproject.org/wiki/Packaging:Python , it looks like the following apply to building python packages:

"Must: If you build for more than one python runtime you must use the %python_provide macro.
"Must: If you build for a single python runtime you must add %python_provide python-$module so that the current default python is provided from the unversioned python package."

And the %python_provide is what give you the python2-foo & python3-foo provides for the subpackages. I think the page just kind of assumes that it's obvious you have to provide subpackages, to the point that they don't even come right out and say so. Or maybe I'm reading too much into it.

Anyway, it looks as though yes, it should either be python3-only 'dnsyo', or build two subpackages, 'python2-dnsyo' & 'python3-dnsyo'.

Comment 5 Petr Viktorin (pviktori) 2016-08-17 11:33:15 UTC
Hello,
The general idea is:
- If the package has a Python library that people can import from their code, it's better to include both the Python2 and the Python3 version. That way people aren't forced to switch to py3 immediately, but have some transition period.
- If the package is just used for the script in /usr/bin, you can just switch it to py3 entirely.

The Reviewer checklist in the guidelines is targetting libraries (without saying so – that's a bug in the guidelines – sorry!)

Comment 6 Rick Elrod 2016-08-17 20:55:56 UTC
(In reply to Petr Viktorin from comment #5)
> - If the package is just used for the script in /usr/bin, you can just
> switch it to py3 entirely.

I suppose I can do that, but then I have to maintain two separate specfiles for the epel vs fedora branches, right? So it might be easier to just keep both in the specfile for now so it can keep being shared/merged cleanly between the branches.

I'll take a closer look at this later tonight.

Comment 7 Dominika Krejčí 2016-10-05 15:17:48 UTC
Hello Ricky, how is it going? Do you need some help?

Comment 8 Iryna Shcherbina 2017-11-10 15:28:43 UTC
Hi Ricky,

dnsyo still requires both Python stacks:

$ dnf repoquery --disablerepo=* --enablerepo=rawhide --requires dnsyo
/usr/bin/python
/usr/bin/python3
PyYAML
python(abi) = 2.7
python(abi) = 3.6
python-dns
python-requests
python3-PyYAML
python3-dns
python3-requests


I have prepared a Pagure PR to switch dnsyo to Python 3 in Fedora only:

https://src.fedoraproject.org/rpms/dnsyo/pull-request/1

I would ask you to have a look at it and comment or merge at will. Details and scratch builds are in the PR description.

Comment 9 Fedora End Of Life 2017-11-16 19:38:54 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 10 J. Randall Owens 2017-11-16 22:14:14 UTC
dnsyo-2.0.7-4.fc27.noarch still requires both python(abi) 2.7 & 3.6, /usr/bin/python & /usr/bin/python3, etc.

Comment 11 Ben Cotton 2018-11-27 17:17:05 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 J. Randall Owens 2018-11-27 20:19:56 UTC
Persists in F29.

Comment 13 Miro Hrončok 2019-03-05 13:44:07 UTC
This was retired. But not on F29, so keeping it open.

Comment 14 Petr Viktorin (pviktori) 2019-03-19 14:12:05 UTC
If this isn't fixed in F29, there's no harm.


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