[3.13] gh-129967: Fix race condition in `repr(set)` (gh-129978) (gh-130020)
The call to `PySequence_List()` could temporarily unlock and relock the
set, allowing the items to be cleared and return the incorrect
notation `{}` for a empty set (it should be `set()`).
(cherry picked from commit a7427f2db937adb4c787754deb4c337f1894fe86)
Co-authored-by: T. Wouters <thomas@python.org> S
Sam Gross committed
ee12a3482dc8ef06dc2851b5ea074de123a5e02a
Parent: 3679083
Committed by GitHub <noreply@github.com>
on 2/11/2025, 11:18:12 PM