GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-119740: Remove deprecated trunc delegation by mdickinson · Pull Request #119743 · python/cpython

Conversation

@mdickinson

@mdickinson mdickinson commented May 29, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR removes 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.

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

📚 Documentation preview 📚: https://cpython-previews--119743.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mdickinson added 3 commits May 29, 2024 18:46
@mdickinson
Remove deprecated delegation of int to __trunc__
c02d01e
@mdickinson
Add news entry
07e24bb
@mdickinson
Add what's new entry
c78d637
@bedevere-app bedevere-app Bot added the awaiting core review label May 29, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 29, 2024
Remove deprecated delegation of the int built-in to __trunc__. #119740
Closed
mdickinson added 4 commits May 29, 2024 19:01
@mdickinson
Fix PR number
0088603
@mdickinson
Fix reST markup
ca6af89
@mdickinson
Regenerate includes
834d087
@mdickinson
Remove unused variable
39e164d
serhiy-storchaka
serhiy-storchaka reviewed May 29, 2024
View reviewed changes
Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

mdickinson added 5 commits May 29, 2024 21:21
@mdickinson
Use 'versionchanged', not 'deprecated-removed'
c6a8f62
@mdickinson
Change :class: to :func: in docs
7492da8
@mdickinson
Fix one missed :class: to :func: change
cd34a34
@mdickinson
And one more missed :class: to :func: change
34899dd
@mdickinson
Revert unrelated spacing changes
8ff4651
serhiy-storchaka
serhiy-storchaka approved these changes May 30, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I would prefer to merge this after #119687, to make backporting of #119687 easier.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 30, 2024
picnixz
picnixz reviewed May 30, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/functions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mdickinson

mdickinson commented May 31, 2024

Copy link
Copy Markdown
Member Author

Thanks for the comments; I'll address before merging (but it may take me a few days to get to it).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdickinson

mdickinson commented May 31, 2024

Copy link
Copy Markdown
Member Author

But I would prefer to merge this after #119687, to make backporting of #119687 easier.

Definitely! Looks like #119687 has gone in now; I'll update for conflicts when I get the chance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mdickinson and others added 2 commits June 2, 2024 09:34
@mdickinson @picnixz
More direct wording
1c2a638
Co-authored-by: Bénédikt Tran <[email protected]>
@mdickinson @picnixz
Grammar nit
26d5833
Co-authored-by: Bénédikt Tran <[email protected]>
mdickinson
mdickinson commented Jun 2, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.14.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

mdickinson and others added 2 commits June 2, 2024 09:37
@mdickinson @serhiy-storchaka
Fix reference to function when we really want a reference to a type
03308ef
Co-authored-by: Serhiy Storchaka <[email protected]>
@mdickinson
Cleaner wording.
506b821
mdickinson
mdickinson commented Jun 2, 2024
View reviewed changes
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mdickinson
Reword one more instance of 'will no longer delegate'
af6793a
serhiy-storchaka
serhiy-storchaka approved these changes Jun 2, 2024
View reviewed changes
@mdickinson
Merge remote-tracking branch 'upstream/main' into remove-deprecated-t…
4a479ab
…runc-delegation
@mdickinson

mdickinson commented Jun 2, 2024

Copy link
Copy Markdown
Member Author

Updating for merge conflicts ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdickinson
mdickinson merged commit f79ffc8 into python:main Jun 2, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Jun 2, 2024
barneygale pushed a commit to barneygale/cpython that referenced this pull request Jun 5, 2024
@mdickinson @picnixz
@serhiy-storchaka @barneygale
pythongh-119740: Remove deprecated trunc delegation (python#119743)
c0c837a
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 pull request Jul 17, 2024
@mdickinson @picnixz
@serhiy-storchaka @estyxx
pythongh-119740: Remove deprecated trunc delegation (python#119743)
8bb4fb3
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]>
skirpichev added a commit to skirpichev/cpython that referenced this pull request Feb 9, 2026
@skirpichev
pythongh-119743: remove obsoleted removal announce for trunc delegation
345ac2a
This was done in python#119743 (3.14).
@skirpichev skirpichev mentioned this pull request Feb 9, 2026
gh-119740: remove obsoleted removal announce for trunc delegation #144622
Merged
serhiy-storchaka pushed a commit that referenced this pull request Feb 9, 2026
@skirpichev
gh-119740: Remove obsoleted removal announce for trunc delegation (GH…
aa6ed80
…-144622)

This was done in GH-119743 (3.14).
@miss-islington miss-islington mentioned this pull request Feb 9, 2026
[3.14] gh-119740: Remove obsoleted removal announce for trunc delegation (GH-144622) #144624
Merged
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 9, 2026
@skirpichev @miss-islington
pythongh-119740: Remove obsoleted removal announce for trunc delegati…
288cdb8
…on (pythonGH-144622)

This was done in pythonGH-119743 (3.14).
(cherry picked from commit aa6ed80)

Co-authored-by: Sergey B Kirpichev <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request Feb 9, 2026
@miss-islington @skirpichev
[3.14] gh-119740: Remove obsoleted removal announce for trunc delegat…
c9646df
…ion (GH-144622) (GH-144624)

This was done in GH-119743 (3.14).
(cherry picked from commit aa6ed80)

Co-authored-by: Sergey B Kirpichev <[email protected]>
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@skirpichev @thunder-coding
pythongh-119740: Remove obsoleted removal announce for trunc delegati…
8dab2c0
…on (pythonGH-144622)

This was done in pythonGH-119743 (3.14).
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@skirpichev @ljfp
pythongh-119740: Remove obsoleted removal announce for trunc delegati…
3a9df08
…on (pythonGH-144622)

This was done in pythonGH-119743 (3.14).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mdickinson @serhiy-storchaka @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.