Skip to content
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

Skip non-string values from sysconfig.get_config_vars() #3070

Merged
merged 3 commits into from
Feb 2, 2022
Merged

Skip non-string values from sysconfig.get_config_vars() #3070

merged 3 commits into from
Feb 2, 2022

Conversation

domdfcoding
Copy link
Contributor

Summary of changes

sysconfig.get_config_vars() can return values which are not strings (including integers), but the current code assumes all values are strings. This results in an AttributeError. Adding a check for non-string values and skipping them avoids the error.

Closes #3063

Pull Request Checklist

@jaraco
Copy link
Member

jaraco commented Feb 2, 2022

Normally, I'd ask for a test, but since this is easy_install and deprecated, I'm happy to just push forward with a fix. I'll finish up the draft with a changelog entry and maybe a tweak to the implementation.

@jaraco jaraco self-assigned this Feb 2, 2022
@jaraco jaraco marked this pull request as ready for review February 2, 2022 01:13
@jaraco jaraco merged commit dc342bb into pypa:main Feb 2, 2022
@datumbox
Copy link

datumbox commented Feb 2, 2022

@domdfcoding Thanks for issuing a patch.

@jaraco Are there plans for releasing a hotfix or this is unlikely? The latest version of setuptools brake a couple of jobs downstream on PyTorch and I would like to know if a new version is coming or pin to the previous one. Thanks!

@abravalheri
Copy link
Contributor

abravalheri commented Feb 2, 2022

@datumbox there was some hick-up with the CI (sometimes PyPy on Windows fails to allocate enough memory), but there should be a release out: https://github.com/pypa/setuptools/releases/tag/v60.7.0.

Please let us know how it goes :)

Thank you very much @domdfcoding for investigating the issue and providing a fix!

@datumbox
Copy link

datumbox commented Feb 2, 2022

@abravalheri Yes, that worked! Our CI just "saw" the new version and the failure is now resolved. Thanks a lot for the help!

bocklund added a commit to bocklund/pycalphad that referenced this pull request Feb 2, 2022
pypa/setuptools#3070 is fixes the pypa/setuptools#3063 in setuptools 60.6.0 and 60.7.0 is available now.
bocklund added a commit to pycalphad/pycalphad that referenced this pull request Feb 2, 2022
@domdfcoding domdfcoding deleted the isue-3063 branch June 9, 2022 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

easy_install doesn't handle sysconfig vars being integers.
4 participants