Skip to content

Commit d24394f

Browse files
[zlib] Add ZLIBNG_VERSION (#14513)
Co-authored-by: Brian Schubert <[email protected]>
1 parent 7c6de4b commit d24394f

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

stdlib/@tests/stubtest_allowlists/win32-py314.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# ====================================================================
2-
# TODO: New errors in Python 3.14 that need to be fixed or moved below
3-
# ====================================================================
4-
5-
compression.zlib.ZLIBNG_VERSION
6-
zlib.ZLIBNG_VERSION
7-
8-
91
# =======
102
# >= 3.12
113
# =======

stdlib/zlib.pyi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ from typing import Any, Final, final, type_check_only
44
from typing_extensions import Self
55

66
DEFLATED: Final = 8
7-
DEF_MEM_LEVEL: int # can change
7+
DEF_MEM_LEVEL: Final[int]
88
DEF_BUF_SIZE: Final = 16384
9-
MAX_WBITS: int
10-
ZLIB_VERSION: str # can change
11-
ZLIB_RUNTIME_VERSION: str # can change
9+
MAX_WBITS: Final[int]
10+
ZLIB_VERSION: Final[str]
11+
ZLIB_RUNTIME_VERSION: Final[str]
1212
Z_NO_COMPRESSION: Final = 0
1313
Z_PARTIAL_FLUSH: Final = 1
1414
Z_BEST_COMPRESSION: Final = 9
@@ -26,6 +26,10 @@ Z_RLE: Final = 3
2626
Z_SYNC_FLUSH: Final = 2
2727
Z_TREES: Final = 6
2828

29+
if sys.version_info >= (3, 14) and sys.platform == "win32":
30+
# Available when zlib was built with zlib-ng, usually only on Windows
31+
ZLIBNG_VERSION: Final[str]
32+
2933
class error(Exception): ...
3034

3135
# This class is not exposed at runtime. It calls itself zlib.Compress.

0 commit comments

Comments
 (0)