6 Commits

Author SHA1 Message Date
Jeong, YunWon
019e754055 Fix __set_name__ error handling to match Python 3.12+ (#6937)
Changed type.rs to add notes to original exceptions instead of
wrapping them in RuntimeError, following PEP 678 (gh-77757).

This allows enum.py's exception handling to work correctly when
super().__new__() is misused in Enum subclasses, enabling the
proper TypeError to propagate instead of being hidden behind
a RuntimeError wrapper.

Fixes test_bad_new_super test case.
2026-02-02 08:11:26 +09:00
Shahar Naveh
51701ab2a4 Update class related tests from 3.14.2 (#6900)
* Update `test_class` from 3.14.2

* Update test_genericclass

* Update test_subclassinit

* Add test_metaclass

* Patch `test_class`

* Patch test_subclassinit

* Patch `test_metaclass`

----

Co-authored-by: CPython Developers <>
2026-01-30 22:38:49 +09:00
Noah
db282446f0 Unskip/fix tests in test_subclassinit 2021-02-15 21:39:43 -06:00
Noah
1e68e8bfcf Unmark fixed tests 2020-10-07 19:33:13 -05:00
Bolun Thompson
bb433bfd51 Mark expected failures and skipped tests 2020-07-20 20:13:49 -07:00
Bolun Thompson
8e52c29e3b Add test_subclassinit.py from CPython 3.8.5 2020-07-20 20:12:43 -07:00