[Python-ideas] bdist naming scheme (compatibility tags) PEP

Daniel Holth dholth at gmail.com
Sun Sep 9 05:41:43 CEST 2012

Re: http://www.python.org/dev/peps/pep-0425/ "Compatibility tags for
built distributions"

Progress towards a proper set of rules for generating the tags a
Python implementation is likely to support.

This system of being willing to install older built distributions is
intended to solve the frustrating problem with eggs that you would
have to build a new egg for each Python release, even for a
pure-Python egg that probably runs fine on a newer Python.

In order of preference the tags are:

- built for the current implementation and its preferred ABI and architecture
- for the current implementation and tagged with just the major
version number (explicitly tagged as cross-version compatible)
- for the current implementation, and any of the lesser minor
revisions (cp26..cp20)

- for the current language version (py27)
- for the current language major version (py2)
- for any of the current language minor versions (py26..py20)

Importantly "py2" means "expected to work across minor releases" and
is not shorthand for "py20". Practically it means the packager
overrode the default tag.

For PyPy, I think "pp19" for the current version makes more sense than
"pp27" since they add important runtime features without changing the
version of the Python language they support (like stackless
emulation). I don't know how their versions will work when PyPy for
Python 3 is released. Other Python implementations seem to follow the
CPython version numbers more closely.

For PyPy it may be appropriate to cross major versions when going back
to generate the list of older packages one is willing to install. For
CPython it is a bit overkill to go all the way back to Python 2.0; the
"all the way back to the last major revision" rule is really for the 2
- 3 split.

List of supported or "willing to install" tags for CPython 3.2 (an mu build):

[('cp32', 'cp32mu', 'linux_x86_64'),
 ('cp3', 'none', 'any'),
 ('cp31', 'none', 'any'),
 ('cp30', 'none', 'any'),
 ('py32', 'none', 'any'),
 ('py3', 'none', 'any'),
 ('py31', 'none', 'any'),
 ('py30', 'none', 'any')]

For CPython 2.7:

[('cp27', 'none', 'linux_x86_64'),
 ('cp2', 'none', 'any'),
 ('cp26', 'none', 'any'),
 ('cp25', 'none', 'any'),
 ('cp24', 'none', 'any'),
 ('cp23', 'none', 'any'),
 ('cp22', 'none', 'any'),
 ('cp21', 'none', 'any'),
 ('cp20', 'none', 'any'),
 ('py27', 'none', 'any'),
 ('py2', 'none', 'any'),
 ('py26', 'none', 'any'),
 ('py25', 'none', 'any'),
 ('py24', 'none', 'any'),
 ('py23', 'none', 'any'),
 ('py22', 'none', 'any'),
 ('py21', 'none', 'any'),
 ('py20', 'none', 'any')]

More information about the Python-ideas mailing list