Skip to content

[3.13] gh-137463: Update validate_abstract_methods in test_collections.py (GH-137464) #137516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2,625 commits into from

Conversation

guilhermeleobas
Copy link
Contributor

@guilhermeleobas guilhermeleobas commented Aug 7, 2025

The test for missing abstract methods in validate_abstract_methods incorrectly attempted to instantiate the generated class C with an argument (C(name)), which always raises a TypeError: C() takes no arguments. Although the test originally passes, it passes for the wrong reason.

This change makes the test correctly validate the enforcement of abstract methods in ABCs.


📚 Documentation preview 📚: https://cpython-previews--137516.org.readthedocs.build/

serhiy-storchaka and others added 30 commits June 6, 2025 13:16
…f comment in the doc. (pythonGH-135181) (python#135211)

feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (pythonGH-135181)

Giving the right example incitates the tutorial readers to do the same in the future.
(cherry picked from commit 3431828)

Co-authored-by: Jean-Louis GUENEGO <[email protected]>
…asm_tr…ampoline.S (pythonGH-128606) (pythonGH-135077)" (pythonGH-135175) (pythonGH-135203)

[3.14] pythongh-128605: Revert "Add branch protections for x86_64 in asm_tr…ampoline.S (pythonGH-128606) (pythonGH-135077)" (pythonGH-135175)

This reverts commit 899cca6,
which broke buildbots.
(cherry picked from commit b477e21)

Co-authored-by: Petr Viktorin <[email protected]>
…onGH-131640) (pythonGH-135221)

Docs: Update `PyExc_*` tables in the c-api documentation (pythonGH-131640)

Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
(cherry picked from commit f00512d)

Co-authored-by: Yuki Kobayashi <[email protected]>
…ser.get_address (pythonGH-134194) (python#135192)

pythongh-134155: fix AttributeError in email._header_value_parser.get_address (pythonGH-134194)

Append the defect to defects instead of to the parse tree.
(cherry picked from commit d9cad07)

Co-authored-by: Sergey Miryanov <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
…xxlimited (pythonGH-135174) (pythonGH-135214)

pythongh-134160: Use PyModuleDef.m_free in the example module xxlimited (pythonGH-135174)
(cherry picked from commit 1adca08)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: neonene <[email protected]>
… when sorting RFC 2231 continuations (pythonGH-134687) (python#135248)

pythongh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (pythonGH-134687)

- Fix sorting logic in `email.utils.decode_params` to handle None values.
- Update tests for RFC 2231 continuation sorting.
(cherry picked from commit bcb6b45)

Co-authored-by: Jiucheng(Oliver) <[email protected]>
…d by `s[i]` (pythonGH-134977) (python#135259)

pythongh-134976: document the exception type that can be raised by `s[i]` (pythonGH-134977)
(cherry picked from commit 158e516)

Co-authored-by: Yongzi Li <[email protected]>
…H-135275) (python#135281)

pythongh-135263: Fix typo in token.NAME documentation (pythonGH-135275)
(cherry picked from commit 8d17a41)

Co-authored-by: Vladyslav Lazoryk <[email protected]>
…GH-135277) (python#135279)

* pythongh-135276: Refresh `zipfile.Path` from zipp 3.23 (pythonGH-135277)

Apply changes from zipp 3.23
(cherry picked from commit 8d6eb0c)

Co-authored-by: Jason R. Coombs <[email protected]>

* Removed features slated for Python 3.15 only.

---------

Co-authored-by: Jason R. Coombs <[email protected]>
…5286)

Use f-strings in csv docs example (pythonGH-135245)
(cherry picked from commit 2677dd0)

Co-authored-by: Ezio Melotti <[email protected]>
…nGH-134048) (python#135334)

[3.13] pythongh-133157: fix UBSan failures in `Parser/pegen.c` (pythonGH-134048)
(cherry picked from commit 754e7c9)
…_US.UTF-8' (pythonGH-135347) (pythonGH-135350)

(cherry picked from commit 0f866cb)

Co-authored-by: Serhiy Storchaka <[email protected]>
…poline.S (python#128606) (python#135353)

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
…G argument > 0x7fffffff in pickle (pythonGH-135322) (pythonGH-135383)

(cherry picked from commit 2b8b477)

Co-authored-by: Justin Applegate <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
…unMain handle SystemExit (pythonGH-135337) (python#135395)

pythongh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (pythonGH-135337)
(cherry picked from commit b706ff0)

Co-authored-by: Malcolm Smith <[email protected]>
…ythonGH-116532) (python#135417)

Fix presentation of dataclasses' `unsafe_hash` default value (pythonGH-116532)

(cherry picked from commit 71f5faf)

Co-authored-by: Victorien <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
…4523) (python#135460)

pythongh-106318: Add example for `str.endswith()` (pythonGH-134523)
(cherry picked from commit eed827e)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.