]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-114014: Update `fractions.Fraction()`'s rational parsing regex (GH-114015...
authorMark Dickinson <dickinsm@gmail.com>
Sat, 13 Jan 2024 18:22:31 +0000 (18:22 +0000)
committerGitHub <noreply@github.com>
Sat, 13 Jan 2024 18:22:31 +0000 (13:22 -0500)
commit41edd371606109e93ce9d73c053109085f740d1b
treebf29c202f16a4be980e5f58a29e327c90a798b9e
parent25af45d9a4d9e94cd69b8a2008102376d121789f
[3.11] gh-114014: Update `fractions.Fraction()`'s rational parsing regex (GH-114015) (#114025)

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.

---------

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: 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]