]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119740: Remove deprecated trunc delegation (#119743)
authorMark Dickinson <dickinsm@gmail.com>
Sun, 2 Jun 2024 09:16:49 +0000 (10:16 +0100)
committerGitHub <noreply@github.com>
Sun, 2 Jun 2024 09:16:49 +0000 (10:16 +0100)
commitf79ffc879b919604ed5de22ece83825006cf9a17
tree4174214b7ad81d2277e584d4fa9e6c1ccec3e95a
parent4aed319a8eb63b205d6007c36713cacdbf1ce8a3
gh-119740: Remove deprecated trunc delegation (#119743)

Remove the delegation of `int` to the `__trunc__` special method: `int` will now only delegate to `__int__` and `__index__` (in that order). `__trunc__` continues to exist, but its sole purpose is to support `math.trunc`.

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/functions.rst
Doc/reference/datamodel.rst
Doc/whatsnew/3.14.rst
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_global_strings.h
Include/internal/pycore_runtime_init_generated.h
Include/internal/pycore_unicodeobject_generated.h
Lib/test/test_int.py
Lib/test/test_long.py
Misc/NEWS.d/next/Core and Builtins/2024-05-29-18-53-43.gh-issue-119740.zP2JNM.rst [new file with mode: 0644]
Objects/abstract.c