Skip to content

Commit a0600c3

Browse files
Add zstd info
1 parent d55e11b commit a0600c3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Lib/test/pythoninfo.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,14 @@ def collect_zlib(info_add):
657657
attributes = ('ZLIB_VERSION', 'ZLIB_RUNTIME_VERSION', 'ZLIBNG_VERSION')
658658
copy_attributes(info_add, zlib, 'zlib.%s', attributes)
659659

660+
def collect_zstd(info_add):
661+
try:
662+
import _zstd
663+
except ImportError:
664+
return
665+
666+
attributes = ('zstd_version',)
667+
copy_attributes(info_add, _zstd, 'zstd.%s', attributes)
660668

661669
def collect_expat(info_add):
662670
try:
@@ -1051,6 +1059,7 @@ def collect_info(info):
10511059
collect_tkinter,
10521060
collect_windows,
10531061
collect_zlib,
1062+
collect_zstd,
10541063
collect_libregrtest_utils,
10551064

10561065
# Collecting from tests should be last as they have side effects.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :mod:`compression.zstd` version information to ``test.pythoninfo``.

0 commit comments

Comments
 (0)