mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
bpo-33901: Add _gdbm._GDBM_VERSION (GH-7794)
* Fix also PyInit__gdbm() to catch errors. * test.pythoninfo: add gdbm.version * test_dbm_gnu now logs GDBM_VERSION when run in verbose mode. * pythoninfo: rename function to collect_gdbm()
This commit is contained in:
parent
06fe77a84b
commit
00f9edb98d
3 changed files with 53 additions and 9 deletions
|
@ -525,6 +525,15 @@ def collect_cc(info_add):
|
|||
info_add('CC.version', text)
|
||||
|
||||
|
||||
def collect_gdbm(info_add):
|
||||
try:
|
||||
import _gdbm
|
||||
except ImportError:
|
||||
return
|
||||
|
||||
info_add('gdbm.GDBM_VERSION', '.'.join(map(str, _gdbm._GDBM_VERSION)))
|
||||
|
||||
|
||||
def collect_info(info):
|
||||
error = False
|
||||
info_add = info.add
|
||||
|
@ -552,6 +561,7 @@ def collect_info(info):
|
|||
collect_testcapi,
|
||||
collect_resource,
|
||||
collect_cc,
|
||||
collect_gdbm,
|
||||
|
||||
# Collecting from tests should be last as they have side effects.
|
||||
collect_test_socket,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue