Skip to content

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

Merged
merged 7 commits into from
Apr 24, 2025

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIreland StanFromIreland commented Mar 9, 2025

@StanFromIreland
Copy link
Contributor Author

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

@hugovk hugovk merged commit 4924bcf into python:main Apr 24, 2025
43 checks passed
@StanFromIreland StanFromIreland deleted the we-want-ascii branch April 24, 2025 14:27
@StanFromIreland
Copy link
Contributor Author

Thanks for merging @hugovk :-)

@hugovk
Copy link
Member

hugovk commented Apr 24, 2025

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
Copy link
Member

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants