Skip to content

Commit 46d7c11

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

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Lib/test/pythoninfo.py

Lines 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.
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy