]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 29 Sep 2024 08:01:10 +0000 (11:01 +0300)
committerGitHub <noreply@github.com>
Sun, 29 Sep 2024 08:01:10 +0000 (11:01 +0300)
commit95e92ef6c74e973ea13d15180190d0fa2af82fbf
tree4cc8698de8eb1fc631cbb3d567a6b52ca6d4c37f
parentf1a2417b9e2993e584610851ac004c8b0599b323
gh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667)

It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2024-09-27-15-16-04.gh-issue-116850.dBkR0-.rst [new file with mode: 0644]