-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
"SO" config var not getting set #63754
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
Comments
I just installed Python 3.0a4 from source on an Ubuntu system and noticed that it doesn't seem to set the distutils.sysconfig config var: "SO":
This worked fine for me in Python 3.3:
|
Indeed, this happens for me too in default head. |
Never mind, this is an intentional change:
Although this does introduce some backward compatibility issues. Perhaps sysconfig.get_config_var('SO') should be deprecated in 3.4 and removed in 3.5. |
Thanks Barry, for tracking down that this is intentional. I wonder how one gets this value in Python code now? For example, the reason I stumbled upon this in the first place is that there is some code in PyCrypto (https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/SelfTest/PublicKey/test_RSA.py#L464) that uses
What would be the way to express this now in Python >= 3.4? |
Here's a patch, sans NEWS and any docs. |
Note that obviously the DeprecationWarning is not raised if you do sysconfig.get_config_vars()['SO'] but it still gets mapped to EXT_SUFFIX in that case. |
On Nov 11, 2013, at 06:27 PM, Marc Abramowitz wrote:
For now, use sysconfig.get_config_var('EXT_SUFFIX') though if no one objects |
New changeset fedc2b8fbb6e by Barry Warsaw in branch 'default':
|
Test is failing on Windows: ====================================================================== Traceback (most recent call last):
File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_sysconfig.py", line 388, in test_SO_in_vars
self.assertIsNotNone(vars['SO'])
KeyError: 'SO' ====================================================================== Traceback (most recent call last):
File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_sysconfig.py", line 382, in test_SO_value
sysconfig.get_config_var('EXT_SUFFIX'))
AssertionError: None != '.pyd' |
New changeset 331b7a8bb830 by Barry Warsaw in branch 'default': |
New changeset 8a130fd92255 by Barry Warsaw in branch 'default': |
New changeset ac2ee9fc353a by R David Murray in branch 'default': |
Per @warsaw in python#63754, this was deprecated in Python 3.4 and was suggested for removal in Python 3.5.
* Removes SO config variable in sysconfig Per @warsaw in #63754, this was deprecated in Python 3.4 and was suggested for removal in Python 3.5. * Add NEWS * Update Misc/NEWS.d/next/Library/2022-04-18-15-23-24.gh-issue-91670.6eyChw.rst Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Barry Warsaw <barry@python.org> Co-authored-by: Éric <merwok@netwok.org>
sysconfig.get_config_var('SO') isn't consistently set. Causes "cannot import name '_RNA' from partially initialized module 'RNA'" as PYTHON3_SO becomes "None". See: python/cpython#63754
distutils.sysconfig.get_config_var('SO') was deprecated in python 3.4, and is unset in python 3.11.0. Causes PYTHON3_SO=None -> _RNA.so builds as "_RNANone" -> build failure: ``` ImportError: cannot import name '_RNA' from partially initialized module 'RNA' ``` See: python/cpython#60958, python/cpython#63754 and [deprecation notice here](https://github.com/python/cpython/blob/dd53b79de0ea98af6a11481217a961daef4e9774/Doc/whatsnew/3.4.rst#deprecations-in-the-python-api). Further, module [distutils](https://docs.python.org/3/library/distutils.html) is deprecated, and has planned removal in 3.12. Functions get_python_inc, get_python_lib are removed, see: python/cpython#92584.
distutils.sysconfig.get_config_var('SO') was deprecated in python 3.4, and is unset in python 3.11.0. Causes PYTHON3_SO=None -> _RNA.so builds as "_RNANone" -> build failure: ``` ImportError: cannot import name '_RNA' from partially initialized module 'RNA' ``` See: python/cpython#60958, python/cpython#63754 and [deprecation notice here](https://github.com/python/cpython/blob/dd53b79de0ea98af6a11481217a961daef4e9774/Doc/whatsnew/3.4.rst#deprecations-in-the-python-api). Also, module [distutils](https://docs.python.org/3/library/distutils.html) is deprecated and has planned removal in 3.12. Functions get_python_inc, get_python_lib are removed, see: python/cpython#92584.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: