Skip to content

bpo-30871: pythoninfo: add expat and _decimal #3121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2017
Merged
Changes from all commits
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
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