On 05. 10. 21 8:59, Nick Coghlan wrote:
On Tue, 28 Sep 2021, 6:55 am Brett Cannon, <br...@python.org <mailto:br...@python.org>> wrote:



    On Sun, Sep 26, 2021 at 3:51 AM Phil Thompson via Python-Dev
    <python-dev@python.org <mailto:python-dev@python.org>> wrote:


        However the stable ABI is still a second class citizen as it is
        still
        not possible (AFAIK) to specify a wheel name that doesn't need to
        explicitly include each supported Python version (rather than a
        minimum
        stable ABI version).


    Actually you can do this. The list of compatible wheels for a
    platform starts at CPython 3.2 when the stable ABI was introduced
    and goes forward to the version of Python you are running. So you
    can build a wheel file that targets the oldest version of CPython
    that you are targeting and its version of the stable ABI and it is
    considered forward compatible. See `python -m pip debug --verbose`
    for the complete list of wheel tags that are supported for an
    interpreter.


I think Phil's point is a build side one: as far as I know, the process for getting one of those more generic file names is still to build a wheel with an overly precise name for the stable ABI declarations used, and then rename it.

The correspondence between "I used these stable ABI declarations in my module build" and "I can use this more broadly accepted wheel name" is currently obscure enough that I couldn't tell you off the top of my head how to do it, and I contributed to the design of both sides of the equation.

Actually improving the build ergonomics would be hard (and outside CPython's own scope), but offering a table in the stable ABI docs giving suggested wheel tags for different stable ABI declarations should be feasible, and would be useful to both folks renaming already built wheels and anyone working on improving the build automation tools.


Indeed, thinking about proper wheel tags, and adding support for them in both pip/installer and setuptools/build/poetry/etc., would be a very helpful way to contribute to the stable ABI.
I don't think I will be able to get to this any time soon.

The current `abi3` tag doesn't encode the minimum ABI version. AFAIK that info should go in the "Requires-Python" wheel metadata, but there's not automation or clear guides for that. Putting it in the wheel tag might be a good idea.

There are vague ideas floating around about removing old stable ABI features (hopefully after they're deprecated for 5-10 years); if there's a new wheel tag scheme it should be made with that possibility in mind.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WSAF6H4P2GDORL6KOU6ZIBVUITDYAIBA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to