Skip to content

gh-99201: fix IndexError when initializing sysconfig config variables #99274

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 1 commit into from
Nov 19, 2022

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Nov 9, 2022

@FFY00
Copy link
Member Author

FFY00 commented Nov 9, 2022

@philthompson10, can you confirm this fixes your issue?

@philthompson10
Copy link

philthompson10 commented Nov 9, 2022 via email

@FFY00
Copy link
Member Author

FFY00 commented Nov 10, 2022

The existence of EXT_SUFFIX is not guaranteed, as it is not documented anywhere. People expecting it to be there is the reason why I think we shouldn't set it at all. Returning None will make code that uses the string value of the returned object misbehave (eg. f'my_extension{sysconfig.get_config_var("EXT_SUFFIX")}' will be my_extensionNone), so raising a KeyError in these situations is more desirable.

@FFY00 FFY00 merged commit b0e1f9c into python:main Nov 19, 2022
@FFY00 FFY00 deleted the gh-99201 branch November 19, 2022 20:47
@FFY00 FFY00 restored the gh-99201 branch August 8, 2023 01:28
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.

3 participants