Skip to content

Commit 15ca0b9

Browse files
Use values of READ and WRITE from the gzip module
These changed from integers to mode strings in Python 3.13, and we need to remain consistent with the standard library. Fixes #44. Reference: https://docs.python.org/3.13/library/gzip.html#gzip.GzipFile.mode
1 parent 8373d7d commit 15ca0b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zlib_ng/gzip_ng.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
READ_BUFFER_SIZE = 512 * 1024
4242

4343
FTEXT, FHCRC, FEXTRA, FNAME, FCOMMENT = 1, 2, 4, 8, 16
44-
READ, WRITE = 1, 2
44+
READ, WRITE = gzip.READ, gzip.WRITE
4545

4646
BadGzipFile = gzip.BadGzipFile # type: ignore
4747

0 commit comments

Comments
 (0)