#686 Avoid using names with `python-` prefix in requires for Python packages
Closed: accepted 2 years ago Opened 2 years ago by ishcherb.

Link to the draft

https://fedoraproject.org/wiki/User:Ishcherb/Requires

Link to diff

https://fedoraproject.org/w/index.php?title=User%3AIshcherb%2FRequires&diff=492940&oldid=492907

Explanation

The Python packaging guidelines should encourage packagers to use a versioned Python prefix in requirements' names where available. This is needed to avoid a range of potential issues when the switch to Python 3 happens and a python- prefix in a package name means a Python 3 version of the package.

This also adds to the problem described in #685.


I 100% agree with the sentiment, and the diff is fine with me. So I'll toss in my +1. I had typed this before the meeting time and never submitted it, but we ended up not having a meeting today in any case.

I will add the caveat that this doesn't interact well with EPEL, and that maybe we should just consider mentioning %python3_version to avoid confusion.

Some meta stuff:

First off, do we really intend for the unversioned "python-foo" to give you the python3 version of that package? That seems a recipe for pain but I guess for end user sanity it has to give you something and so we might as well save people from having to type the extra digit to ensure they get python3 stuff.

I want to make sure the guidelines are prepared for that kind of big change, as well as a change in what /usr/bin/python means if things ever get to that point. We need to make sure we're doing the following:

  • Ban any use of build-time or run-time dependencies on python-* packages. (Barring the exception until everything is fixed.) That's what this ticket is about.
  • Ban any use of env python. There's no mention of 'env' in any of our guidelines, and system-installed software shouldn't break if I do ln /bin/false ~/bin/python. Though this should be a general guideline, because that goes for anything that's installed. It's also a security issue.
  • Ban any use of /usr/bin/python, at least in #! lines. The specific python version must be used. This is currently a "should" in the guidelines, and we should update it to a "must". I suspect that someone in the python SIG is already checking for these but I'm not sure.

Metadata Update from @tibbs:
- Issue tagged with: meeting

2 years ago

First off, do we really intend for the unversioned "python-foo" to give you the python3 version of that package?

We do, and that is what %python_provide macro was intended for. When needed, it will be enough to only modify the macro to make Python 3 subpackages provide python- prefixed names.

With the rest of the items mentioned I fully agree.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2017-06-01/fpc.2017-06-01-16.00.txt):

  • 686 Avoid using names with python- prefix in requires (geppetto,
    16:06:48)
  • ACTION: Avoid using names with python- prefix in requires for
    Python packages (+1:5, 0:0, -1:0) (geppetto, 16:14:06)

Metadata Update from @james:
- Issue untagged with: meeting
- Issue tagged with: writeup

2 years ago

Announcement text:

The python guidelines were updated to mention that "python-" MUST NOT be used in dependencies unless the proper "python2-" or "python3-" packages do not exist.

Metadata Update from @tibbs:
- Issue untagged with: writeup
- Issue assigned to tibbs
- Issue tagged with: announce

2 years ago

Metadata Update from @tibbs:
- Issue untagged with: announce
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata