Status of my PEP 425 work

(Brett Cannon) #1

Just because it’s a spare-time project and that has been a bit limited during the whole Python governance stuff, I just wanted to say I’m still working on creating a package for PEP 425. The code currently lives at . At this point I have support for:

  1. Python 3
  2. Python 2
  3. PyPy
  4. PyPy3
  5. macOS

I still have to test support for:

  1. Linux
  2. Windows

Once all of this is wrapped up I will try to make @dstufft happy and submit for inclusion into packaging as probably a new packaging.tags module.

Anyway, my key point is that I’m still slowly, actively working on this. :smile:

(Donald Stufft) #2

This will be awesome I think, and hopefully we can move all of the things over to using it instead. I’ll try to find some time to read over your pep425 library.

(Brett Cannon) #3

Thanks! The API is done from my perspective. I tried to keep it small to start but also to include anything I know I/people will need (e.g. parsing wheel file names).

(Brett Cannon) #4

A post was split to a new topic: PEP mention looks like a link but doesn’t go anywhere

(Pradyun Gedam) #5

Awesome news! Thanks for this status update. ^.^

A couple of libc-related notes:

  • pip currently includes the installed libc version in the User Agent; IIUC, this is useful information to pass to linehaul. I think this should also be exposed via the API of this code, in some form.

    I’m not 100% sure that function belongs to the future packaging.tags (it’s not really a “tag”) but I can’t really think of a good place for it. I’ll defer to @dstufft and @brettcannon on where this can go/what it looks like.

  • It’d probably be useful to include context on why the code directly interfaces with libc, via ctypes, instead of using platform.libc_ver (along the lines of an existing comment in pip)

As a note to self, whenever we do switch, the note about pip < 8.1.2 libc versions being useless should probably be preserved in some discoverable place within pip itself; likely as a comment within the function that creates the user agent.

(Brett Cannon) #6

If pip is needing the information as well then maybe it can be made into a hidden function? Otherwise we can talk it over once the code is merged and figure out where it needs to exist.

Maybe, but that’s a question for the manylinux PEP authors since I just copied the code over blindly. :smile:

(Brett Cannon) #7

FYI the code is now working on Linux, macOS, and Windows. I’ll start drafting a PR with at least the skeleton of docs to help discuss the API.

(Brett Cannon) #8

PR is now up!