propcache 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {propcache-0.2.0 → propcache-0.3.0}/.coveragerc +9 -7
  2. propcache-0.3.0/CHANGES.rst +180 -0
  3. {propcache-0.2.0/src/propcache.egg-info → propcache-0.3.0}/PKG-INFO +91 -5
  4. {propcache-0.2.0 → propcache-0.3.0}/README.rst +1 -1
  5. {propcache-0.2.0 → propcache-0.3.0}/docs/spelling_wordlist.txt +1 -0
  6. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/_backend.py +10 -13
  7. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/_cython_configuration.py +2 -5
  8. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/hooks.py +2 -2
  9. {propcache-0.2.0 → propcache-0.3.0}/pyproject.toml +13 -0
  10. {propcache-0.2.0 → propcache-0.3.0}/pytest.ini +5 -4
  11. propcache-0.3.0/requirements/codspeed.txt +2 -0
  12. propcache-0.3.0/requirements/cython-freethreading.txt +1 -0
  13. propcache-0.3.0/requirements/cython.txt +1 -0
  14. {propcache-0.2.0 → propcache-0.3.0}/requirements/dev.txt +1 -1
  15. propcache-0.3.0/requirements/doc-spelling.txt +2 -0
  16. {propcache-0.2.0 → propcache-0.3.0}/requirements/doc.txt +1 -1
  17. propcache-0.3.0/requirements/lint.txt +1 -0
  18. propcache-0.3.0/requirements/test-freethreading.txt +2 -0
  19. propcache-0.2.0/requirements/test.txt → propcache-0.3.0/requirements/test-pure.txt +1 -2
  20. propcache-0.3.0/requirements/test.txt +2 -0
  21. {propcache-0.2.0 → propcache-0.3.0}/setup.cfg +1 -2
  22. {propcache-0.2.0 → propcache-0.3.0}/src/propcache/__init__.py +3 -3
  23. {propcache-0.2.0 → propcache-0.3.0}/src/propcache/_helpers_c.pyx +8 -16
  24. {propcache-0.2.0 → propcache-0.3.0}/src/propcache/_helpers_py.py +5 -20
  25. {propcache-0.2.0 → propcache-0.3.0/src/propcache.egg-info}/PKG-INFO +91 -5
  26. {propcache-0.2.0 → propcache-0.3.0}/src/propcache.egg-info/SOURCES.txt +5 -0
  27. {propcache-0.2.0 → propcache-0.3.0}/tests/conftest.py +4 -22
  28. propcache-0.3.0/tests/test_benchmarks.py +92 -0
  29. {propcache-0.2.0 → propcache-0.3.0}/tests/test_cached_property.py +18 -2
  30. {propcache-0.2.0 → propcache-0.3.0}/tests/test_under_cached_property.py +23 -6
  31. propcache-0.2.0/CHANGES.rst +0 -93
  32. propcache-0.2.0/requirements/cython.txt +0 -1
  33. propcache-0.2.0/requirements/doc-spelling.txt +0 -2
  34. propcache-0.2.0/requirements/lint.txt +0 -1
  35. {propcache-0.2.0 → propcache-0.3.0}/CHANGES/.TEMPLATE.rst +0 -0
  36. {propcache-0.2.0 → propcache-0.3.0}/CHANGES/.gitignore +0 -0
  37. {propcache-0.2.0 → propcache-0.3.0}/CHANGES/README.rst +0 -0
  38. {propcache-0.2.0 → propcache-0.3.0}/LICENSE +0 -0
  39. {propcache-0.2.0 → propcache-0.3.0}/MANIFEST.in +0 -0
  40. {propcache-0.2.0 → propcache-0.3.0}/NOTICE +0 -0
  41. {propcache-0.2.0 → propcache-0.3.0}/docs/Makefile +0 -0
  42. {propcache-0.2.0 → propcache-0.3.0}/docs/_static/README.txt +0 -0
  43. {propcache-0.2.0 → propcache-0.3.0}/docs/api.rst +0 -0
  44. {propcache-0.2.0 → propcache-0.3.0}/docs/changes.rst +0 -0
  45. {propcache-0.2.0 → propcache-0.3.0}/docs/conf.py +0 -0
  46. {propcache-0.2.0 → propcache-0.3.0}/docs/contributing/guidelines.rst +0 -0
  47. {propcache-0.2.0 → propcache-0.3.0}/docs/contributing/release_guide.rst +0 -0
  48. {propcache-0.2.0 → propcache-0.3.0}/docs/index.rst +0 -0
  49. {propcache-0.2.0 → propcache-0.3.0}/docs/make.bat +0 -0
  50. {propcache-0.2.0 → propcache-0.3.0}/packaging/README.md +0 -0
  51. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/__init__.py +0 -0
  52. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/__main__.py +0 -0
  53. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/_compat.py +0 -0
  54. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/_transformers.py +0 -0
  55. {propcache-0.2.0 → propcache-0.3.0}/packaging/pep517_backend/cli.py +0 -0
  56. {propcache-0.2.0 → propcache-0.3.0}/requirements/towncrier.txt +0 -0
  57. {propcache-0.2.0 → propcache-0.3.0}/src/propcache/_helpers.py +0 -0
  58. {propcache-0.2.0 → propcache-0.3.0}/src/propcache/api.py +0 -0
  59. {propcache-0.2.0 → propcache-0.3.0}/src/propcache/py.typed +0 -0
  60. {propcache-0.2.0 → propcache-0.3.0}/src/propcache.egg-info/dependency_links.txt +0 -0
  61. {propcache-0.2.0 → propcache-0.3.0}/src/propcache.egg-info/not-zip-safe +0 -0
  62. {propcache-0.2.0 → propcache-0.3.0}/src/propcache.egg-info/top_level.txt +0 -0
  63. {propcache-0.2.0 → propcache-0.3.0}/tests/test_api.py +0 -0
  64. {propcache-0.2.0 → propcache-0.3.0}/tests/test_init.py +0 -0
  65. {propcache-0.2.0 → propcache-0.3.0}/towncrier.toml +0 -0
@@ -3,20 +3,22 @@ show_contexts = true
3
3
  skip_covered = false
4
4
 
5
5
  [paths]
6
- source =
7
- src/propcache
8
- */lib/pypy*/site-packages/propcache
9
- */lib/python*/site-packages/propcache
10
- */Lib/site-packages/propcache
6
+ _site-packages-to-src-mapping =
7
+ src
8
+ */src
9
+ *\src
10
+ */lib/pypy*/site-packages
11
+ */lib/python*/site-packages
12
+ *\Lib\site-packages
11
13
 
12
14
  [report]
15
+ exclude_also =
16
+ ^\s*@pytest\.mark\.xfail
13
17
  # small library, don't fail when running without C-extension
14
18
  fail_under = 50.00
15
19
  skip_covered = true
16
20
  skip_empty = true
17
21
  show_missing = true
18
- exclude_also =
19
- ^\s*@pytest\.mark\.xfail
20
22
 
21
23
  [run]
22
24
  branch = true
@@ -0,0 +1,180 @@
1
+ =========
2
+ Changelog
3
+ =========
4
+
5
+ ..
6
+ You should *NOT* be adding new change log entries to this file, this
7
+ file is managed by towncrier. You *may* edit previous change logs to
8
+ fix problems like typo corrections or such.
9
+ To add a new change log entry, please see
10
+ https://pip.pypa.io/en/latest/development/#adding-a-news-entry
11
+ we named the news folder "changes".
12
+
13
+ WARNING: Don't drop the next directive!
14
+
15
+ .. towncrier release notes start
16
+
17
+ 0.3.0
18
+ =====
19
+
20
+ *(2025-02-20)*
21
+
22
+
23
+ Features
24
+ --------
25
+
26
+ - Implemented support for the free-threaded build of CPython 3.13 -- by :user:`lysnikolaou`.
27
+
28
+ *Related issues and pull requests on GitHub:*
29
+ :issue:`84`.
30
+
31
+
32
+ Packaging updates and notes for downstreams
33
+ -------------------------------------------
34
+
35
+ - Started building wheels for the free-threaded build of CPython 3.13 -- by :user:`lysnikolaou`.
36
+
37
+ *Related issues and pull requests on GitHub:*
38
+ :issue:`84`.
39
+
40
+
41
+ Contributor-facing changes
42
+ --------------------------
43
+
44
+ - GitHub Actions CI/CD is now configured to manage caching pip-ecosystem
45
+ dependencies using `re-actors/cache-python-deps`_ -- an action by
46
+ :user:`webknjaz` that takes into account ABI stability and the exact
47
+ version of Python runtime.
48
+
49
+ .. _`re-actors/cache-python-deps`:
50
+ https://github.com/marketplace/actions/cache-python-deps
51
+
52
+ *Related issues and pull requests on GitHub:*
53
+ :issue:`93`.
54
+
55
+
56
+ ----
57
+
58
+
59
+ 0.2.1
60
+ =====
61
+
62
+ *(2024-12-01)*
63
+
64
+
65
+ Bug fixes
66
+ ---------
67
+
68
+ - Stopped implicitly allowing the use of Cython pre-release versions when
69
+ building the distribution package -- by :user:`ajsanchezsanz` and
70
+ :user:`markgreene74`.
71
+
72
+ *Related commits on GitHub:*
73
+ :commit:`64df0a6`.
74
+
75
+ - Fixed ``wrapped`` and ``func`` not being accessible in the Cython versions of :func:`propcache.api.cached_property` and :func:`propcache.api.under_cached_property` decorators -- by :user:`bdraco`.
76
+
77
+ *Related issues and pull requests on GitHub:*
78
+ :issue:`72`.
79
+
80
+
81
+ Removals and backward incompatible breaking changes
82
+ ---------------------------------------------------
83
+
84
+ - Removed support for Python 3.8 as it has reached end of life -- by :user:`bdraco`.
85
+
86
+ *Related issues and pull requests on GitHub:*
87
+ :issue:`57`.
88
+
89
+
90
+ Packaging updates and notes for downstreams
91
+ -------------------------------------------
92
+
93
+ - Stopped implicitly allowing the use of Cython pre-release versions when
94
+ building the distribution package -- by :user:`ajsanchezsanz` and
95
+ :user:`markgreene74`.
96
+
97
+ *Related commits on GitHub:*
98
+ :commit:`64df0a6`.
99
+
100
+
101
+ ----
102
+
103
+
104
+ 0.2.0
105
+ =====
106
+
107
+ *(2024-10-07)*
108
+
109
+
110
+ Bug fixes
111
+ ---------
112
+
113
+ - Fixed loading the C-extensions on Python 3.8 -- by :user:`bdraco`.
114
+
115
+ *Related issues and pull requests on GitHub:*
116
+ :issue:`26`.
117
+
118
+
119
+ Features
120
+ --------
121
+
122
+ - Improved typing for the :func:`propcache.api.under_cached_property` decorator -- by :user:`bdraco`.
123
+
124
+ *Related issues and pull requests on GitHub:*
125
+ :issue:`38`.
126
+
127
+
128
+ Improved documentation
129
+ ----------------------
130
+
131
+ - Added API documentation for the :func:`propcache.api.cached_property` and :func:`propcache.api.under_cached_property` decorators -- by :user:`bdraco`.
132
+
133
+ *Related issues and pull requests on GitHub:*
134
+ :issue:`16`.
135
+
136
+
137
+ Packaging updates and notes for downstreams
138
+ -------------------------------------------
139
+
140
+ - Moved :func:`propcache.api.under_cached_property` and :func:`propcache.api.cached_property` to `propcache.api` -- by :user:`bdraco`.
141
+
142
+ Both decorators remain importable from the top-level package, however importing from `propcache.api` is now the recommended way to use them.
143
+
144
+ *Related issues and pull requests on GitHub:*
145
+ :issue:`19`, :issue:`24`, :issue:`32`.
146
+
147
+ - Converted project to use a src layout -- by :user:`bdraco`.
148
+
149
+ *Related issues and pull requests on GitHub:*
150
+ :issue:`22`, :issue:`29`, :issue:`37`.
151
+
152
+
153
+ ----
154
+
155
+
156
+ 0.1.0
157
+ =====
158
+
159
+ *(2024-10-03)*
160
+
161
+
162
+ Features
163
+ --------
164
+
165
+ - Added ``armv7l`` wheels -- by :user:`bdraco`.
166
+
167
+ *Related issues and pull requests on GitHub:*
168
+ :issue:`5`.
169
+
170
+
171
+ ----
172
+
173
+
174
+ 0.0.0
175
+ =====
176
+
177
+ *(2024-10-02)*
178
+
179
+
180
+ - Initial release.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: propcache
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Accelerated property cache
5
5
  Home-page: https://github.com/aio-libs/propcache
6
6
  Author: Andrew Svetlov
@@ -24,7 +24,6 @@ Classifier: License :: OSI Approved :: Apache Software License
24
24
  Classifier: Programming Language :: Cython
25
25
  Classifier: Programming Language :: Python
26
26
  Classifier: Programming Language :: Python :: 3
27
- Classifier: Programming Language :: Python :: 3.8
28
27
  Classifier: Programming Language :: Python :: 3.9
29
28
  Classifier: Programming Language :: Python :: 3.10
30
29
  Classifier: Programming Language :: Python :: 3.11
@@ -32,7 +31,7 @@ Classifier: Programming Language :: Python :: 3.12
32
31
  Classifier: Programming Language :: Python :: 3.13
33
32
  Classifier: Topic :: Internet :: WWW/HTTP
34
33
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
35
- Requires-Python: >=3.8
34
+ Requires-Python: >=3.9
36
35
  Description-Content-Type: text/x-rst
37
36
  License-File: LICENSE
38
37
  License-File: NOTICE
@@ -40,7 +39,7 @@ License-File: NOTICE
40
39
  propcache
41
40
  =========
42
41
 
43
- The module provides a fast implementation of cached properties for Python 3.8+.
42
+ The module provides a fast implementation of cached properties for Python 3.9+.
44
43
 
45
44
  .. image:: https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg
46
45
  :target: https://github.com/aio-libs/propcache/actions?query=workflow%3ACI
@@ -152,6 +151,93 @@ Changelog
152
151
 
153
152
  .. towncrier release notes start
154
153
 
154
+ 0.3.0
155
+ =====
156
+
157
+ *(2025-02-20)*
158
+
159
+
160
+ Features
161
+ --------
162
+
163
+ - Implemented support for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
164
+
165
+ *Related issues and pull requests on GitHub:*
166
+ `#84 <https://github.com/aio-libs/propcache/issues/84>`__.
167
+
168
+
169
+ Packaging updates and notes for downstreams
170
+ -------------------------------------------
171
+
172
+ - Started building wheels for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
173
+
174
+ *Related issues and pull requests on GitHub:*
175
+ `#84 <https://github.com/aio-libs/propcache/issues/84>`__.
176
+
177
+
178
+ Contributor-facing changes
179
+ --------------------------
180
+
181
+ - GitHub Actions CI/CD is now configured to manage caching pip-ecosystem
182
+ dependencies using `re-actors/cache-python-deps`_ -- an action by
183
+ `@webknjaz <https://github.com/sponsors/webknjaz>`__ that takes into account ABI stability and the exact
184
+ version of Python runtime.
185
+
186
+ .. _`re-actors/cache-python-deps`:
187
+ https://github.com/marketplace/actions/cache-python-deps
188
+
189
+ *Related issues and pull requests on GitHub:*
190
+ `#93 <https://github.com/aio-libs/propcache/issues/93>`__.
191
+
192
+
193
+ ----
194
+
195
+
196
+ 0.2.1
197
+ =====
198
+
199
+ *(2024-12-01)*
200
+
201
+
202
+ Bug fixes
203
+ ---------
204
+
205
+ - Stopped implicitly allowing the use of Cython pre-release versions when
206
+ building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and
207
+ `@markgreene74 <https://github.com/sponsors/markgreene74>`__.
208
+
209
+ *Related commits on GitHub:*
210
+ `64df0a6 <https://github.com/aio-libs/propcache/commit/64df0a6>`__.
211
+
212
+ - Fixed ``wrapped`` and ``func`` not being accessible in the Cython versions of ``propcache.api.cached_property`` and ``propcache.api.under_cached_property`` decorators -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
213
+
214
+ *Related issues and pull requests on GitHub:*
215
+ `#72 <https://github.com/aio-libs/propcache/issues/72>`__.
216
+
217
+
218
+ Removals and backward incompatible breaking changes
219
+ ---------------------------------------------------
220
+
221
+ - Removed support for Python 3.8 as it has reached end of life -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
222
+
223
+ *Related issues and pull requests on GitHub:*
224
+ `#57 <https://github.com/aio-libs/propcache/issues/57>`__.
225
+
226
+
227
+ Packaging updates and notes for downstreams
228
+ -------------------------------------------
229
+
230
+ - Stopped implicitly allowing the use of Cython pre-release versions when
231
+ building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and
232
+ `@markgreene74 <https://github.com/sponsors/markgreene74>`__.
233
+
234
+ *Related commits on GitHub:*
235
+ `64df0a6 <https://github.com/aio-libs/propcache/commit/64df0a6>`__.
236
+
237
+
238
+ ----
239
+
240
+
155
241
  0.2.0
156
242
  =====
157
243
 
@@ -1,7 +1,7 @@
1
1
  propcache
2
2
  =========
3
3
 
4
- The module provides a fast implementation of cached properties for Python 3.8+.
4
+ The module provides a fast implementation of cached properties for Python 3.9+.
5
5
 
6
6
  .. image:: https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg
7
7
  :target: https://github.com/aio-libs/propcache/actions?query=workflow%3ACI
@@ -1,5 +1,6 @@
1
1
  Bluesky
2
2
  Bugfixes
3
+ CPython
3
4
  Changelog
4
5
  Codecov
5
6
  Cython
@@ -4,6 +4,7 @@
4
4
  from __future__ import annotations
5
5
 
6
6
  import os
7
+ import sysconfig
7
8
  import typing as t
8
9
  from contextlib import contextmanager, nullcontext, suppress
9
10
  from functools import partial
@@ -11,7 +12,6 @@ from pathlib import Path
11
12
  from shutil import copytree
12
13
  from sys import implementation as _system_implementation
13
14
  from sys import stderr as _standard_error_stream
14
- from sys import version_info as _python_version_tuple
15
15
  from tempfile import TemporaryDirectory
16
16
  from warnings import warn as _warn_that
17
17
 
@@ -43,14 +43,12 @@ with suppress(ImportError):
43
43
  from Cython.Build.Cythonize import main as _cythonize_cli_cmd
44
44
 
45
45
  from ._compat import chdir_cm
46
- from ._cython_configuration import ( # noqa: WPS436
47
- get_local_cython_config as _get_local_cython_config,
48
- )
46
+ from ._cython_configuration import get_local_cython_config as _get_local_cython_config
49
47
  from ._cython_configuration import (
50
48
  make_cythonize_cli_args_from_config as _make_cythonize_cli_args_from_config,
51
49
  )
52
50
  from ._cython_configuration import patched_env as _patched_cython_env
53
- from ._transformers import sanitize_rst_roles # noqa: WPS436
51
+ from ._transformers import sanitize_rst_roles
54
52
 
55
53
  __all__ = ( # noqa: WPS410
56
54
  'build_sdist',
@@ -82,9 +80,6 @@ PURE_PYTHON_CONFIG_SETTING = 'pure-python'
82
80
  PURE_PYTHON_ENV_VAR = 'PROPCACHE_NO_EXTENSIONS'
83
81
  """Environment variable name toggle used to opt out of making C-exts."""
84
82
 
85
- IS_PY3_12_PLUS = _python_version_tuple[:2] >= (3, 12)
86
- """A flag meaning that the current runtime is Python 3.12 or higher."""
87
-
88
83
  IS_CPYTHON = _system_implementation.name == "cpython"
89
84
  """A flag meaning that the current interpreter implementation is CPython."""
90
85
 
@@ -205,7 +200,7 @@ def _exclude_dir_path(
205
200
  """Prevent recursive directory traversal."""
206
201
  # This stops the temporary directory from being copied
207
202
  # into self recursively forever.
208
- # Ref: https://github.com/aio-libs/propcache/issues/992
203
+ # Ref: https://github.com/aio-libs/yarl/issues/992
209
204
  visited_directory_subdirs_to_ignore = [
210
205
  subdir
211
206
  for subdir in _visited_dir_contents
@@ -377,10 +372,12 @@ def get_requires_for_build_wheel(
377
372
  stacklevel=999,
378
373
  )
379
374
 
380
- c_ext_build_deps = [] if is_pure_python_build else [
381
- 'Cython >= 3.0.0b3' if IS_PY3_12_PLUS # Only Cython 3+ is compatible
382
- else 'Cython',
383
- ]
375
+ if is_pure_python_build:
376
+ c_ext_build_deps = []
377
+ elif sysconfig.get_config_var('Py_GIL_DISABLED'):
378
+ c_ext_build_deps = ['Cython ~= 3.1.0a1']
379
+ else:
380
+ c_ext_build_deps = ['Cython ~= 3.0.12']
384
381
 
385
382
  return _setuptools_get_requires_for_build_wheel(
386
383
  config_settings=config_settings,
@@ -9,11 +9,8 @@ from sys import version_info as _python_version_tuple
9
9
 
10
10
  from expandvars import expandvars
11
11
 
12
- from ._compat import load_toml_from_string # noqa: WPS436
13
- from ._transformers import ( # noqa: WPS436
14
- get_cli_kwargs_from_config,
15
- get_enabled_cli_flags_from_config,
16
- )
12
+ from ._compat import load_toml_from_string
13
+ from ._transformers import get_cli_kwargs_from_config, get_enabled_cli_flags_from_config
17
14
 
18
15
 
19
16
  def get_local_cython_config() -> dict:
@@ -5,7 +5,7 @@ from contextlib import suppress as _suppress
5
5
  from setuptools.build_meta import * # Re-exporting PEP 517 hooks # pylint: disable=unused-wildcard-import,wildcard-import # noqa: E501, F401, F403
6
6
 
7
7
  # Re-exporting PEP 517 hooks
8
- from ._backend import ( # type: ignore[assignment] # noqa: WPS436
8
+ from ._backend import ( # type: ignore[assignment]
9
9
  build_sdist,
10
10
  build_wheel,
11
11
  get_requires_for_build_wheel,
@@ -14,7 +14,7 @@ from ._backend import ( # type: ignore[assignment] # noqa: WPS436
14
14
 
15
15
  with _suppress(ImportError): # Only succeeds w/ setuptools implementing PEP 660
16
16
  # Re-exporting PEP 660 hooks
17
- from ._backend import ( # type: ignore[assignment] # noqa: WPS436
17
+ from ._backend import ( # type: ignore[assignment]
18
18
  build_editable,
19
19
  get_requires_for_build_editable,
20
20
  prepare_metadata_for_build_editable,
@@ -64,6 +64,7 @@ linetrace = "True" # Implies `profile=True`
64
64
 
65
65
  [tool.cibuildwheel]
66
66
  build-frontend = "build"
67
+ enable = ["cpython-freethreading"]
67
68
  before-test = [
68
69
  # NOTE: Attempt to have pip pre-compile PyYAML wheel with our build
69
70
  # NOTE: constraints unset. The hope is that pip will cache that wheel
@@ -91,3 +92,15 @@ pure-python = "false"
91
92
 
92
93
  [tool.cibuildwheel.windows]
93
94
  before-test = [] # Windows cmd has different syntax and pip chooses wheels
95
+
96
+ [tool.cibuildwheel.linux]
97
+ before-all = "yum install -y libffi-devel || apk add --upgrade libffi-dev || apt-get install libffi-dev"
98
+
99
+ # TODO: Remove this when there's a Cython 3.1 final release
100
+ # Remove PIP_CONSTRAINT from the environment
101
+ [[tool.cibuildwheel.overrides]]
102
+ select = "cp313t-*"
103
+
104
+ test-requires = "-r requirements/test-freethreading.txt"
105
+ inherit.environment = "append"
106
+ environment = {PIP_CONSTRAINT = "requirements/cython-freethreading.txt"}
@@ -2,6 +2,8 @@
2
2
  addopts =
3
3
  # `pytest-xdist`:
4
4
  --numprocesses=auto
5
+ # NOTE: the plugin disabled because it's slower with so few tests
6
+ --numprocesses=0
5
7
 
6
8
  # Show 10 slowest invocations:
7
9
  --durations=10
@@ -16,16 +18,14 @@ addopts =
16
18
  # https://docs.pytest.org/en/stable/doctest.html
17
19
  --doctest-modules
18
20
 
19
- # Dump the test results in junit format:
20
- # --junitxml=.test-results/pytest/results.xml
21
-
22
21
  # Pre-load the `pytest-cov` plugin early:
23
22
  -p pytest_cov
24
23
 
25
24
  # `pytest-cov`:
26
25
  --cov
27
- --cov-context=test
28
26
  --cov-config=.coveragerc
27
+ --cov-context=test
28
+ --no-cov-on-fail
29
29
 
30
30
  # Fail on config parsing warnings:
31
31
  # --strict-config
@@ -73,6 +73,7 @@ norecursedirs =
73
73
  build
74
74
  dist
75
75
  docs
76
+ requirements
76
77
  venv
77
78
  virtualenv
78
79
  propcache.egg-info
@@ -0,0 +1,2 @@
1
+ -r test.txt
2
+ pytest-codspeed==3.2.0
@@ -0,0 +1 @@
1
+ cython==3.1.0a1
@@ -0,0 +1 @@
1
+ cython==3.0.12
@@ -1,2 +1,2 @@
1
- -r test.txt
1
+ -r codspeed.txt
2
2
  -r towncrier.txt
@@ -0,0 +1,2 @@
1
+ -r doc.txt
2
+ sphinxcontrib-spelling==8.0.1; platform_system!="Windows" # We only use it in Azure CI
@@ -1,4 +1,4 @@
1
1
  -r towncrier.txt
2
2
  myst-parser >= 0.10.0
3
- sphinx==8.0.2
3
+ sphinx==8.2.0
4
4
  sphinxcontrib-towncrier
@@ -0,0 +1 @@
1
+ pre-commit==4.1.0
@@ -0,0 +1,2 @@
1
+ -r cython-freethreading.txt
2
+ -r test-pure.txt
@@ -1,5 +1,4 @@
1
- -r cython.txt
2
1
  covdefaults
3
- pytest==8.3.3
2
+ pytest==8.3.4
4
3
  pytest-cov>=2.3.1
5
4
  pytest-xdist
@@ -0,0 +1,2 @@
1
+ -r cython.txt
2
+ -r test-pure.txt
@@ -36,7 +36,6 @@ classifiers =
36
36
  Programming Language :: Cython
37
37
  Programming Language :: Python
38
38
  Programming Language :: Python :: 3
39
- Programming Language :: Python :: 3.8
40
39
  Programming Language :: Python :: 3.9
41
40
  Programming Language :: Python :: 3.10
42
41
  Programming Language :: Python :: 3.11
@@ -51,7 +50,7 @@ keywords =
51
50
  propcache
52
51
 
53
52
  [options]
54
- python_requires = >=3.8
53
+ python_requires = >=3.9
55
54
  package_dir =
56
55
  =src
57
56
  packages =
@@ -1,10 +1,10 @@
1
1
  """propcache: An accelerated property cache for Python classes."""
2
2
 
3
- from typing import TYPE_CHECKING, List
3
+ from typing import TYPE_CHECKING
4
4
 
5
5
  _PUBLIC_API = ("cached_property", "under_cached_property")
6
6
 
7
- __version__ = "0.2.0"
7
+ __version__ = "0.3.0"
8
8
  __all__ = ()
9
9
 
10
10
  # Imports have moved to `propcache.api` in 0.2.0+.
@@ -23,7 +23,7 @@ def _import_facade(attr: str) -> object:
23
23
  raise AttributeError(f"module '{__package__}' has no attribute '{attr}'")
24
24
 
25
25
 
26
- def _dir_facade() -> List[str]:
26
+ def _dir_facade() -> list[str]:
27
27
  """Include the public API in the module's dir() output."""
28
28
  return [*_PUBLIC_API, *globals().keys()]
29
29
 
@@ -1,13 +1,5 @@
1
- # cython: language_level=3
2
- import sys
3
- import types
4
-
5
- if sys.version_info >= (3, 9):
6
- GenericAlias = types.GenericAlias
7
- else:
8
-
9
- def GenericAlias(cls):
10
- return cls
1
+ # cython: language_level=3, freethreading_compatible=True
2
+ from types import GenericAlias
11
3
 
12
4
 
13
5
  cdef _sentinel = object()
@@ -21,7 +13,7 @@ cdef class under_cached_property:
21
13
 
22
14
  """
23
15
 
24
- cdef object wrapped
16
+ cdef readonly object wrapped
25
17
  cdef object name
26
18
 
27
19
  def __init__(self, wrapped):
@@ -55,16 +47,16 @@ cdef class cached_property:
55
47
 
56
48
  """
57
49
 
58
- cdef object wrapped
50
+ cdef readonly object func
59
51
  cdef object name
60
52
 
61
- def __init__(self, wrapped):
62
- self.wrapped = wrapped
53
+ def __init__(self, func):
54
+ self.func = func
63
55
  self.name = None
64
56
 
65
57
  @property
66
58
  def __doc__(self):
67
- return self.wrapped.__doc__
59
+ return self.func.__doc__
68
60
 
69
61
  def __set_name__(self, owner, name):
70
62
  if self.name is None:
@@ -85,7 +77,7 @@ cdef class cached_property:
85
77
  cdef dict cache = inst.__dict__
86
78
  val = cache.get(self.name, _sentinel)
87
79
  if val is _sentinel:
88
- val = self.wrapped(inst)
80
+ val = self.func(inst)
89
81
  cache[self.name] = val
90
82
  return val
91
83