gh-112451: Prohibit subclassing of datetime.timezone.#114190
gh-112451: Prohibit subclassing of datetime.timezone.#114190erlend-aasland merged 5 commits intopython:mainfrom
Conversation
f3ec4d1 to
0820caa
Compare
|
This will need a deprecation period as per PEP-387. |
Great, my first deprecation in Python 🎉 WIP |
0820caa to
cd231e6
Compare
cd231e6 to
832d948
Compare
|
Updated 👍 |
I guess it isn't the worst thing in the world to have this deprecation period, but I think for PEP 399 compliance, especially when the feature is available only in the pure-Python module (which is not commonly used), there's a case to be made that this doesn't need a deprecation period. I'm sure I'll eat my words when some PyPy-only user shows up and tells us they have been subclassing |
|
Oh, TIL PEP-399; thanks, Paul. I'm always fascinated on the various ways people depend on very specific behaviour. Thanks for opening an issue over at the SC tracker. |
This is consistent with C-extension datetime.timezone.
832d948 to
7b25e5e
Compare
|
I reverted the deprecation per the Steering Council decision. |
Misc/NEWS.d/next/Library/2024-01-24-20-11-46.gh-issue-112451.7YrG4p.rst
Outdated
Show resolved
Hide resolved
|
Yes, thanks @felixxm! And thanks a lot to @pganssle and @serhiy-storchaka for your guidance 🙏 |
|
Thanks y'all for help and reviews 🥇 |
…14190) This is consistent with C-extension datetime.timezone.
…14190) This is consistent with C-extension datetime.timezone.
This is consistent with C-extension
datetime.timezone.datetime.timezoneis not acceptable as a base class; pure-Python version is #112451