Skip to content

Use plain "abi3" where supported in pep425tags.get_supported #7327

@chrahunt

Description

@chrahunt

What's the problem this feature will solve?

Currently we calculate stable ABI tags dynamically, when it could be static.

Recall that wheel filenames look like:

...-{python tag}-{abi tag}-{platform tag}.whl

The {abi tag} is defined in PEP 425. One specific ABI tag called out is "abi3", which is defined as "the CPython stable ABI".

Instead of just using "abi3", to get the list of stable ABIs in pep425tags.get_supported() we use this:

    for suffix in get_extension_suffixes():
        if suffix.startswith('.abi'):
            abi3s.add(suffix.split('.', 2)[1])

This seems like an attempt to apply PEP 3149 to wheel ABI tags, but seems like overkill given the only defined stable ABI is "abi3".

It would be simpler to integrate with the current packaging.tags if we just assume "abi3" is the only possible value and is available only on CPython 3.2+.

Describe the solution you'd like

if sys.implementation.name == "cpython" and sys.version_info >= (3, 2):
    abi3s.add("abi3")

or something simpler since this will only ever be the single value.

Alternative Solutions

  • Keep the current behavior and make a change in packaging.tags to support multiple user-specified stable ABIs (or to divine them in the same way we do above), and
  • Update the relevant PEPs to be more clear

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationstate: needs discussionThis needs some more discussion

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions