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 tests using thread-unsafe constructs on free-threaded build #4476

Merged
merged 2 commits into from
Aug 24, 2024

Conversation

ngoldbaum
Copy link
Contributor

This skips tests that rely on setting sys.unraisablehook and tests that use warnings.catch_warnings.

Setting anything on the sys module is overriding global state, so it fundamentally isn't thread safe. An alternative would be to make it so any test that uses UnraisableCapture needs to acquire a mutex first. Happy to do that if anyone is uncomfortable with skipping tests.

Unfortunately there isn't a similar workaround for tests relying on catch_warnings, it's fundamentally not thread safe, as mentioned in the docs for it.

@ngoldbaum ngoldbaum added the CI-skip-changelog Skip checking changelog entry label Aug 23, 2024
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidhewitt davidhewitt added this pull request to the merge queue Aug 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 24, 2024
@ngoldbaum
Copy link
Contributor Author

Test failures in the merge queue are because of #4447 I think.

@davidhewitt davidhewitt added this pull request to the merge queue Aug 24, 2024
Merged via the queue into PyO3:main with commit 1c98858 Aug 24, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants