Skip to content

Fix datetime.*.fromisoformat() to reject spaces in fraction part - #5241

Merged
mattip merged 1 commit into
pypy:py3.11from
mgorny:datetime-isoformat
Mar 8, 2025
Merged

mattip merged 1 commit into
pypy:py3.11from
mgorny:datetime-isoformat

Conversation

@mgorny

@mgorny mgorny commented Mar 7, 2025

Copy link
Copy Markdown
Contributor

Fix pure Python implementation of fromisoformat() to reject spaces in fractional part of time specifications. This matches the behavior of the C implementation in CPython, and prevents the method from parsing them incorrectly.

This fixes Django's test suite by enabling a fallback to their own (working) parser.

Backports: python/cpython#130962

Fix pure Python implementation of `fromisoformat()` to reject spaces
in fractional part of time specifications.  This matches the behavior
of the C implementation in CPython, and prevents the method from parsing
them incorrectly.

This fixes Django's test suite by enabling a fallback to their own
(working) parser.

Backports: python/cpython#130962
@mgorny

mgorny commented Mar 7, 2025

Copy link
Copy Markdown
Contributor Author

Sending it now, since I've prepared the backport for Gentoo already — but we may want to wait for CPython review before merging.

@mattip
mattip merged commit a4cf146 into pypy:py3.11 Mar 8, 2025
@mattip

mattip commented Mar 8, 2025

Copy link
Copy Markdown
Member

Thanks

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.

2 participants