GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-130095: Mark `_py_abc` tests as not thread-safe by colesbury · Pull Request #130131 · python/cpython

Conversation

@colesbury

@colesbury colesbury commented Feb 14, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • Issue: _py_abc Python implementation of abc is not thread-safe #130095

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@colesbury
pythongh-130095: Mark _py_abc tests as not thread-safe
e880c6e
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
@bedevere-app bedevere-app Bot mentioned this pull request Feb 14, 2025
_py_abc Python implementation of abc is not thread-safe #130095
Open
@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
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 14, 2025
@colesbury

colesbury commented Feb 14, 2025

Copy link
Copy Markdown
Contributor Author

Tested with https://gist.github.com/colesbury/2097d1bb56d24d18cbbdfb3c897f1290

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mpage
mpage reviewed Feb 14, 2025
View reviewed changes
Comment thread Lib/test/test_abc.py
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)

@mpage mpage Feb 14, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@colesbury colesbury Feb 14, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mpage
mpage approved these changes Feb 14, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Feb 14, 2025
picnixz
picnixz approved these changes Feb 14, 2025
View reviewed changes
@colesbury
colesbury merged commit 39cd972 into python:main Feb 14, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 14, 2025
@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

Reviewers

@mpage mpage mpage approved these changes
@picnixz picnixz picnixz approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@colesbury @mpage @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.