Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 46d7c11

Browse filesBrowse files
gh-132983: Add zstd version info to test.pythoninfo (#134230)
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent a7f317d commit 46d7c11
Copy full SHA for 46d7c11

File tree

2 files changed

+12
-0
lines changed
Filter options

2 files changed

+12
-0
lines changed

‎Lib/test/pythoninfo.py

Copy file name to clipboardExpand all lines: Lib/test/pythoninfo.py
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,16 @@ def collect_zlib(info_add):
658658
copy_attributes(info_add, zlib, 'zlib.%s', attributes)
659659

660660

661+
def collect_zstd(info_add):
662+
try:
663+
import _zstd
664+
except ImportError:
665+
return
666+
667+
attributes = ('zstd_version',)
668+
copy_attributes(info_add, _zstd, 'zstd.%s', attributes)
669+
670+
661671
def collect_expat(info_add):
662672
try:
663673
from xml.parsers import expat
@@ -1051,6 +1061,7 @@ def collect_info(info):
10511061
collect_tkinter,
10521062
collect_windows,
10531063
collect_zlib,
1064+
collect_zstd,
10541065
collect_libregrtest_utils,
10551066

10561067
# Collecting from tests should be last as they have side effects.
+1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.