-
Notifications
You must be signed in to change notification settings - Fork 1
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
PEP 743 – Add Py_COMPAT_API_VERSION to the Python C API #49
Comments
I think the proposal is too complicated, and there's no need for anything more than a simple "warn me about discouraged APIs" Having additional version checks throughout our headers will make them much harder to read, and harder to keep things up to date. The chances of accidentally excluding a function by mistake are much higher. I'm not convinced that being able to set an earlier version is more helpful than getting warnings, and I'm not convinced these soft deprecations are sufficiently tied to a particular version to justify including/excluding them based on a version. I'd be happy with a |
Maybe the PEP should make it clearer that it proposes moving the affected definitions into a new header. They'd be
That could work for functions, but you can't really deprecate a macro. |
The problem of treating all warnings are errors is that you might have warnings unrelated to deprecation which may be annoying/painful to fix, especially if they come from 3rd party code (including the C library). |
I'm very familiar with this "problem", as someone who works on projects that require all warnings and warn-as-error. I still think, given that context, that it would be better to discourage functions by making the deprecation warning optional rather than the entire definition.
Sure. I'm even more opposed to that, so consider me -2 now. |
PEP 743 – Add Py_COMPAT_API_VERSION to the Python C API: https://peps.python.org/pep-0743/
Abstract
Add
Py_COMPAT_API_VERSION
C macro that hides some deprecated and soft-deprecated symbols, allowing users to opt out of using API with known issues that other API solves. The macro is versioned, allowing users to update (or not) on their own pace.Also, add namespaced alternatives for API without the
Py_
prefix, and soft-deprecate the original names.Vote
@encukou and me abstain from voting since we wrote the PEP :-)
If the vote is positive, the PEP will be submitted to the Steering Council (see the SC discussion).
The text was updated successfully, but these errors were encountered: