Skip to content

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

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-78526-pep468-520-tests
Aug 13, 2026
Merged

gh-78526: Add tests for PEP 468 and PEP 520#155387
serhiy-storchaka merged 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
@serhiy-storchaka
serhiy-storchaka merged commit 116caab into python:main Aug 13, 2026
59 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155676 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 13, 2026
@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155677 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 13, 2026
@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155678 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 13, 2026
@serhiy-storchaka
serhiy-storchaka deleted the gh-78526-pep468-520-tests branch August 13, 2026 09:55
serhiy-storchaka added a commit that referenced this pull request Aug 13, 2026
…5678)

Test that the order of keyword arguments and the order of class attribute
definitions are preserved.
(cherry picked from commit 116caab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Aug 13, 2026
…5677)

Test that the order of keyword arguments and the order of class attribute
definitions are preserved.
(cherry picked from commit 116caab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant