]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instant...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 27 Jun 2025 12:07:22 +0000 (15:07 +0300)
committerGitHub <noreply@github.com>
Fri, 27 Jun 2025 12:07:22 +0000 (12:07 +0000)
commit3576e1a9545dee13c9dab3ef154b34f95acf4025
treeb274436e64e6aaea48f31f8cf396594975d697ad
parentea25f4a8ecc1fd32960ce4c3e8d27f85a1bf9477
[3.13] gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable (GH-135981) (GH-136031)

Previous error message suggested to use cls.__new__(), which
obviously does not work. Now the error message is the same as for
cls(...).
(cherry picked from commit c45f4f3ebe34529a8db3a7918e8dd2e9f7ce8e86)
Lib/test/support/__init__.py
Lib/test/test_sys.py
Misc/NEWS.d/next/Core and Builtins/2025-06-26-15-25-51.gh-issue-78465.MbDN8X.rst [new file with mode: 0644]
Objects/typeobject.c