-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Deprecate Py_IS_NAN/INFINITY/FINITE? #119613
Comments
First part: #119619 |
A code search on PyPI top 7,500 projects found 10 projects using these macros:
I suggest to update all of these projects before considering to deprecate these macros. I would be fine with a soft deprecation. It's the kind of the issue which fall into PEP 743 – Add Py_COMPAT_API_VERSION to the Python C API territory: having a way to opt-out from deprecated macros, without forcing all projects to update their code. |
@vstinner, these macroses were undocumented. Should we (1) document them (with "deprecated" statement) and (2) add news entry? Or (2) is enough?
If we don't announce removal (e.g. deprecated-removed statement) wouldn't this be a soft deprecation?
|
You can announce the soft deprecation in What's New in Python 3.14 and add a comment to explain that these macros are soft deprecated. |
Maybe this could go to 3.13? |
Deprecations cannot be added after beta1. |
Ok, last part: #119701 |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
Use directly memcpy() instead.
Use directly memcpy() instead.
Use directly memcpy() instead.
Use directly memcpy() instead.
Use directly memcpy() instead.
Feature or enhancement
Proposal:
isnan(), isinf() and isfinite() are part of C99, which is a requirement for 3.11+. Probably, it does make sense to deprecate (undocumented) public macros and switch codebase to use C stdlib functions.
JFR: #119457 (comment)
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: