numcodecs
numcodecs copied to clipboard
classmethod properties are removed in Python 3.13
Problem description
This was added in #519: https://github.com/zarr-developers/numcodecs/blob/696e58253494f4ffb21f4d3ca30e298b22c1c929/numcodecs/zstd.pyx#L261-L277
However, as of Python 3.11, using classmethod on property was deprecated, and has been removed in Python 3.13:
https://docs.python.org/3.13/library/functions.html#classmethod
Deprecated since version 3.11, removed in version 3.13: Class methods can no longer wrap other descriptors such as property().
This causes tests to fail on Python 3.13:
____________________________ test_native_functions _____________________________
def test_native_functions():
# Note, these assertions might need to be changed for new versions of zstd
> assert Zstd.default_level == 3
E AssertionError: assert <bound method default_level of <class 'numcodecs.zstd.Zstd'>> == 3
E + where <bound method default_level of <class 'numcodecs.zstd.Zstd'>> = Zstd.default_level
../../BUILDROOT/usr/lib64/python3.13/site-packages/numcodecs/tests/test_zstd.py:93: AssertionError
https://kojipkgs.fedoraproject.org/work/tasks/9111/120819111/build.log
Version and installation information
Please provide the following:
- Value of
numcodecs.__version__0.13.0 - Version of Python interpreter 3.13.0b3
- Operating system (Linux/Windows/Mac) Fedora Rawhide
- How NumCodecs was installed (e.g., "using pip into virtual environment", or "using conda") from source