]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-114014: Update `fractions.Fraction()`'s rational parsing regex (GH-114015...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 13 Jan 2024 18:21:34 +0000 (19:21 +0100)
committerGitHub <noreply@github.com>
Sat, 13 Jan 2024 18:21:34 +0000 (13:21 -0500)
commite08179216bb0481d7a58800bc8bac63cc97952a8
treea536d6fe42085a31ad170cc1ce4a6dbd4f87a686
parent94b1d1fa38ada8cf7d196184a04a195c152eed75
[3.12] gh-114014: Update `fractions.Fraction()`'s rational parsing regex (GH-114015) (#114023)

Fix a bug in the regex used for parsing a string input to the `fractions.Fraction` constructor. That bug led to an inconsistent exception message being given for some inputs.

---------

(cherry picked from commit dd56b5748317c3d504d6a9660d9207620c547f5c)

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Lib/fractions.py
Lib/test/test_fractions.py
Misc/NEWS.d/next/Library/2024-01-13-11-34-29.gh-issue-114014.WRHifN.rst [new file with mode: 0644]