Skip to content

Remove deprecated delegation of the int built-in to __trunc__. #119740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdickinson opened this issue May 29, 2024 · 0 comments
Closed

Remove deprecated delegation of the int built-in to __trunc__. #119740

mdickinson opened this issue May 29, 2024 · 0 comments
Labels
3.14 bugs and security fixes

Comments

@mdickinson
Copy link
Member

mdickinson commented May 29, 2024

Python 3.11 deprecated delegation of the int() built-in to __trunc__ (see issue #89140). I haven't seen any evidence of problems arising from that deprecation, and I think it's now safe to remove that delegation for Python 3.14.

Linked PRs

@mdickinson mdickinson added the 3.14 bugs and security fixes label May 29, 2024
mdickinson added a commit that referenced this issue Jun 2, 2024
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 <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
barneygale pushed a commit to barneygale/cpython that referenced this issue Jun 5, 2024
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 <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
@hugovk hugovk closed this as completed Jun 15, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
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 <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
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 <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 bugs and security fixes
Projects
None yet
Development

No branches or pull requests

2 participants