Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mounting wheels with extensions that use the limited C API #225

Closed
stewartmiles opened this issue Sep 20, 2024 · 0 comments · Fixed by #228
Closed

Support mounting wheels with extensions that use the limited C API #225

stewartmiles opened this issue Sep 20, 2024 · 0 comments · Fixed by #228

Comments

@stewartmiles
Copy link
Contributor

Describe the bug
At the moment wheels advertising support for abi3 https://docs.python.org/3/c-api/stable.html#limited-c-api are reported as incompatible with versions of Python 3.x that are indeed compatible.

To Reproduce

  • Using a version of Python after 3.2, build a wheel that supports abi3, you can just rename the wheel file to change the ABI field in the filename to abi3.
  • With a version of Python 3 that doesn't exactly match the version encoded in the wheel filename. e.g cp37 after building a wheel for cp310, use Wheel(path_to_the_test_wheel).is_compatible() and notice that it returns False when it should be compatible given that it uses an ABI that is compatible from version Python 3.2.

Expected behavior
Wheel.is_compatible() should return True for all versions of Python above the version advertised by the wheel.

Screenshots
N/A

Environment

  • OS: Tested on Linux (Ubuntu 20.04)
  • Version of this library: 0.3.8

Additional information
N/A

stewartmiles added a commit to stewartmiles/distlib that referenced this issue Sep 20, 2024
https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes pypa#225
stewartmiles added a commit to stewartmiles/distlib that referenced this issue Sep 20, 2024
https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes pypa#225
stewartmiles added a commit to stewartmiles/distlib that referenced this issue Sep 20, 2024
https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes pypa#225
stewartmiles added a commit to stewartmiles/distlib that referenced this issue Sep 20, 2024
https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes pypa#225
stewartmiles added a commit to stewartmiles/distlib that referenced this issue Sep 20, 2024
https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes pypa#225
stewartmiles added a commit to stewartmiles/distlib that referenced this issue Sep 23, 2024
https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes pypa#225
vsajip pushed a commit that referenced this issue Oct 7, 2024
* Add support for wheel compatibility with the limited API.

https://docs.python.org/3/c-api/stable.html#limited-c-api
> Python 3.2 introduced the Limited API, a subset of Python’s C API.
> Extensions that only use the Limited API can be compiled once and
> work with multiple versions of Python Python 3.2

This adds `abi3` to the list of compatible ABIs for all versions
of Python beyond 3.2.

Fixes #225

* Add missing import for test_wheel.py

* Unconditionally add limited ABI support to each version.

On Windows imp.get_suffixes() doesn't return the limited ABI
as supported even though - when carefully building an extension -
it is (see the discussion on pypa/pip#4445).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant