diff options
author | Barry Warsaw <barry@python.org> | 2013-11-21 18:57:14 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2013-11-21 18:57:14 -0500 |
commit | 910172508d9db10784f5dc8489648a7fad756d40 (patch) | |
tree | 42f5e6111de808a425efaa363651f487087bae30 /Lib/sysconfig.py | |
parent | 92f1a45e09e2bbd93a405bcfcc0988633ffeec31 (diff) | |
download | cpython-910172508d9db10784f5dc8489648a7fad756d40.tar.gz |
- Issue #19555: Restore sysconfig.get_config_var('SO'), with a
DeprecationWarning pointing people at $EXT_SUFFIX.
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r-- | Lib/sysconfig.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 776b2f6404..c4f7cab174 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -409,6 +409,10 @@ def _init_posix(vars): # _sysconfigdata is generated at build time, see _generate_posix_vars() from _sysconfigdata import build_time_vars vars.update(build_time_vars) + # For backward compatibility, see issue19555 + SO = build_time_vars.get('EXT_SUFFIX') + if SO is not None: + vars['SO'] = SO def _init_non_posix(vars): """Initialize the module as appropriate for NT""" @@ -579,6 +583,9 @@ def get_config_var(name): Equivalent to get_config_vars().get(name) """ + if name == 'SO': + import warnings + warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) return get_config_vars().get(name) |