Skip to content

gh-158093: Add concurrent test for set.pop() method - #158107

Open
CaQtiml wants to merge 1 commit into
python:mainfrom
CaQtiml:test-concurrent-set-pop
Open

CaQtiml wants to merge 1 commit into
python:mainfrom
CaQtiml:test-concurrent-set-pop

Conversation

@CaQtiml

@CaQtiml CaQtiml commented Sep 24, 2026 •

Copy link
Copy Markdown

Add a case for multiple threads calling set.pop() on the same set. The test checks that all original items are returned exactly once and the set ends up empty.

I only see a test for normal usage (Lib/test/test_set.py), but I do not see any case testing .pop concurrently, so I believe this case will add coverage for free-threaded Python.

Testing

  • make patchcheck
  • ./python.exe -B -X gil=0 -m test test_free_threading.test_set

@python-cla-bot

python-cla-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Sep 24, 2026
@bedevere-app

bedevere-app Bot commented Sep 24, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant