Skip to content

gh-78526: Add tests for PEP 468 and PEP 520 - #155387

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-78526-pep468-520-tests
Open

gh-78526: Add tests for PEP 468 and PEP 520#155387
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-78526-pep468-520-tests

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

There were almost no explicit tests for PEP 468 (Preserving Keyword Argument Order) and none for PEP 520 (Preserving Class Attribute Definition Order). Both work now only as a side effect of the dict order, so breaking them in some path would not be detected.

Added tests for the order of keyword arguments in functions, methods and C functions, and for the order of class attribute definitions in the class dict, in the namespace passed to the metaclass and in the mapping returned by type.__prepare__().

Test that the order of keyword arguments and the order of class attribute
definitions are preserved.
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Aug 8, 2026
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news labels Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant