From f9acaec440620c65db2622569a747f79433ef1f7 Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Sat, 8 Feb 2025 16:19:06 +0530 Subject: [PATCH 1/3] gh-129843: Fix the wrong argument passed - converting positional argument to named argument --- Lib/warnings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/warnings.py b/Lib/warnings.py index f20b01372dd7a4..7d32534c9f5975 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -422,7 +422,7 @@ def warn_explicit(message, category, filename, lineno, linecache.getlines(filename, module_globals) # Print message and context - msg = WarningMessage(message, category, filename, lineno, source) + msg = WarningMessage(message, category, filename, lineno, source=source) _showwarnmsg(msg) From dba4a489145db145543ee000a810e2c976366a13 Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Mon, 17 Mar 2025 15:46:49 +0530 Subject: [PATCH 2/3] Add NEWS entry --- .../next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst diff --git a/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst b/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst new file mode 100644 index 00000000000000..e84a0cc52a1593 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst @@ -0,0 +1 @@ +Fix incorrect argument passing in the function :func:`warnings.warn_explicit`. From 4107227e9f60c9ffa6263d4f842cdd92d3158690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:23:58 +0100 Subject: [PATCH 3/3] Update Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst --- .../next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst b/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst index e84a0cc52a1593..c16d61540edf39 100644 --- a/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst +++ b/Misc/NEWS.d/next/Library/2025-03-17-15-45-36.gh-issue-129843.NPdpXL.rst @@ -1 +1 @@ -Fix incorrect argument passing in the function :func:`warnings.warn_explicit`. +Fix incorrect argument passing in :func:`warnings.warn_explicit`.