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

gh-130095: Mark _py_abc tests as not thread-safe #130131

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Feb 14, 2025

The _py_abc implementation is not currently thread-safe (even with the GIL). Don't run these tests with --parallel-threads=N for now.

The `_py_abc` implementation is not currently thread-safe (even with the GIL).
Don't run these tests with `--parallel-threads=N` for now.
@colesbury colesbury added tests Tests in the Lib/test dir skip news labels Feb 14, 2025
@colesbury colesbury requested review from mpage and picnixz February 14, 2025 19:07
@colesbury colesbury marked this pull request as ready for review February 14, 2025 19:07
@colesbury
Copy link
Contributor Author

Comment on lines +687 to +690
TestLegacyAPI_Py, TestABC_Py, TestABCWithInitSubclass_Py = test_factory(_py_abc.ABCMeta,
_py_abc.get_cache_token)
TestLegacyAPI_C, TestABC_C, TestABCWithInitSubclass_C = test_factory(abc.ABCMeta,
abc.get_cache_token)
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the original version constructed the _Py variants using test_factory(abc.ABCMeta, abc.get_cache_token) and the _C variants using test_factory(_py_abc.ABCMeta, _py_abc.get_cache_token). This PR does the inverse. Was the original wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the variables were misnamed. Previously, TestLegacyAPI_Py was testing the C implementation and TestLegacyAPI_C was testing the Python implementation.

@colesbury colesbury merged commit 39cd972 into python:main Feb 14, 2025
48 checks passed
@colesbury colesbury deleted the gh-130095-skip-pyabc branch February 14, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants