Conversation
|
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 |
79dfe0a to
c646e65
Compare
|
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 |
|
I add following tests.
I decided to omit tests for So, what I added tests AI Disclosure: I used Codex to help implement tests, but I verified all test cases manually. I wrote this comment myself; AI was only used to fix grammar. |
…ed-target and opposing-target update operations.
b9e8945 to
1cac88d
Compare
Add a case for multiple threads callingset.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.popconcurrently, so I believe this case will add coverage for free-threaded Python.Add more test coverage for concurrent operations on built-in sets.
The tests cover concurrent calls to
pop(),add(),remove(),discard(),copy(),clear(),update(),difference_update(), andsymmetric_difference_update(). You can see more details in a comment below.Testing
make patchcheck./python.exe -B -X gil=0 -m test test_free_threading.test_set