aio-libs / propcache

Fast property caching
Apache License 2.0
11 stars 3 forks source link

Fix importing the C extensions on Python 3.8 #26

Closed bdraco closed 1 month ago

bdraco commented 1 month ago

What do these changes do?

GenericAlias is not available on python 3.8, and the c-ext tried to import it so it would fallback to the pure-python version silently.

Are there changes in behavior for the user?

bugfix

bdraco commented 1 month ago
(venv) bdraco@MacBook-Pro-5 propcache % python3.8 -m pip install ./propcache-1.0.0-cp38-cp38-macosx_14_0_arm64.whl
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Processing ./propcache-1.0.0-cp38-cp38-macosx_14_0_arm64.whl
Installing collected packages: propcache
  Attempting uninstall: propcache
    Found existing installation: propcache 1.0.0.dev0
    Uninstalling propcache-1.0.0.dev0:
      Successfully uninstalled propcache-1.0.0.dev0
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed propcache-1.0.0
(venv) bdraco@MacBook-Pro-5 propcache % python3.8 
Python 3.8.19 (default, Mar 19 2024, 16:05:24) 
[Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from propcache.api import cached_property
>>> cached_property
<class 'propcache._helpers_c.cached_property'>
>>> 
(venv) bdraco@MacBook-Pro-5 propcache %