-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-89157: Make C and Python implementation of datetime.date.fromisoformat
consistent.
#131007
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
Conversation
StanFromIreland
commented
Mar 9, 2025
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: datetime's C implementation verifies fromisoformat is ASCII, but the pure python implementation does not #89157
Implementation is fine I just need to clear up tests as C raises a Value error but Python a TypeError will get this done soon enough |
Thanks for merging @hugovk :-) |
Thanks for the PR! |
@@ -3534,7 +3535,7 @@ def test_fromisoformat_fails_datetime(self): | |||
'2009-04-19T03:15:4500:00', # Bad time zone separator | |||
'2009-04-19T03:15:45.123456+24:30', # Invalid time zone offset | |||
'2009-04-19T03:15:45.123456-24:30', # Invalid negative offset | |||
'2009-04-10ᛇᛇᛇᛇᛇ12:15', # Too many unicode separators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed? The problem isn't that there are Unicode characters but that there is more than one of them. The old description was now accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit late now, it probably should have been asked a month ago when you approved this. In hindsight I agree the previous one was better.