Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-109311: Remove support for non-complex/float types in __complex/float__#112680
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
gh-109311: Remove support for non-complex/float types in __complex/float__#112680
Conversation
CC@vstinner maybe it's time, after 6 releases? |
I would prefer to wait for Python 3.15 alpha 1. IMO changing the behavior in Python 3.14 beta 1 is too late. |
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.
Please update:
- Doc/whatsnew/3.15.rst: the C API removal section
- Maybe a
versionchanged
entry underobject.__complex__
andobject.__float__
. - In a follow-up PR, let's also update "c-api-pending-removal-in-315" to notify this change in 3.13 & 3.14 (still, make a PR against main)
Misc/NEWS.d/next/Core and Builtins/2023-12-04-04-31-59.gh-issue-109311.G-qgQZ.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
I think you need to regenerate the NEWS entry as it's in an "old" folder |
Are you sure it should be here? Strictly speaking, this affects not just C extensions. So far, this placed in "Others" subsection of "Removed" section.
Docs already says: Should return a value of the appropriate type.
In most (all?) cases you could just move news entry. |
picnixz commentedMay 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ah yes, my bad. Make it under the
Oh ok. No need for an additional note then. |
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.
The "pending-future-removal" document would still contain the deprecation notice so let's move it to 3.15.rst in a follow-up PR (or in this one, up to you). Since it's in "future removal", I don't know if we actually need a second round of discussion to decide on the version.
In the docs it says "should return", maybe we should be more precise and make it a "must return a float/complex". While users would see a DeprecationWarning, it's better for new online docs to state that we only want exact float/complex.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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. I would like to hear@serhiy-storchaka on this issue, he wrote similar changes for other types.
I have a completely opposite opinion. I will try to start a new discussion soon. |
Any update@serhiy-storchaka? |
Uh oh!
There was an error while loading.Please reload this page.