GH-70647: Remove support for %d (and deprecate for %e) without year in strptime()#144570
GH-70647: Remove support for %d (and deprecate for %e) without year in strptime()#144570gpshead merged 10 commits intopython:mainfrom
%d (and deprecate for %e) without year in strptime()#144570Conversation
|
Including I do not believe pushing this deprecation out to 3.18 is a great idea though... We will have people dealing with production outages on leap day yet again due to bad date parsing around 2028-02-29 if the deprecation has not already shipped in a release that has seen wide adoption before that time. 3.15 will be widely adopted by 2028-02 as it should've shipped in several major long term support os distro releases that people will actually be using by 2028. Most things I like giving a long deprecation grace period on, this one is a ticking time bomb every 4 years that IMNSHO really does need action to be taken in a timely manner. One of the rare cases where forcing the issue is a good thing. I'm not gonna block pushing it out, but I suggest reconsidering. |
It wasn't implemented at the time.
In my opinion, this really depends on what we decide to do to fix the issue. If we are going to always raise an error, that itself will cause disruption, leap day or not, so I'd be in favour of a longer deprecation period. If we are to change the default year... I haven't considered what side effects that would have. I'd imagine there are people relying on the specific year ( |
We can split the removals. Make
The major difference is that if we always raise an error, it will show up in testing environments after a Python upgrade, giving you time to roll back.
Yeah, this smells too much like silently returning a wrong value to avoid an exception. |
If we are to do it, I'd rather do both at once, |
|
Sorry, I let this stall. Mistakes were made. As far as users are concerned, this is in 3.13. I still think splitting the removal dates is best here. As Greg notes, there's a good reason to remove |
|
Ok, we can do For |
# Conflicts: # Doc/deprecations/pending-removal-in-3.18.rst # Lib/test/test_time.py
|
Yeah, What do you mean by “private”? It's present in 3.14.0; doc-wise it's covered either by “full set of format codes supported varies across platforms” or PEP 387's “if something is not documented at all, it is not automatically considered private”. |
%e in deprecation of strptime() day of month parsing without a year%d (and deprecate for %e) without year in strptime()
|
Removed support for I'm not sure how to avoid confusing the docs, should we keep two version changeds (one for deprecation and one for removal) or have just one? |
gpshead
left a comment
There was a problem hiding this comment.
If the docs need further massaging it can be done as followups.
📚 Documentation preview 📚: https://cpython-previews--144570.org.readthedocs.build/