Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-propcache for openSUSE:Factory checked in at 2025-03-15 16:15:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-propcache (Old) and /work/SRC/openSUSE:Factory/.python-propcache.new.19136 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-propcache" Sat Mar 15 16:15:35 2025 rev:3 rq:1252832 version:0.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-propcache/python-propcache.changes 2024-10-15 14:57:39.698826377 +0200 +++ /work/SRC/openSUSE:Factory/.python-propcache.new.19136/python-propcache.changes 2025-03-15 16:16:04.772056333 +0100 @@ -1,0 +2,6 @@ +Thu Mar 13 15:49:55 UTC 2025 - Felix Stegmeier <felix.stegme...@suse.com> + +- Update to 0.3.0 + * Implemented support for the free-threaded build of CPython 3.13 -- by :user:lysnikolaou. + +------------------------------------------------------------------- Old: ---- propcache-0.2.0.tar.gz New: ---- propcache-0.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-propcache.spec ++++++ --- /var/tmp/diff_new_pack.9S0srY/_old 2025-03-15 16:16:05.324079483 +0100 +++ /var/tmp/diff_new_pack.9S0srY/_new 2025-03-15 16:16:05.328079651 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-propcache # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,26 +15,27 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %{?sle15_python_module_pythons} Name: python-propcache -Version: 0.2.0 +Version: 0.3.0 Release: 0 Summary: Accelerated property cache License: Apache-2.0 URL: https://github.com/aio-libs/propcache Source: https://files.pythonhosted.org/packages/source/p/propcache/propcache-%{version}.tar.gz Patch0: reproducible.patch -BuildRequires: python-rpm-macros BuildRequires: %{python_module Cython >= 3.0.11} +BuildRequires: %{python_module covdefaults} BuildRequires: %{python_module expandvars} BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools >= 47} -BuildRequires: %{python_module wheel} -BuildRequires: %{python_module covdefaults} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools >= 47} +BuildRequires: %{python_module wheel} BuildRequires: fdupes +BuildRequires: python-rpm-macros %python_subpackages %description ++++++ propcache-0.2.0.tar.gz -> propcache-0.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/.coveragerc new/propcache-0.3.0/.coveragerc --- old/propcache-0.2.0/.coveragerc 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/.coveragerc 2025-02-20 19:07:34.000000000 +0100 @@ -3,20 +3,22 @@ skip_covered = false [paths] -source = - src/propcache - */lib/pypy*/site-packages/propcache - */lib/python*/site-packages/propcache - */Lib/site-packages/propcache +_site-packages-to-src-mapping = + src + */src + *\src + */lib/pypy*/site-packages + */lib/python*/site-packages + *\Lib\site-packages [report] +exclude_also = + ^\s*@pytest\.mark\.xfail # small library, don't fail when running without C-extension fail_under = 50.00 skip_covered = true skip_empty = true show_missing = true -exclude_also = - ^\s*@pytest\.mark\.xfail [run] branch = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/CHANGES.rst new/propcache-0.3.0/CHANGES.rst --- old/propcache-0.2.0/CHANGES.rst 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/CHANGES.rst 2025-02-20 19:07:34.000000000 +0100 @@ -14,6 +14,93 @@ .. towncrier release notes start +0.3.0 +===== + +*(2025-02-20)* + + +Features +-------- + +- Implemented support for the free-threaded build of CPython 3.13 -- by :user:`lysnikolaou`. + + *Related issues and pull requests on GitHub:* + :issue:`84`. + + +Packaging updates and notes for downstreams +------------------------------------------- + +- Started building wheels for the free-threaded build of CPython 3.13 -- by :user:`lysnikolaou`. + + *Related issues and pull requests on GitHub:* + :issue:`84`. + + +Contributor-facing changes +-------------------------- + +- GitHub Actions CI/CD is now configured to manage caching pip-ecosystem + dependencies using `re-actors/cache-python-deps`_ -- an action by + :user:`webknjaz` that takes into account ABI stability and the exact + version of Python runtime. + + .. _`re-actors/cache-python-deps`: + https://github.com/marketplace/actions/cache-python-deps + + *Related issues and pull requests on GitHub:* + :issue:`93`. + + +---- + + +0.2.1 +===== + +*(2024-12-01)* + + +Bug fixes +--------- + +- Stopped implicitly allowing the use of Cython pre-release versions when + building the distribution package -- by :user:`ajsanchezsanz` and + :user:`markgreene74`. + + *Related commits on GitHub:* + :commit:`64df0a6`. + +- 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`. + + *Related issues and pull requests on GitHub:* + :issue:`72`. + + +Removals and backward incompatible breaking changes +--------------------------------------------------- + +- Removed support for Python 3.8 as it has reached end of life -- by :user:`bdraco`. + + *Related issues and pull requests on GitHub:* + :issue:`57`. + + +Packaging updates and notes for downstreams +------------------------------------------- + +- Stopped implicitly allowing the use of Cython pre-release versions when + building the distribution package -- by :user:`ajsanchezsanz` and + :user:`markgreene74`. + + *Related commits on GitHub:* + :commit:`64df0a6`. + + +---- + + 0.2.0 ===== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/PKG-INFO new/propcache-0.3.0/PKG-INFO --- old/propcache-0.2.0/PKG-INFO 2024-10-07 13:14:06.380232300 +0200 +++ new/propcache-0.3.0/PKG-INFO 2025-02-20 19:07:41.504042600 +0100 @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.2 Name: propcache -Version: 0.2.0 +Version: 0.3.0 Summary: Accelerated property cache Home-page: https://github.com/aio-libs/propcache Author: Andrew Svetlov @@ -24,7 +24,6 @@ Classifier: Programming Language :: Cython Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 @@ -32,7 +31,7 @@ Classifier: Programming Language :: Python :: 3.13 Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE License-File: NOTICE @@ -40,7 +39,7 @@ propcache ========= -The module provides a fast implementation of cached properties for Python 3.8+. +The module provides a fast implementation of cached properties for Python 3.9+. .. image:: https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg :target: https://github.com/aio-libs/propcache/actions?query=workflow%3ACI @@ -152,6 +151,93 @@ .. towncrier release notes start +0.3.0 +===== + +*(2025-02-20)* + + +Features +-------- + +- Implemented support for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__. + + *Related issues and pull requests on GitHub:* + `#84 <https://github.com/aio-libs/propcache/issues/84>`__. + + +Packaging updates and notes for downstreams +------------------------------------------- + +- Started building wheels for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__. + + *Related issues and pull requests on GitHub:* + `#84 <https://github.com/aio-libs/propcache/issues/84>`__. + + +Contributor-facing changes +-------------------------- + +- GitHub Actions CI/CD is now configured to manage caching pip-ecosystem + dependencies using `re-actors/cache-python-deps`_ -- an action by + `@webknjaz <https://github.com/sponsors/webknjaz>`__ that takes into account ABI stability and the exact + version of Python runtime. + + .. _`re-actors/cache-python-deps`: + https://github.com/marketplace/actions/cache-python-deps + + *Related issues and pull requests on GitHub:* + `#93 <https://github.com/aio-libs/propcache/issues/93>`__. + + +---- + + +0.2.1 +===== + +*(2024-12-01)* + + +Bug fixes +--------- + +- Stopped implicitly allowing the use of Cython pre-release versions when + building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and + `@markgreene74 <https://github.com/sponsors/markgreene74>`__. + + *Related commits on GitHub:* + `64df0a6 <https://github.com/aio-libs/propcache/commit/64df0a6>`__. + +- 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>`__. + + *Related issues and pull requests on GitHub:* + `#72 <https://github.com/aio-libs/propcache/issues/72>`__. + + +Removals and backward incompatible breaking changes +--------------------------------------------------- + +- Removed support for Python 3.8 as it has reached end of life -- by `@bdraco <https://github.com/sponsors/bdraco>`__. + + *Related issues and pull requests on GitHub:* + `#57 <https://github.com/aio-libs/propcache/issues/57>`__. + + +Packaging updates and notes for downstreams +------------------------------------------- + +- Stopped implicitly allowing the use of Cython pre-release versions when + building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and + `@markgreene74 <https://github.com/sponsors/markgreene74>`__. + + *Related commits on GitHub:* + `64df0a6 <https://github.com/aio-libs/propcache/commit/64df0a6>`__. + + +---- + + 0.2.0 ===== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/README.rst new/propcache-0.3.0/README.rst --- old/propcache-0.2.0/README.rst 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/README.rst 2025-02-20 19:07:34.000000000 +0100 @@ -1,7 +1,7 @@ propcache ========= -The module provides a fast implementation of cached properties for Python 3.8+. +The module provides a fast implementation of cached properties for Python 3.9+. .. image:: https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg :target: https://github.com/aio-libs/propcache/actions?query=workflow%3ACI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/docs/spelling_wordlist.txt new/propcache-0.3.0/docs/spelling_wordlist.txt --- old/propcache-0.2.0/docs/spelling_wordlist.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/docs/spelling_wordlist.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1,5 +1,6 @@ Bluesky Bugfixes +CPython Changelog Codecov Cython diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/packaging/pep517_backend/_backend.py new/propcache-0.3.0/packaging/pep517_backend/_backend.py --- old/propcache-0.2.0/packaging/pep517_backend/_backend.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/packaging/pep517_backend/_backend.py 2025-02-20 19:07:34.000000000 +0100 @@ -4,6 +4,7 @@ from __future__ import annotations import os +import sysconfig import typing as t from contextlib import contextmanager, nullcontext, suppress from functools import partial @@ -11,7 +12,6 @@ from shutil import copytree from sys import implementation as _system_implementation from sys import stderr as _standard_error_stream -from sys import version_info as _python_version_tuple from tempfile import TemporaryDirectory from warnings import warn as _warn_that @@ -43,14 +43,12 @@ from Cython.Build.Cythonize import main as _cythonize_cli_cmd from ._compat import chdir_cm -from ._cython_configuration import ( # noqa: WPS436 - get_local_cython_config as _get_local_cython_config, -) +from ._cython_configuration import get_local_cython_config as _get_local_cython_config from ._cython_configuration import ( make_cythonize_cli_args_from_config as _make_cythonize_cli_args_from_config, ) from ._cython_configuration import patched_env as _patched_cython_env -from ._transformers import sanitize_rst_roles # noqa: WPS436 +from ._transformers import sanitize_rst_roles __all__ = ( # noqa: WPS410 'build_sdist', @@ -82,9 +80,6 @@ PURE_PYTHON_ENV_VAR = 'PROPCACHE_NO_EXTENSIONS' """Environment variable name toggle used to opt out of making C-exts.""" -IS_PY3_12_PLUS = _python_version_tuple[:2] >= (3, 12) -"""A flag meaning that the current runtime is Python 3.12 or higher.""" - IS_CPYTHON = _system_implementation.name == "cpython" """A flag meaning that the current interpreter implementation is CPython.""" @@ -205,7 +200,7 @@ """Prevent recursive directory traversal.""" # This stops the temporary directory from being copied # into self recursively forever. - # Ref: https://github.com/aio-libs/propcache/issues/992 + # Ref: https://github.com/aio-libs/yarl/issues/992 visited_directory_subdirs_to_ignore = [ subdir for subdir in _visited_dir_contents @@ -377,10 +372,12 @@ stacklevel=999, ) - c_ext_build_deps = [] if is_pure_python_build else [ - 'Cython >= 3.0.0b3' if IS_PY3_12_PLUS # Only Cython 3+ is compatible - else 'Cython', - ] + if is_pure_python_build: + c_ext_build_deps = [] + elif sysconfig.get_config_var('Py_GIL_DISABLED'): + c_ext_build_deps = ['Cython ~= 3.1.0a1'] + else: + c_ext_build_deps = ['Cython ~= 3.0.12'] return _setuptools_get_requires_for_build_wheel( config_settings=config_settings, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/packaging/pep517_backend/_cython_configuration.py new/propcache-0.3.0/packaging/pep517_backend/_cython_configuration.py --- old/propcache-0.2.0/packaging/pep517_backend/_cython_configuration.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/packaging/pep517_backend/_cython_configuration.py 2025-02-20 19:07:34.000000000 +0100 @@ -9,11 +9,8 @@ from expandvars import expandvars -from ._compat import load_toml_from_string # noqa: WPS436 -from ._transformers import ( # noqa: WPS436 - get_cli_kwargs_from_config, - get_enabled_cli_flags_from_config, -) +from ._compat import load_toml_from_string +from ._transformers import get_cli_kwargs_from_config, get_enabled_cli_flags_from_config def get_local_cython_config() -> dict: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/packaging/pep517_backend/hooks.py new/propcache-0.3.0/packaging/pep517_backend/hooks.py --- old/propcache-0.2.0/packaging/pep517_backend/hooks.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/packaging/pep517_backend/hooks.py 2025-02-20 19:07:34.000000000 +0100 @@ -5,7 +5,7 @@ from setuptools.build_meta import * # Re-exporting PEP 517 hooks # pylint: disable=unused-wildcard-import,wildcard-import # noqa: E501, F401, F403 # Re-exporting PEP 517 hooks -from ._backend import ( # type: ignore[assignment] # noqa: WPS436 +from ._backend import ( # type: ignore[assignment] build_sdist, build_wheel, get_requires_for_build_wheel, @@ -14,7 +14,7 @@ with _suppress(ImportError): # Only succeeds w/ setuptools implementing PEP 660 # Re-exporting PEP 660 hooks - from ._backend import ( # type: ignore[assignment] # noqa: WPS436 + from ._backend import ( # type: ignore[assignment] build_editable, get_requires_for_build_editable, prepare_metadata_for_build_editable, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/pyproject.toml new/propcache-0.3.0/pyproject.toml --- old/propcache-0.2.0/pyproject.toml 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/pyproject.toml 2025-02-20 19:07:34.000000000 +0100 @@ -64,6 +64,7 @@ [tool.cibuildwheel] build-frontend = "build" +enable = ["cpython-freethreading"] before-test = [ # NOTE: Attempt to have pip pre-compile PyYAML wheel with our build # NOTE: constraints unset. The hope is that pip will cache that wheel @@ -91,3 +92,15 @@ [tool.cibuildwheel.windows] before-test = [] # Windows cmd has different syntax and pip chooses wheels + +[tool.cibuildwheel.linux] +before-all = "yum install -y libffi-devel || apk add --upgrade libffi-dev || apt-get install libffi-dev" + +# TODO: Remove this when there's a Cython 3.1 final release +# Remove PIP_CONSTRAINT from the environment +[[tool.cibuildwheel.overrides]] +select = "cp313t-*" + +test-requires = "-r requirements/test-freethreading.txt" +inherit.environment = "append" +environment = {PIP_CONSTRAINT = "requirements/cython-freethreading.txt"} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/pytest.ini new/propcache-0.3.0/pytest.ini --- old/propcache-0.2.0/pytest.ini 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/pytest.ini 2025-02-20 19:07:34.000000000 +0100 @@ -2,6 +2,8 @@ addopts = # `pytest-xdist`: --numprocesses=auto + # NOTE: the plugin disabled because it's slower with so few tests + --numprocesses=0 # Show 10 slowest invocations: --durations=10 @@ -16,16 +18,14 @@ # https://docs.pytest.org/en/stable/doctest.html --doctest-modules - # Dump the test results in junit format: - # --junitxml=.test-results/pytest/results.xml - # Pre-load the `pytest-cov` plugin early: -p pytest_cov # `pytest-cov`: --cov - --cov-context=test --cov-config=.coveragerc + --cov-context=test + --no-cov-on-fail # Fail on config parsing warnings: # --strict-config @@ -73,6 +73,7 @@ build dist docs + requirements venv virtualenv propcache.egg-info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/codspeed.txt new/propcache-0.3.0/requirements/codspeed.txt --- old/propcache-0.2.0/requirements/codspeed.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/propcache-0.3.0/requirements/codspeed.txt 2025-02-20 19:07:34.000000000 +0100 @@ -0,0 +1,2 @@ +-r test.txt +pytest-codspeed==3.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/cython-freethreading.txt new/propcache-0.3.0/requirements/cython-freethreading.txt --- old/propcache-0.2.0/requirements/cython-freethreading.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/propcache-0.3.0/requirements/cython-freethreading.txt 2025-02-20 19:07:34.000000000 +0100 @@ -0,0 +1 @@ +cython==3.1.0a1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/cython.txt new/propcache-0.3.0/requirements/cython.txt --- old/propcache-0.2.0/requirements/cython.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/requirements/cython.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1 +1 @@ -cython==3.0.11 +cython==3.0.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/dev.txt new/propcache-0.3.0/requirements/dev.txt --- old/propcache-0.2.0/requirements/dev.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/requirements/dev.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1,2 +1,2 @@ --r test.txt +-r codspeed.txt -r towncrier.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/doc-spelling.txt new/propcache-0.3.0/requirements/doc-spelling.txt --- old/propcache-0.2.0/requirements/doc-spelling.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/requirements/doc-spelling.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1,2 +1,2 @@ -r doc.txt -sphinxcontrib-spelling==8.0.0; platform_system!="Windows" # We only use it in Azure CI +sphinxcontrib-spelling==8.0.1; platform_system!="Windows" # We only use it in Azure CI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/doc.txt new/propcache-0.3.0/requirements/doc.txt --- old/propcache-0.2.0/requirements/doc.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/requirements/doc.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1,4 +1,4 @@ -r towncrier.txt myst-parser >= 0.10.0 -sphinx==8.0.2 +sphinx==8.2.0 sphinxcontrib-towncrier diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/lint.txt new/propcache-0.3.0/requirements/lint.txt --- old/propcache-0.2.0/requirements/lint.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/requirements/lint.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1 +1 @@ -pre-commit==4.0.0 +pre-commit==4.1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/test-freethreading.txt new/propcache-0.3.0/requirements/test-freethreading.txt --- old/propcache-0.2.0/requirements/test-freethreading.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/propcache-0.3.0/requirements/test-freethreading.txt 2025-02-20 19:07:34.000000000 +0100 @@ -0,0 +1,2 @@ +-r cython-freethreading.txt +-r test-pure.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/test-pure.txt new/propcache-0.3.0/requirements/test-pure.txt --- old/propcache-0.2.0/requirements/test-pure.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/propcache-0.3.0/requirements/test-pure.txt 2025-02-20 19:07:34.000000000 +0100 @@ -0,0 +1,4 @@ +covdefaults +pytest==8.3.4 +pytest-cov>=2.3.1 +pytest-xdist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/requirements/test.txt new/propcache-0.3.0/requirements/test.txt --- old/propcache-0.2.0/requirements/test.txt 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/requirements/test.txt 2025-02-20 19:07:34.000000000 +0100 @@ -1,5 +1,2 @@ -r cython.txt -covdefaults -pytest==8.3.3 -pytest-cov>=2.3.1 -pytest-xdist +-r test-pure.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/setup.cfg new/propcache-0.3.0/setup.cfg --- old/propcache-0.2.0/setup.cfg 2024-10-07 13:14:06.380232300 +0200 +++ new/propcache-0.3.0/setup.cfg 2025-02-20 19:07:41.504042600 +0100 @@ -36,7 +36,6 @@ Programming Language :: Cython Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 @@ -51,7 +50,7 @@ propcache [options] -python_requires = >=3.8 +python_requires = >=3.9 package_dir = =src packages = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/src/propcache/__init__.py new/propcache-0.3.0/src/propcache/__init__.py --- old/propcache-0.2.0/src/propcache/__init__.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/src/propcache/__init__.py 2025-02-20 19:07:34.000000000 +0100 @@ -1,10 +1,10 @@ """propcache: An accelerated property cache for Python classes.""" -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING _PUBLIC_API = ("cached_property", "under_cached_property") -__version__ = "0.2.0" +__version__ = "0.3.0" __all__ = () # Imports have moved to `propcache.api` in 0.2.0+. @@ -23,7 +23,7 @@ raise AttributeError(f"module '{__package__}' has no attribute '{attr}'") -def _dir_facade() -> List[str]: +def _dir_facade() -> list[str]: """Include the public API in the module's dir() output.""" return [*_PUBLIC_API, *globals().keys()] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/src/propcache/_helpers_c.pyx new/propcache-0.3.0/src/propcache/_helpers_c.pyx --- old/propcache-0.2.0/src/propcache/_helpers_c.pyx 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/src/propcache/_helpers_c.pyx 2025-02-20 19:07:34.000000000 +0100 @@ -1,13 +1,5 @@ -# cython: language_level=3 -import sys -import types - -if sys.version_info >= (3, 9): - GenericAlias = types.GenericAlias -else: - - def GenericAlias(cls): - return cls +# cython: language_level=3, freethreading_compatible=True +from types import GenericAlias cdef _sentinel = object() @@ -21,7 +13,7 @@ """ - cdef object wrapped + cdef readonly object wrapped cdef object name def __init__(self, wrapped): @@ -55,16 +47,16 @@ """ - cdef object wrapped + cdef readonly object func cdef object name - def __init__(self, wrapped): - self.wrapped = wrapped + def __init__(self, func): + self.func = func self.name = None @property def __doc__(self): - return self.wrapped.__doc__ + return self.func.__doc__ def __set_name__(self, owner, name): if self.name is None: @@ -85,7 +77,7 @@ cdef dict cache = inst.__dict__ val = cache.get(self.name, _sentinel) if val is _sentinel: - val = self.wrapped(inst) + val = self.func(inst) cache[self.name] = val return val diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/src/propcache/_helpers_py.py new/propcache-0.3.0/src/propcache/_helpers_py.py --- old/propcache-0.2.0/src/propcache/_helpers_py.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/src/propcache/_helpers_py.py 2025-02-20 19:07:34.000000000 +0100 @@ -2,18 +2,7 @@ import sys from functools import cached_property -from typing import ( - Any, - Callable, - Dict, - Generic, - Optional, - Protocol, - Type, - TypeVar, - Union, - overload, -) +from typing import Any, Callable, Generic, Optional, Protocol, TypeVar, Union, overload __all__ = ("under_cached_property", "cached_property") @@ -27,7 +16,7 @@ class _TSelf(Protocol, Generic[_T]): - _cache: Dict[str, _T] + _cache: dict[str, _T] class under_cached_property(Generic[_T]): @@ -46,17 +35,13 @@ self.name = wrapped.__name__ @overload - def __get__( # pragma: no cover - self, inst: None, owner: Optional[Type[Any]] = None - ) -> Self: ... # pragma: no cover + def __get__(self, inst: None, owner: Optional[type[object]] = None) -> Self: ... @overload - def __get__( # pragma: no cover - self, inst: _TSelf[_T], owner: Optional[Type[Any]] = None - ) -> _T: ... # pragma: no cover + def __get__(self, inst: _TSelf[_T], owner: Optional[type[object]] = None) -> _T: ... def __get__( - self, inst: Optional[_TSelf[_T]], owner: Optional[Type[Any]] = None + self, inst: Optional[_TSelf[_T]], owner: Optional[type[object]] = None ) -> Union[_T, Self]: if inst is None: return self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/src/propcache.egg-info/PKG-INFO new/propcache-0.3.0/src/propcache.egg-info/PKG-INFO --- old/propcache-0.2.0/src/propcache.egg-info/PKG-INFO 2024-10-07 13:14:06.000000000 +0200 +++ new/propcache-0.3.0/src/propcache.egg-info/PKG-INFO 2025-02-20 19:07:41.000000000 +0100 @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.2 Name: propcache -Version: 0.2.0 +Version: 0.3.0 Summary: Accelerated property cache Home-page: https://github.com/aio-libs/propcache Author: Andrew Svetlov @@ -24,7 +24,6 @@ Classifier: Programming Language :: Cython Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 @@ -32,7 +31,7 @@ Classifier: Programming Language :: Python :: 3.13 Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE License-File: NOTICE @@ -40,7 +39,7 @@ propcache ========= -The module provides a fast implementation of cached properties for Python 3.8+. +The module provides a fast implementation of cached properties for Python 3.9+. .. image:: https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg :target: https://github.com/aio-libs/propcache/actions?query=workflow%3ACI @@ -152,6 +151,93 @@ .. towncrier release notes start +0.3.0 +===== + +*(2025-02-20)* + + +Features +-------- + +- Implemented support for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__. + + *Related issues and pull requests on GitHub:* + `#84 <https://github.com/aio-libs/propcache/issues/84>`__. + + +Packaging updates and notes for downstreams +------------------------------------------- + +- Started building wheels for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__. + + *Related issues and pull requests on GitHub:* + `#84 <https://github.com/aio-libs/propcache/issues/84>`__. + + +Contributor-facing changes +-------------------------- + +- GitHub Actions CI/CD is now configured to manage caching pip-ecosystem + dependencies using `re-actors/cache-python-deps`_ -- an action by + `@webknjaz <https://github.com/sponsors/webknjaz>`__ that takes into account ABI stability and the exact + version of Python runtime. + + .. _`re-actors/cache-python-deps`: + https://github.com/marketplace/actions/cache-python-deps + + *Related issues and pull requests on GitHub:* + `#93 <https://github.com/aio-libs/propcache/issues/93>`__. + + +---- + + +0.2.1 +===== + +*(2024-12-01)* + + +Bug fixes +--------- + +- Stopped implicitly allowing the use of Cython pre-release versions when + building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and + `@markgreene74 <https://github.com/sponsors/markgreene74>`__. + + *Related commits on GitHub:* + `64df0a6 <https://github.com/aio-libs/propcache/commit/64df0a6>`__. + +- 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>`__. + + *Related issues and pull requests on GitHub:* + `#72 <https://github.com/aio-libs/propcache/issues/72>`__. + + +Removals and backward incompatible breaking changes +--------------------------------------------------- + +- Removed support for Python 3.8 as it has reached end of life -- by `@bdraco <https://github.com/sponsors/bdraco>`__. + + *Related issues and pull requests on GitHub:* + `#57 <https://github.com/aio-libs/propcache/issues/57>`__. + + +Packaging updates and notes for downstreams +------------------------------------------- + +- Stopped implicitly allowing the use of Cython pre-release versions when + building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and + `@markgreene74 <https://github.com/sponsors/markgreene74>`__. + + *Related commits on GitHub:* + `64df0a6 <https://github.com/aio-libs/propcache/commit/64df0a6>`__. + + +---- + + 0.2.0 ===== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/src/propcache.egg-info/SOURCES.txt new/propcache-0.3.0/src/propcache.egg-info/SOURCES.txt --- old/propcache-0.2.0/src/propcache.egg-info/SOURCES.txt 2024-10-07 13:14:06.000000000 +0200 +++ new/propcache-0.3.0/src/propcache.egg-info/SOURCES.txt 2025-02-20 19:07:41.000000000 +0100 @@ -30,11 +30,15 @@ packaging/pep517_backend/_transformers.py packaging/pep517_backend/cli.py packaging/pep517_backend/hooks.py +requirements/codspeed.txt +requirements/cython-freethreading.txt requirements/cython.txt requirements/dev.txt requirements/doc-spelling.txt requirements/doc.txt requirements/lint.txt +requirements/test-freethreading.txt +requirements/test-pure.txt requirements/test.txt requirements/towncrier.txt src/propcache/__init__.py @@ -50,6 +54,7 @@ src/propcache.egg-info/top_level.txt tests/conftest.py tests/test_api.py +tests/test_benchmarks.py tests/test_cached_property.py tests/test_init.py tests/test_under_cached_property.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/tests/conftest.py new/propcache-0.3.0/tests/conftest.py --- old/propcache-0.2.0/tests/conftest.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/tests/conftest.py 2025-02-20 19:07:34.000000000 +0100 @@ -2,14 +2,11 @@ from dataclasses import dataclass from functools import cached_property from importlib import import_module -from sys import version_info as _version_info from types import ModuleType -from typing import List, Type, Union import pytest C_EXT_MARK = pytest.mark.c_extension -PY_38_AND_BELOW = _version_info < (3, 9) @dataclass(frozen=True) @@ -77,34 +74,19 @@ version of the ``propcache`` implementation. """ del pluginmanager - - arg_parse_action: Union[str, Type[argparse.Action]] - if PY_38_AND_BELOW: - arg_parse_action = "store_true" - else: - arg_parse_action = argparse.BooleanOptionalAction # type: ignore[attr-defined, unused-ignore] # noqa - parser.addoption( "--c-extensions", # disabled with `--no-c-extensions` - action=arg_parse_action, + action=argparse.BooleanOptionalAction, default=True, dest="c_extensions", help="Test C-extensions (on by default)", ) - if PY_38_AND_BELOW: - parser.addoption( - "--no-c-extensions", - action="store_false", - dest="c_extensions", - help="Skip testing C-extensions (on by default)", - ) - def pytest_collection_modifyitems( session: pytest.Session, config: pytest.Config, - items: List[pytest.Item], + items: list[pytest.Item], ) -> None: """Deselect tests against C-extensions when requested via CLI.""" test_c_extensions = config.getoption("--c-extensions") is True @@ -112,8 +94,8 @@ if test_c_extensions: return - selected_tests: List[pytest.Item] = [] - deselected_tests: List[pytest.Item] = [] + selected_tests: list[pytest.Item] = [] + deselected_tests: list[pytest.Item] = [] for item in items: c_ext = item.get_closest_marker(C_EXT_MARK.name) is not None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/tests/test_benchmarks.py new/propcache-0.3.0/tests/test_benchmarks.py --- old/propcache-0.2.0/tests/test_benchmarks.py 1970-01-01 01:00:00.000000000 +0100 +++ new/propcache-0.3.0/tests/test_benchmarks.py 2025-02-20 19:07:34.000000000 +0100 @@ -0,0 +1,92 @@ +"""codspeed benchmarks for propcache.""" + +import pytest + +try: + from pytest_codspeed import BenchmarkFixture +except ImportError: + pytestmark = pytest.mark.skip("pytest_codspeed needs to be installed") + +from propcache import cached_property, under_cached_property + + +def test_under_cached_property_cache_hit(benchmark: "BenchmarkFixture") -> None: + """Benchmark for under_cached_property cache hit.""" + + class Test: + def __init__(self) -> None: + self._cache = {"prop": 42} + + @under_cached_property + def prop(self) -> int: + """Return the value of the property.""" + raise NotImplementedError + + t = Test() + + @benchmark + def _run() -> None: + for _ in range(100): + t.prop + + +def test_cached_property_cache_hit(benchmark: "BenchmarkFixture") -> None: + """Benchmark for cached_property cache hit.""" + + class Test: + def __init__(self) -> None: + self.__dict__["prop"] = 42 + + @cached_property + def prop(self) -> int: + """Return the value of the property.""" + raise NotImplementedError + + t = Test() + + @benchmark + def _run() -> None: + for _ in range(100): + t.prop + + +def test_under_cached_property_cache_miss(benchmark: "BenchmarkFixture") -> None: + """Benchmark for under_cached_property cache miss.""" + + class Test: + def __init__(self) -> None: + self._cache: dict[str, int] = {} + + @under_cached_property + def prop(self) -> int: + """Return the value of the property.""" + return 42 + + t = Test() + cache = t._cache + + @benchmark + def _run() -> None: + for _ in range(100): + cache.pop("prop", None) + t.prop + + +def test_cached_property_cache_miss(benchmark: "BenchmarkFixture") -> None: + """Benchmark for cached_property cache miss.""" + + class Test: + + @cached_property + def prop(self) -> int: + """Return the value of the property.""" + return 42 + + t = Test() + cache = t.__dict__ + + @benchmark + def _run() -> None: + for _ in range(100): + cache.pop("prop", None) + t.prop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/tests/test_cached_property.py new/propcache-0.3.0/tests/test_cached_property.py --- old/propcache-0.2.0/tests/test_cached_property.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/tests/test_cached_property.py 2025-02-20 19:07:34.000000000 +0100 @@ -1,5 +1,5 @@ from operator import not_ -from typing import Protocol, Type +from typing import Protocol import pytest @@ -8,7 +8,7 @@ class APIProtocol(Protocol): - cached_property: Type[cached_property] + cached_property: type[cached_property] def test_cached_property(propcache_module: APIProtocol) -> None: @@ -127,3 +127,19 @@ match = r"Cannot use cached_property instance " with pytest.raises(TypeError, match=match): _ = A().cp # type: ignore[attr-defined] + + +def test_ensured_wrapped_function_is_accessible(propcache_module: APIProtocol) -> None: + """Test that the wrapped function can be accessed from python.""" + + class A: + def __init__(self) -> None: + """Init.""" + + @propcache_module.cached_property + def prop(self) -> int: + """Docstring.""" + return 1 + + a = A() + assert A.prop.func(a) == 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/propcache-0.2.0/tests/test_under_cached_property.py new/propcache-0.3.0/tests/test_under_cached_property.py --- old/propcache-0.2.0/tests/test_under_cached_property.py 2024-10-07 13:14:01.000000000 +0200 +++ new/propcache-0.3.0/tests/test_under_cached_property.py 2025-02-20 19:07:34.000000000 +0100 @@ -1,4 +1,4 @@ -from typing import Any, Dict, Protocol, Type +from typing import Any, Protocol import pytest @@ -7,13 +7,13 @@ class APIProtocol(Protocol): - under_cached_property: Type[under_cached_property] + under_cached_property: type[under_cached_property] def test_under_cached_property(propcache_module: APIProtocol) -> None: class A: def __init__(self) -> None: - self._cache: Dict[str, int] = {} + self._cache: dict[str, int] = {} @propcache_module.under_cached_property def prop(self) -> int: @@ -39,7 +39,7 @@ def test_under_cached_property_assignment(propcache_module: APIProtocol) -> None: class A: def __init__(self) -> None: - self._cache: Dict[str, Any] = {} + self._cache: dict[str, Any] = {} @propcache_module.under_cached_property def prop(self) -> None: @@ -55,7 +55,7 @@ class A: def __init__(self) -> None: """Init.""" - self._cache: Dict[str, int] = {} + self._cache: dict[str, int] = {} @propcache_module.under_cached_property def prop(self) -> None: @@ -88,7 +88,7 @@ def test_under_cached_property_caching(propcache_module: APIProtocol) -> None: class A: def __init__(self) -> None: - self._cache: Dict[str, int] = {} + self._cache: dict[str, int] = {} @propcache_module.under_cached_property def prop(self) -> int: @@ -110,3 +110,20 @@ assert isinstance(A.prop, propcache_module.under_cached_property) assert "Docstring." == A.prop.__doc__ + + +def test_ensured_wrapped_function_is_accessible(propcache_module: APIProtocol) -> None: + """Test that the wrapped function can be accessed from python.""" + + class A: + def __init__(self) -> None: + """Init.""" + self._cache: dict[str, int] = {} + + @propcache_module.under_cached_property + def prop(self) -> int: + """Docstring.""" + return 1 + + a = A() + assert A.prop.wrapped(a) == 1