]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-129843: fix pure Python implementation of `warnings.warn_explicit` (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 17 Mar 2025 11:18:42 +0000 (12:18 +0100)
committerGitHub <noreply@github.com>
Mon, 17 Mar 2025 11:18:42 +0000 (12:18 +0100)
commit83cfd4649e1c4514e0082c1949fd3c09ea3c3056
treedd6d8051315e1a0976c5a6192f8fab4609b9a2fc
parent3930b7c2589d33cb1542e13c7b302149b5a74db1
[3.13] gh-129843: fix pure Python implementation of `warnings.warn_explicit` (GH-129848) (#131349)

gh-129843: fix pure Python implementation of `warnings.warn_explicit` (GH-129848)

The pure Python implementation of `warnings.warn_explicit` constructs a `WarningMessage`
with an incorrect source (it incorrectly sets the WarningMessage's line to the given `source`).
(cherry picked from commit 80e00ecc399db8aeaa9f3a1c87a2cfb34517d7be)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Lib/warnings.py
Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst [new file with mode: 0644]