cpython/Lib/test/test_free_threading
Neil Schemenauer fc5a0dc224
gh-127271: Replace use of PyCell_GET/SET (gh-127272)
* Replace uses of `PyCell_GET` and `PyCell_SET`.  These macros are not
  safe to use in the free-threaded build.  Use `PyCell_GetRef()` and
  `PyCell_SetTakeRef()` instead. 

* Since `PyCell_GetRef()` returns a strong rather than borrowed ref, some
  code restructuring was required, e.g. `frame_get_var()` returns a strong
  ref now.

* Add critical sections to `PyCell_GET` and `PyCell_SET`.

* Move critical_section.h earlier in the Python.h file.

* Add `PyCell_GET` to the free-threading howto table of APIs that return
  borrowed refs.

* Add additional unit tests for free-threading.
2024-12-03 10:33:06 -08:00
..
__init__.py gh-120659: Skip `test_freethreading` with GIL (#120660) 2024-06-18 15:56:20 +02:00
test_code.py gh-127020: Make `PyCode_GetCode` thread-safe for free threading (#127043) 2024-11-21 11:00:50 -05:00
test_dict.py gh-124470: Fix crash when reading from object instance dictionary while replacing it (#122489) 2024-11-21 10:41:19 -06:00
test_gc.py gh-125859: Fix crash when `gc.get_objects` is called during GC (#125882) 2024-10-24 09:33:11 -04:00
test_list.py gh-124402: Speed up test_free_threading and test_super (#124491) 2024-09-26 10:53:17 +02:00
test_monitoring.py gh-124402: Speed up test_free_threading and test_super (#124491) 2024-09-26 10:53:17 +02:00
test_races.py gh-127271: Replace use of PyCell_GET/SET (gh-127272) 2024-12-03 10:33:06 -08:00
test_slots.py gh-117657: TSAN Fix races in `PyMember_Get` and `PyMember_Set` for C extensions (GH-123211) 2024-12-03 09:41:53 -05:00
test_str.py gh-120417: Remove unused imports in tests (part 2) (#120630) 2024-06-17 21:05:37 +02:00
test_tokenize.py gh-120317: Lock around global state in the tokenize module (#120318) 2024-07-16 11:35:57 +02:00
test_type.py gh-127316: fix incorrect assertion in setting `__class__` in free-threading (#127399) 2024-11-29 21:44:20 +05:30
test_zip.py gh-123271: Make builtin zip method safe under free-threading (#123272) 2024-08-27 15:22:43 -04:00