]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)
authorZackery Spytz <zspytz@gmail.com>
Thu, 3 Feb 2022 09:43:25 +0000 (01:43 -0800)
committerGitHub <noreply@github.com>
Thu, 3 Feb 2022 09:43:25 +0000 (11:43 +0200)
commitb4bd1e1422997de61faf506b4916e83013bc7d21
treea6c3e97b10f04c4ca17f876c5c9cfa061d287a34
parent7ffe7ba30fc051014977c6f393c51e57e71a6648
bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)

Calling int(a) when type(a) implements __trunc__ but not __int__
or __index__ now raises a DeprecationWarning.
Doc/library/functions.rst
Doc/reference/datamodel.rst
Doc/whatsnew/3.11.rst
Lib/test/test_descr.py
Lib/test/test_int.py
Lib/test/test_long.py
Misc/NEWS.d/next/Core and Builtins/2022-01-30-18-23-08.bpo-44977.BQV_zS.rst [new file with mode: 0644]
Objects/abstract.c