]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instant...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 27 Jun 2025 12:01:48 +0000 (14:01 +0200)
committerGitHub <noreply@github.com>
Fri, 27 Jun 2025 12:01:48 +0000 (12:01 +0000)
commit1b218680b7c1bb4dfbbb1c750b8929d5e778577e
tree652e016d619df8b05e4960e9029183ebc661426a
parent33c83cea070b70416c4a40a79130866ff7df679f
[3.14] gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable (GH-135981) (GH-136030)

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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/support/__init__.py
Lib/test/test_sys.py
Lib/test/test_types.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