From c6443513f385368ab88f446a4c5a55c2f5a1ac40 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Wed, 17 Jan 2024 23:50:20 +0200 Subject: [PATCH] gh-114050: Add test case and NEWS entry --- Lib/test/test_int.py | 1 + .../2024-01-17-23-39-20.gh-issue-114050.Lnv1oq.rst | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2024-01-17-23-39-20.gh-issue-114050.Lnv1oq.rst diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py index 5545ee39d8e942..0bf55facad9fed 100644 --- a/Lib/test/test_int.py +++ b/Lib/test/test_int.py @@ -90,6 +90,7 @@ def test_basic(self): self.assertRaises(TypeError, int, 1, 12) + self.assertRaises(TypeError, int, "10", 2, 1) self.assertEqual(int('0o123', 0), 83) self.assertEqual(int('0x123', 16), 291) diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-01-17-23-39-20.gh-issue-114050.Lnv1oq.rst b/Misc/NEWS.d/next/Core and Builtins/2024-01-17-23-39-20.gh-issue-114050.Lnv1oq.rst new file mode 100644 index 00000000000000..c35d2508e6bdda --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2024-01-17-23-39-20.gh-issue-114050.Lnv1oq.rst @@ -0,0 +1,2 @@ +Fix segmentation fault caused by an incorrect format string +in ``TypeError`` exception when more than two arguments are passed to ``int``.