Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

[3.12] gh-130959: Reject whitespace in fractions, in pure Pythonfromisoformat() (GH-130962) (GH-131076)#131086

Merged
vstinner merged 1 commit intopython:3.12from
miss-islington:backport-27fd328-3.12
Mar 11, 2025
Merged

[3.12] gh-130959: Reject whitespace in fractions, in pure Pythonfromisoformat() (GH-130962) (GH-131076)#131086
vstinner merged 1 commit intopython:3.12from
miss-islington:backport-27fd328-3.12

Conversation

@miss-islington
Copy link
Contributor

gh-130959: Reject whitespace in fractions, in pure Pythonfromisoformat() (GH-130962)

Fix the pure Python implementation offromisoformat() to reject any
non-digit characters, including whitespace, in the fractional part
of time specification. This makes the behavior consistent with the C
implementation, and prevents incorrect parsing of these fractions
(e.g..400 would be misinterpreted as.04).

Co-authored-by: Peter Biermazintensitydev@gmail.com
Co-authored-by: Paul Ganssle1377457+pganssle@users.noreply.github.com
(cherry picked from commit33494b4)
(cherry picked from commit27fd328)

Co-authored-by: Victor Stinnervstinner@python.org
Co-authored-by: Michał Górnymgorny@gentoo.org

…n `fromisoformat()` (pythonGH-130962) (pythonGH-131076)pythongh-130959: Reject whitespace in fractions, in pure Python `fromisoformat()` (pythonGH-130962)Fix the pure Python implementation of `fromisoformat()` to reject anynon-digit characters, including whitespace, in the fractional partof time specification.  This makes the behavior consistent with the Cimplementation, and prevents incorrect parsing of these fractions(e.g. `.400 ` would be misinterpreted as `.04`).Co-authored-by: Peter Bierma <zintensitydev@gmail.com>Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>(cherry picked from commit33494b4)(cherry picked from commit27fd328)Co-authored-by: Victor Stinner <vstinner@python.org>Co-authored-by: Michał Górny <mgorny@gentoo.org>
@vstinnervstinnerenabled auto-merge (squash)March 11, 2025 11:40
@vstinnervstinner merged commit8f26a79 intopython:3.12Mar 11, 2025
29 checks passed
@miss-islingtonmiss-islington deleted the backport-27fd328-3.12 branchJanuary 2, 2026 17:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pgansslepganssleAwaiting requested review from pgansslepganssle is a code owner

@abalkinabalkinAwaiting requested review from abalkinabalkin is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@miss-islington@vstinner

[8]ページ先頭

©2009-2026 Movatter.jp