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 699: Follow standard deprecation policy #2927
base: main
Are you sure you want to change the base?
Conversation
OOI, how do you propose to emit a compiler warning for the |
We would have to move the dict watchers data to some other field. Then we can remove all uses of |
Until we remove the field, we need to update it, otherwise we should just remove it. |
I was wondering: don't dict watchers break it already? Or at least makes it backwards incompatible to a certain extent? |
dict watchers use the low 8 bits. The only change is that the dict-version could wrap in a few years, rather than centuries. |
Hmm ok, this clearly needs more discussion. Mark do you mind responding on the discourse thread with your opinions on why we should remove it immediately? |
My thinking is that the Is it possible (in GCC or some other compiler) to deprecate the attribute, and then suppress the warnings only for the places we use it? |
Ohh right I get what you mean. Hmmm this is a pickle. I need to think about it. |
You could try replacing union {
uint64_t ma_version_tag __attribute__ ((deprecated));
uint64_t internal_vt; /* Internal. Do not use. May be removed without warning! */
}; And replacing all uses of |
But we still need to maintain the semantics of |
We can deprecate the attribute for extension modules but not for core code and continue to use it as usual. The warning will only be emitted for extension modules. See my implementation of this idea kumaraditya303/cpython#15 |
We update it without warning through |
Sorry, I didn't read it properly on my phone. I see what you mean now. Thanks. |
OK, I think both solutions are viable. Thanks Mark and Kumar! I've thanked both of you in the PEP. I think this is ready now. |
This PR amends the PEP to follow the standard deprecation policy, in line with the SC's feedback on the Discourse thread https://discuss.python.org/t/pep-699-remove-private-dict-version-field-added-in-pep-509/19724/10?u=kj0.