]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] 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:19:09 +0000 (12:19 +0100)
committerGitHub <noreply@github.com>
Mon, 17 Mar 2025 11:19:09 +0000 (12:19 +0100)
commite5e8b8ab44ab8e64fe2b3d475833e220e5976210
tree9e017c2ff1f056e8ed519527fedd00468327d6b8
parentbaea0e2b0553c4afada600385b44955b7e12e51d
[3.12] gh-129843: fix pure Python implementation of `warnings.warn_explicit` (GH-129848) (#131350)

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]