propcache 0.4.1


pip install propcache

  Latest version

Released: Oct 08, 2025


Meta
Author: Andrew Svetlov
Maintainer: aiohttp team <team@aiohttp.org>
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

License
  • OSI Approved :: Apache Software License

Programming Language
  • Cython
  • Python
  • Python :: 3
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • Internet :: WWW/HTTP
  • Software Development :: Libraries :: Python Modules

propcache

The module provides a fast implementation of cached properties for Python 3.9+.

https://github.com/aio-libs/propcache/actions/workflows/ci-cd.yml/badge.svg https://codecov.io/gh/aio-libs/propcache/branch/master/graph/badge.svg https://badge.fury.io/py/propcache.svg https://readthedocs.org/projects/propcache/badge/?version=latest https://img.shields.io/pypi/pyversions/propcache.svg Matrix Room — #aio-libs:matrix.org Matrix Space — #aio-libs-space:matrix.org

Introduction

The API is designed to be nearly identical to the built-in functools.cached_property class, except for the additional under_cached_property class which uses self._cache instead of self.__dict__ to store the cached values and prevents __set__ from being called.

For full documentation please read https://propcache.readthedocs.io.

Installation

$ pip install propcache

The library is Python 3 only!

PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install propcache on another operating system where wheels are not provided, the the tarball will be used to compile the library from the source code. It requires a C compiler and and Python headers installed.

To skip the compilation you must explicitly opt-in by using a PEP 517 configuration setting pure-python, or setting the PROPCACHE_NO_EXTENSIONS environment variable to a non-empty value, e.g.:

$ pip install propcache --config-settings=pure-python=false

Please note that the pure-Python (uncompiled) version is much slower. However, PyPy always uses a pure-Python implementation, and, as such, it is unaffected by this variable.

API documentation

The documentation is located at https://propcache.readthedocs.io.

Source code

The project is hosted on GitHub

Please file an issue on the bug tracker if you have found a bug or have some suggestion in order to improve the library.

Discussion list

aio-libs google group: https://groups.google.com/forum/#!forum/aio-libs

Feel free to post your questions and ideas here.

Authors and License

The propcache package is derived from yarl which is written by Andrew Svetlov.

It’s Apache 2 licensed and freely available.

Changelog

0.4.1

(2025-10-08)

Bug fixes

  • Fixed reference leak caused by Py_INCREF because Cython has its own reference counter systems – by @Vizonex.

    Related issues and pull requests on GitHub: #162.

Contributor-facing changes

  • Fixes the default value for the os parameter in reusable-build-wheel.yml to be ubuntu-latest instead of ubuntu.

    Related issues and pull requests on GitHub: #155.


0.4.0

(2025-10-04)

Features

  • Optimized propcache by replacing sentinel object for checking if the object is NULL and changed dict API for Python C-API – by @Vizonex.

    Related issues and pull requests on GitHub: #121.

Contributor-facing changes

  • Builds have been added for arm64 Windows wheels and the reusable-build-wheel.yml workflow has been modified to allow for an OS value (windows-11-arm) which does not include the -latest postfix – by @finnagin.

    Related issues and pull requests on GitHub: #133.

  • Added CI for CPython 3.14 – by @kumaraditya303.

    Related issues and pull requests on GitHub: #140.


0.3.2

(2025-06-09)

Improved documentation

  • Fixed incorrect decorator usage in the ~propcache.api.under_cached_property example code – by @meanmail.

    Related issues and pull requests on GitHub: #109.

Packaging updates and notes for downstreams

  • Updated to use Cython 3.1 universally across the build path – by @lysnikolaou.

    Related issues and pull requests on GitHub: #117.

  • Made Cython line tracing opt-in via the with-cython-tracing build config setting – by @bdraco.

    Previously, line tracing was enabled by default in pyproject.toml, which caused build issues for some users and made wheels nearly twice as slow.

    Now line tracing is only enabled when explicitly requested via pip install . --config-setting=with-cython-tracing=true or by setting the PROPCACHE_CYTHON_TRACING environment variable.

    Related issues and pull requests on GitHub: #118.


0.3.1

(2025-03-25)

Bug fixes

  • Improved typing annotations, fixing some type errors under correct usage and improving typing robustness generally – by @Dreamsorcerer.

    Related issues and pull requests on GitHub: #103.


0.3.0

(2025-02-20)

Features

  • Implemented support for the free-threaded build of CPython 3.13 – by @lysnikolaou.

    Related issues and pull requests on GitHub: #84.

Packaging updates and notes for downstreams

  • Started building wheels for the free-threaded build of CPython 3.13 – by @lysnikolaou.

    Related issues and pull requests on GitHub: #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 that takes into account ABI stability and the exact version of Python runtime.

    Related issues and pull requests on GitHub: #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 and @markgreene74.

    Related commits on GitHub: 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.

    Related issues and pull requests on GitHub: #72.

Removals and backward incompatible breaking changes

  • Removed support for Python 3.8 as it has reached end of life – by @bdraco.

    Related issues and pull requests on GitHub: #57.

Packaging updates and notes for downstreams

  • Stopped implicitly allowing the use of Cython pre-release versions when building the distribution package – by @ajsanchezsanz and @markgreene74.

    Related commits on GitHub: 64df0a6.


0.2.0

(2024-10-07)

Bug fixes

  • Fixed loading the C-extensions on Python 3.8 – by @bdraco.

    Related issues and pull requests on GitHub: #26.

Features

  • Improved typing for the propcache.api.under_cached_property decorator – by @bdraco.

    Related issues and pull requests on GitHub: #38.

Improved documentation

  • Added API documentation for the propcache.api.cached_property and propcache.api.under_cached_property decorators – by @bdraco.

    Related issues and pull requests on GitHub: #16.

Packaging updates and notes for downstreams

  • Moved propcache.api.under_cached_property and propcache.api.cached_property to propcache.api – by @bdraco.

    Both decorators remain importable from the top-level package, however importing from propcache.api is now the recommended way to use them.

    Related issues and pull requests on GitHub: #19, #24, #32.

  • Converted project to use a src layout – by @bdraco.

    Related issues and pull requests on GitHub: #22, #29, #37.


0.1.0

(2024-10-03)

Features

  • Added armv7l wheels – by @bdraco.

    Related issues and pull requests on GitHub: #5.


0.0.0

(2024-10-02)

  • Initial release.

Wheel compatibility matrix

Platform CPython 3.9 CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython (additional flags: t) 3.13 CPython (additional flags: t) 3.14 Python 3
any
macosx_10_13_universal2
macosx_10_13_x86_64
macosx_10_9_universal2
macosx_10_9_x86_64
macosx_11_0_arm64
manylinux2014_aarch64
manylinux2014_ppc64le
manylinux2014_s390x
manylinux2014_x86_64
manylinux_2_17_aarch64
manylinux_2_17_ppc64le
manylinux_2_17_s390x
manylinux_2_17_x86_64
manylinux_2_28_aarch64
manylinux_2_28_ppc64le
manylinux_2_28_s390x
manylinux_2_28_x86_64
musllinux_1_2_aarch64
musllinux_1_2_armv7l
musllinux_1_2_ppc64le
musllinux_1_2_s390x
musllinux_1_2_x86_64
win32
win_amd64
win_arm64

Files in release

propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl (77.7KiB)
propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl (44.5KiB)
propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (46.2KiB)
propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (196.3KiB)
propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (204.6KiB)
propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (210.3KiB)
propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (192.2KiB)
propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl (188.7KiB)
propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl (186.1KiB)
propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl (195.4KiB)
propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl (196.1KiB)
propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl (188.5KiB)
propcache-0.4.1-cp310-cp310-win32.whl (37.2KiB)
propcache-0.4.1-cp310-cp310-win_amd64.whl (40.7KiB)
propcache-0.4.1-cp310-cp310-win_arm64.whl (37.3KiB)
propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl (78.3KiB)
propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl (44.7KiB)
propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (46.5KiB)
propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (209.9KiB)
propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (216.6KiB)
propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (222.8KiB)
propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (205.1KiB)
propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl (203.4KiB)
propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl (197.3KiB)
propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl (207.5KiB)
propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl (211.6KiB)
propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl (200.3KiB)
propcache-0.4.1-cp311-cp311-win32.whl (37.2KiB)
propcache-0.4.1-cp311-cp311-win_amd64.whl (40.7KiB)
propcache-0.4.1-cp311-cp311-win_arm64.whl (37.2KiB)
propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl (78.2KiB)
propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl (45.0KiB)
propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (46.2KiB)
propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (220.2KiB)
propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (224.8KiB)
propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (232.9KiB)
propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (216.4KiB)
propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl (211.7KiB)
propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl (208.0KiB)
propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl (215.2KiB)
propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl (221.7KiB)
propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl (210.6KiB)
propcache-0.4.1-cp312-cp312-win32.whl (37.2KiB)
propcache-0.4.1-cp312-cp312-win_amd64.whl (40.7KiB)
propcache-0.4.1-cp312-cp312-win_arm64.whl (36.9KiB)
propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl (75.9KiB)
propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl (43.7KiB)
propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl (45.2KiB)
propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (203.3KiB)
propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (206.3KiB)
propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (213.0KiB)
propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (199.7KiB)
propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl (194.7KiB)
propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl (192.3KiB)
propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl (199.0KiB)
propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl (201.1KiB)
propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl (194.8KiB)
propcache-0.4.1-cp313-cp313-win32.whl (36.7KiB)
propcache-0.4.1-cp313-cp313-win_amd64.whl (39.8KiB)
propcache-0.4.1-cp313-cp313-win_arm64.whl (36.3KiB)
propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl (79.5KiB)
propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl (45.3KiB)
propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl (47.3KiB)
propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (269.5KiB)
propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (267.4KiB)
propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (273.8KiB)
propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (257.1KiB)
propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl (255.1KiB)
propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl (242.1KiB)
propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl (256.6KiB)
propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl (257.3KiB)
propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl (251.7KiB)
propcache-0.4.1-cp313-cp313t-win32.whl (40.4KiB)
propcache-0.4.1-cp313-cp313t-win_amd64.whl (43.8KiB)
propcache-0.4.1-cp313-cp313t-win_arm64.whl (38.9KiB)
propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl (76.3KiB)
propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl (43.8KiB)
propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl (45.5KiB)
propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (202.1KiB)
propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (206.5KiB)
propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (210.3KiB)
propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (196.7KiB)
propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl (192.9KiB)
propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl (188.6KiB)
propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl (197.9KiB)
propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl (199.4KiB)
propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl (193.2KiB)
propcache-0.4.1-cp314-cp314-win32.whl (37.2KiB)
propcache-0.4.1-cp314-cp314-win_amd64.whl (40.3KiB)
propcache-0.4.1-cp314-cp314-win_arm64.whl (37.2KiB)
propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl (79.5KiB)
propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl (45.3KiB)
propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl (47.3KiB)
propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (269.2KiB)
propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (267.1KiB)
propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (273.5KiB)
propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (256.7KiB)
propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl (254.8KiB)
propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl (241.8KiB)
propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl (256.4KiB)
propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl (257.0KiB)
propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl (251.4KiB)
propcache-0.4.1-cp314-cp314t-win32.whl (41.5KiB)
propcache-0.4.1-cp314-cp314t-win_amd64.whl (45.2KiB)
propcache-0.4.1-cp314-cp314t-win_arm64.whl (39.5KiB)
propcache-0.4.1-cp39-cp39-macosx_10_9_universal2.whl (78.4KiB)
propcache-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl (44.8KiB)
propcache-0.4.1-cp39-cp39-macosx_11_0_arm64.whl (46.5KiB)
propcache-0.4.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (196.4KiB)
propcache-0.4.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (204.9KiB)
propcache-0.4.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (210.5KiB)
propcache-0.4.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (192.6KiB)
propcache-0.4.1-cp39-cp39-musllinux_1_2_aarch64.whl (188.9KiB)
propcache-0.4.1-cp39-cp39-musllinux_1_2_armv7l.whl (186.2KiB)
propcache-0.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl (195.6KiB)
propcache-0.4.1-cp39-cp39-musllinux_1_2_s390x.whl (196.2KiB)
propcache-0.4.1-cp39-cp39-musllinux_1_2_x86_64.whl (188.7KiB)
propcache-0.4.1-cp39-cp39-win32.whl (37.4KiB)
propcache-0.4.1-cp39-cp39-win_amd64.whl (40.9KiB)
propcache-0.4.1-cp39-cp39-win_arm64.whl (37.5KiB)
propcache-0.4.1-py3-none-any.whl (13.0KiB)
propcache-0.4.1.tar.gz (45.4KiB)
No dependencies