Skip to content

Conversation

@dalcinl
Copy link
Contributor

@dalcinl dalcinl commented Oct 2, 2025

After the changes in #164, listing Py_XDECREF as an allowed symbol is no longer necessary. Py_XDECREF is static inline and if a symbol is produced (depending on C compiler optimization), it is a local symbol.

With this PR, the current list of allowed symbols becomes empty. I was not sure whether to remove it or keep it in case it is needed in the future. I sided for the second option and added a test (using some monkeypatching, hope that's OK). If you guys feel otherwise, then I can drop the last commit and push a new one removing the _ALLOWED_SYMBOLS list.

cc @isuruf for viz as the author of #164

@woodruffw
Copy link
Member

Thanks @dalcinl! Sorry for the delayed response.

With this PR, the current list of allowed symbols becomes empty. I was not sure whether to remove it or keep it in case it is needed in the future. I sided for the second option and added a test (using some monkeypatching, hope that's OK). If you guys feel otherwise, then I can drop the last commit and push a new one removing the _ALLOWED_SYMBOLS list.

Yeah, let's just remove the constant entirely -- I think that's cleaner than monkey patching here 🙂

@dalcinl
Copy link
Contributor Author

dalcinl commented Nov 18, 2025

@woodruffw I've updated the PR accordingly. I still used a separate commit for the removal of _ALLOWED_SYMBOLS, just in case this thing is ever needed again in the future, then git revert can easily reinstate the thing.

Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@woodruffw woodruffw merged commit 51a5b8c into pypa:main Nov 18, 2025
10 checks passed
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.

2 participants