From d3db4698660238bfc267b1b268693dd0a02756b5 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Mon, 24 Jun 2024 17:16:18 +0100 Subject: [PATCH 1/2] changed int_max_str_digits from -1 to 4300 to be more cpython complient, fixes #5139 --- vm/src/vm/setting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/vm/setting.rs b/vm/src/vm/setting.rs index 62360aaced..36bb9cee6d 100644 --- a/vm/src/vm/setting.rs +++ b/vm/src/vm/setting.rs @@ -151,7 +151,7 @@ impl Default for Settings { check_hash_pycs_mode: "default".to_owned(), allow_external_library: cfg!(feature = "importlib"), utf8_mode: 1, - int_max_str_digits: -1, + int_max_str_digits: 4300, #[cfg(feature = "flame-it")] profile_output: None, #[cfg(feature = "flame-it")] From e18a6b1daf029b2033ee97349f7e7e0b2ba7d6d5 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Tue, 25 Jun 2024 13:38:08 +0100 Subject: [PATCH 2/2] Fixed test_cmdline --- Lib/test/test_cmd_line.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 6644a3cd5c..bda1f78223 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -928,8 +928,6 @@ def test_parsing_error(self): self.assertTrue(proc.stderr.startswith(err_msg), proc.stderr) self.assertNotEqual(proc.returncode, 0) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_int_max_str_digits(self): code = "import sys; print(sys.flags.int_max_str_digits, sys.get_int_max_str_digits())"