File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ Release notes
11
11
Unreleased
12
12
----------
13
13
14
+ Breaking changes
15
+ ~~~~~~~~~~~~~~~~
16
+ * `Zstd.default_level `, `Zstd.min_level `, and `Zstd.max_level ` are now class methods
17
+ instead of properties. This means they must now be called like ``Zstd.default_level() ``
18
+ instead of ``Zstd.default_level ``. This breaking change has been made because Python 3.13
19
+ removes support for class properties.
20
+ By :user: `David Stansby <dstansby> `
21
+
14
22
Enhancements
15
23
~~~~~~~~~~~~
16
24
Original file line number Diff line number Diff line change @@ -90,6 +90,6 @@ def test_checksum():
90
90
91
91
def test_native_functions ():
92
92
# Note, these assertions might need to be changed for new versions of zstd
93
- assert Zstd .default_level == 3
94
- assert Zstd .min_level == - 131072
95
- assert Zstd .max_level == 22
93
+ assert Zstd .default_level () == 3
94
+ assert Zstd .min_level () == - 131072
95
+ assert Zstd .max_level () == 22
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ cdef extern from "zstd.h":
28
28
29
29
ZSTD_CCtx* ZSTD_createCCtx() nogil
30
30
size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx) nogil
31
- size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx,
32
- ZSTD_cParameter param,
31
+ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx,
32
+ ZSTD_cParameter param,
33
33
int value) nogil
34
34
35
35
size_t ZSTD_compress2(ZSTD_CCtx* cctx,
@@ -235,7 +235,7 @@ class Zstd(Codec):
235
235
"""
236
236
237
237
codec_id = ' zstd'
238
-
238
+
239
239
# Note: unlike the LZ4 and Blosc codecs, there does not appear to be a (currently)
240
240
# practical limit on the size of buffers that Zstd can process and so we don't
241
241
# enforce a max_buffer_size option here.
@@ -259,19 +259,16 @@ class Zstd(Codec):
259
259
return r
260
260
261
261
@classmethod
262
- @property
263
262
def default_level (cls ):
264
263
""" Returns the default compression level of the underlying zstd library."""
265
264
return ZSTD_defaultCLevel()
266
265
267
266
@classmethod
268
- @property
269
267
def min_level (cls ):
270
268
""" Returns the minimum compression level of the underlying zstd library."""
271
269
return ZSTD_minCLevel()
272
270
273
271
@classmethod
274
- @property
275
272
def max_level (cls ):
276
273
""" Returns the maximum compression level of the underlying zstd library."""
277
274
return ZSTD_maxCLevel()
You can’t perform that action at this time.
0 commit comments