Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-30871: pythoninfo: add expat and _decimal (#3121)
* bpo-30871: pythoninfo: add expat and _decimal

* Remove _decimal.__version__

The string is hardcoded, not really interesting.

(cherry picked from commit f6ebd83)
  • Loading branch information
vstinner committed Aug 21, 2017
commit 3caaa508909b4ed6c6d2bb26ecf20f983b67b543
22 changes: 22 additions & 0 deletions Lib/test/pythoninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,26 @@ def collect_zlib(info_add):
copy_attributes(info_add, zlib, 'zlib.%s', attributes)


def collect_expat(info_add):
try:
from xml.parsers import expat
except ImportError:
return

attributes = ('EXPAT_VERSION',)
copy_attributes(info_add, expat, 'expat.%s', attributes)


def collect_decimal(info_add):
try:
import _decimal
except ImportError:
return

attributes = ('__libmpdec_version__',)
copy_attributes(info_add, _decimal, '_decimal.%s', attributes)


def collect_info(info):
error = False
info_add = info.add
Expand All @@ -365,6 +385,8 @@ def collect_info(info):
collect_time,
collect_tkinter,
collect_zlib,
collect_expat,
collect_decimal,
):
try:
collect_func(info_add)
Expand Down