summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` ↵Victor Stinner2023-10-011-3/+11
| | | | | | | | | (… (#110183) gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (#110170) (cherry picked from commit 06faa9a39bd93c5e7999d52b52043ecdd0774dac) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159)Miss Islington (bot)2023-09-301-3/+0
| | | | | | | | | gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) Don't measure the CI performance: don't test the maximum elapsed time. The check failed on a slow CI. (cherry picked from commit c62b49ecc8da13fa9522865ef6fe0aec194fd0d8) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109748: Fix again venv test_zippath_from_non_installed_posix() ↵Miss Islington (bot)2023-09-302-2/+6
| | | | | | | | | | | | | | (GH-110149) (#110153) gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-110149) Call also copy_python_src_ignore() on listdir() names. shutil.copytree(): replace set() with an empty tuple. An empty tuple becomes a constant in the compiler and checking if an item is in an empty tuple is cheap. (cherry picked from commit 0def8c712bb6f66f1081cab71deb3681566b846d) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125) (#110130)Miss Islington (bot)2023-09-291-1/+1
| | | | | | gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125) (cherry picked from commit 14098b78f7453adbd40c53e32c29588611b7c87b) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-108851: Fix support.get_recursion_available() for USE_STACKCHECK ↵Victor Stinner2023-09-292-5/+23
| | | | | | | (#110127) Add _testcapi.USE_STACKCHECK. USE_STACKCHECK on using on Windows 32-bit.
* gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore ↵Miss Islington (bot)2023-09-291-1/+3
| | | | | | | (GH-110108) (cherry picked from commit 20bc5f7c28a6f8a2e156c4a748ffabb5efc7c761) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.11] gh-109592: test_eintr tolerates 20 ms when comparing timings ↵Miss Islington (bot)2023-09-291-7/+16
| | | | | | | | (GH-110102) (#110107) gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102) (cherry picked from commit 9c73a9acec095c05a178e7dff638f7d9769318f3) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-110031: Skip test_threading fork tests if ASAN (#110100) (#110104)Victor Stinner2023-09-291-17/+26
| | | | | | | | gh-110031: Skip test_threading fork tests if ASAN (#110100) Skip test_threading tests using thread+fork if Python is built with Address Sanitizer (ASAN). (cherry picked from commit 86e76ab8af9a5018acbcdcbb6285678175b1bd8a)
* [3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099)Victor Stinner2023-09-296-54/+15
| | | | | | | | | | gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) Fix test_asyncio timeouts: don't measure the maximum duration, a test should not measure a CI performance. Only measure the minimum duration when a task has a timeout or delay. Add CLOCK_RES to test_asyncio.utils. (cherry picked from commit db0a258e796703e12befea9d6dec04e349ca2f5b)
* [3.11] gh-110036: multiprocessing Popen.terminate() catches PermissionError ↵Miss Islington (bot)2023-09-291-2/+3
| | | | | | | | | | | | | (GH-110037) (#110065) gh-110036: multiprocessing Popen.terminate() catches PermissionError (GH-110037) On Windows, multiprocessing Popen.terminate() now catchs PermissionError and get the process exit code. If the process is still running, raise again the PermissionError. Otherwise, the process terminated as expected: store its exit code. (cherry picked from commit bd4518c60c9df356cf5e05b81305e3644ebb5e70) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110061)Miss Islington (bot)2023-09-291-11/+0
| | | | | | | | | | | | | | | gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) In 2003, test_pty got a hardcoded timeout of 10 seconds to prevent hanging on AIX & HPUX "if run after test_openpty": commit 7d8145268ee282f14d6adce9305dc3c1c7ffec14. Since 2003, test_pty was no longer reported to hang on AIX. But today, the test can fail simply because a CI is busy running other tests in parallel. The timeout of 10 seconds is no longer needed, just remove it. Moreover, regrtest now has multiple built-in generic timeout mecanisms. (cherry picked from commit 5fdcea744024c8a19ddb57057bf5ec2889546c98) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-110038: KqueueSelector must count all read/write events ↵Davide Rizzo2023-09-281-0/+29
| | | | | | (GH-110039) (#110044) [3.11] gh-110038: KqueueSelector must count all read/write events (GH-110039). (cherry picked from commit b14f0ab51cb4851b25935279617e388456dcf716)
* [3.11] gh-110033: Fix signal test_interprocess_signal() (GH-110035) (#110041)Miss Islington (bot)2023-09-281-0/+8
| | | | | | | | | | | | gh-110033: Fix signal test_interprocess_signal() (GH-110035) Fix test_interprocess_signal() of test_signal. Make sure that the subprocess.Popen object is deleted before the test raising an exception in a signal handler. Otherwise, Popen.__del__() can get the exception which is logged as "Exception ignored in: ...." and the test fails. (cherry picked from commit 7e0fbf5175fcf21dae390ba68b7f49706d62aa49) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109594: Fix concurrent.futures test_timeout() (GH-110018) (#110022)Miss Islington (bot)2023-09-281-7/+9
| | | | | | | | | | | | | gh-109594: Fix concurrent.futures test_timeout() (GH-110018) Fix test_timeout() of test_concurrent_futures.test_wait. Remove the future which may or may not complete depending if it takes longer than the timeout ot not. Keep the second future which does not complete before wait(). Make also the test faster: 0.5 second instead of 6 seconds, so remove @support.requires_resource('walltime') decorator. (cherry picked from commit 9be283e5e15d5d5685b78a38eb132501f7f3febb) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109615: Fix support test_copy_python_src_ignore() on WASM ↵Miss Islington (bot)2023-09-271-1/+9
| | | | | | | | | | | (GH-109970) (#109976) gh-109615: Fix support test_copy_python_src_ignore() on WASM (GH-109970) Not only check if src_dir exists, but look also for Lib/os.py landmark. (cherry picked from commit cc54bcf17b5b5f7681f52baf3acef75b995fa1fd) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#109962)Victor Stinner2023-09-273-6/+16
| | | | | | | | | | | | | | gh-109615: Fix support test_copy_python_src_ignore() (#109958) Fix the test when run on an installed Python: use "abs_srcdir" of sysconfig, and skip the test if the Python source code cannot be found. * Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and Lib/test/libregrtest/utils.py now first try to get "abs_srcdir" from sysconfig, before getting "srcdir" from sysconfig. * test.pythoninfo logs sysconfig "abs_srcdir". (cherry picked from commit b89ed9df39851348fbb1552294644f99f6b17d2c)
* [3.11] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109951)Victor Stinner2023-09-274-9/+51
| | | | | | | | | | | | | gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) Fix copy_source_tree() function of test_tools.test_freeze: * Don't copy SRC_DIR/build/ anymore. This directory is modified by other tests running in parallel. * Add test.support.copy_python_src_ignore(). * Use sysconfig to get the source directory. * Use sysconfig.get_config_var() to get CONFIG_ARGS variable. (cherry picked from commit 1512d6c6ee2a770afb339bbb74c1b990116f7f89)
* [3.11] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 ↵Miss Islington (bot)2023-09-261-4/+9
| | | | | | | | (GH-109928) (#109930) gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (cherry picked from commit 9dbfe2dc8e7bba25e52f9470ae6969821a365297) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109845: Make test_ftplib more stable under load (GH-109912) ↵Miss Islington (bot)2023-09-261-20/+18
| | | | | | | | | (GH-109920) recv() can return partial data cut in the middle of a multibyte character. Test raw binary data instead of data incorrectly decoded by parts. (cherry picked from commit 2ef2fffe3be953b91852585c75188d5475b09474) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-109593: Fix reentrancy issue in multiprocessing resource_tracker ↵Miss Islington (bot)2023-09-263-0/+41
| | | | | | | | | | | | (GH-109629) (#109897) gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629) --------- (cherry picked from commit 0eb98837b60bc58e57ad3e2b35c6b0e9ab634678) Co-authored-by: Antoine Pitrou <antoine@python.org> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* [3.11] gh-109832: concurrent.futures test_deadlock restores sys.stderr ↵Miss Islington (bot)2023-09-261-0/+6
| | | | | | | | | | | | (GH-109887) (#109893) gh-109832: concurrent.futures test_deadlock restores sys.stderr (GH-109887) test_error_at_task_unpickle() and test_error_during_result_unpickle_in_result_handler() now restore sys.stderr which is overriden by _raise_error_ignore_stderr(). (cherry picked from commit 2897142d2ec0930a8991af964c798b68fb6dcadd) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109401: Fix threading barrier test_default_timeout() (GH-109875) ↵Miss Islington (bot)2023-09-261-4/+6
| | | | | | | | | | | (#109877) gh-109401: Fix threading barrier test_default_timeout() (GH-109875) Increase timeouts. Barrier default timeout should be long enough to spawn 4 threads on a slow CI. (cherry picked from commit e5186c3de4194de3ea8c80edb182d786f5e20944) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109748: Fix venv test_zippath_from_non_installed_posix() ↵Miss Islington (bot)2023-09-251-1/+9
| | | | | | | | | | | | (GH-109872) (#109874) gh-109748: Fix venv test_zippath_from_non_installed_posix() (GH-109872) Fix test_zippath_from_non_installed_posix() of test_venv: don't copy __pycache__/ sub-directories, because they can be modified by other Python tests running in parallel. (cherry picked from commit 25bb266fc876b344e31e0b5634a4db94912c1aba) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-89363: Skip threading test_is_alive_after_fork() if ASAN ↵Miss Islington (bot)2023-09-252-1/+5
| | | | | | | | | | | (GH-109835) (#109856) gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) Skip test_is_alive_after_fork() of test_threading if Python is built with Address Sanitizer (ASAN). (cherry picked from commit bc06743533b5fea2d5ecdad6dd3caa372c67439f) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109833: Fix asyncio test_wait_for() (GH-109834) (#109838)Miss Islington (bot)2023-09-251-2/+3
| | | | | | | | | | gh-109833: Fix asyncio test_wait_for() (GH-109834) Expect the test to be "short" but don't measure the exact performance of the CI. SHORT_TIMEOUT is about 30 seconds whereas the cancelled coroutine takes around 1 hour. (cherry picked from commit f29bc9c9a0a6794c6b8a9e84a7ba9237b427a10a) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock ↵elfstrom2023-09-241-1/+71
| | | | | | | (GH-108513) (#109783) This fixes issue GH-105829, https://github.com/python/cpython/issues/105829 (cherry picked from commit 405b06375a8a4cdb08ff53afade09a8b66ec23d5)
* [3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) ↵Miss Islington (bot)2023-09-221-1/+3
| | | | | | | | | | (#109763) gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) Don't check order, queue items can be written in any order. (cherry picked from commit b03a791497ff4b3c42805e06c73d08ac34087402) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513) (#109724)Nikita Sobolev2023-09-224-8/+8
| | | | | | | | | | * [3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>. (cherry picked from commit 4dd47c63a97b3c39cd964ad12431fcdaf76dc823) Backport to 3.11: update also test_imp. Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) (#109735)Victor Stinner2023-09-221-10/+42
| | | | | | | | | | gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) Replace harcoded sleep of 500 ms with synchronization using a pipe. Fix also Process._feed_stdin(): catch also BrokenPipeError on stdin.write(input), not only on stdin.drain(). (cherry picked from commit cbbdf2c1440c804adcfc32ea0470865b3b3b8eb2)
* [3.11] gh-109625: Move _ready_to_import() from test_import to ↵Nikita Sobolev2023-09-223-34/+35
| | | | | | support.import_helper (GH-109626) (#109718) [3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626). (cherry picked from commit 115c49ad5a5ccfb628fef3ae06a566f7a0197f97)
* [3.11] gh-109702: Increase concurrent_futures deadlock timeout (GH-109703) ↵Miss Islington (bot)2023-09-221-1/+1
| | | | | | | | | | | (#109708) gh-109702: Increase concurrent_futures deadlock timeout (GH-109703) Replace SHORT_TIMEOUT with LONG_TIMEOUT in test_deadlock of test_concurrent_futures. (cherry picked from commit 1eb1b45183c3b8aeefe3d5d27694155741e82bbc) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109375: Fix bug where pdb registers an alias without an associated ↵Miss Islington (bot)2023-09-221-0/+6
| | | | | | | | command (GH-109376) (#109430) gh-109375: Fix bug where pdb registers an alias without an associated command (GH-109376) (cherry picked from commit 68a6f21f47e779ddd70e33cf04d170a63f077fcd) Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
* [3.11] gh-108388: Convert test_concurrent_futures to package (#108401) (#109704)Victor Stinner2023-09-2213-1677/+1575
| | | | | | | | | | | | | | * gh-108388: Convert test_concurrent_futures to package (#108401) Convert test_concurrent_futures to a package of sub-tests. (cherry picked from commit aa6f787faa4bc45006da4dc2f942fb9b82c98836) Notes on backport to 3.11: * AsCompletedTests: Revert test_future_times_out() => test_zero_timeout() * Restore TODO comment * ThreadPoolExecutorTest.test_hang_global_shutdown_lock(): add @support.requires_resource('cpu').
* [3.11] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) ↵Victor Stinner2023-09-211-3/+16
| | | | | | | | | | (#109699) gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) On FreeBSD, regular users cannot set the sticky bit. Skip the test if chmod() fails with EFTYPE error. (cherry picked from commit 26e06ad617bb416201c769fea91cd33d544c6a1c)
* [3.11] gh-108388: Split test_multiprocessing_spawn (GH-108396) (#109688)Miss Islington (bot)2023-09-2118-27/+113
| | | | | | | | | | | gh-108388: Split test_multiprocessing_spawn (GH-108396) Split test_multiprocessing_fork, test_multiprocessing_forkserver and test_multiprocessing_spawn into test packages. Each package is made of 4 sub-tests: processes, threads, manager and misc. It allows running more tests in parallel and so reduce the total test duration. (cherry picked from commit aa9a359ca2663195b0f04eef46109c28c4ff74d3) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-108303: Move tokenize-related data to Lib/test/tokenizedata ↵Victor Stinner2023-09-2116-23/+38
| | | | | | | | | | | | | | | (GH-109265) (#109678) * gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265) (cherry picked from commit 1110c5bc828218086f6397ec05a9312fb73ea30a) * gh-108303: Add `Lib/test/tokenizedata` to `TESTSUBDIRS` (#109314) (cherry picked from commit 42ab2cbd7b5e76e919b70883ae683e789dbd913d) --------- Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-108303: Move `test_future` into its own test_future_stmt subdir ↵Victor Stinner2023-09-2117-19/+36
| | | | | | | | | (#109368) (#109680) gh-108303: Move `test_future` into its own test_future_stmt subdir (#109368) (cherry picked from commit 82505dc351b2f7e37aa395218709b432d83292cd) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-109546: Add more tests for formatting floats (GH-109548) (#109685)Victor Stinner2023-09-211-2/+7
| | | | | | | gh-109546: Add more tests for formatting floats (GH-109548) (cherry picked from commit beb5ec5817b645562ebbdd59f25683a93061c32c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-108303: Create Lib/test/test_dataclasses/ directory (#108978) ↵Victor Stinner2023-09-217-6/+6
| | | | | | | | | | | | (#109675) gh-108303: Create Lib/test/test_dataclasses/ directory (#108978) Move test_dataclasses.py and its "dataclass_*.py" modules into the new Lib/test/test_dataclasses/ subdirectory. Backport to 3.11: update Lib/test/.ruff.toml. (cherry picked from commit 14d6e197cc56e5256d501839a4e66e3864ab15f0)
* [3.11] gh-108303: Move `ann_module*.py` files to `typinganndata/` folder ↵Victor Stinner2023-09-2113-9/+13
| | | | | | | | | (#108354) (#109673) gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (#108354) (cherry picked from commit 3f61cf646d0506baa0c0c2118f05110446519c62) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-108303: Remove unused Lib/test/sgml_input.html (GH-108305) (#109670)Miss Islington (bot)2023-09-211-212/+0
| | | | | | | | | | gh-108303: Remove unused Lib/test/sgml_input.html (GH-108305) In Python 2.7, the file was used by Lib/test/test_sgmllib.py to test Lib/sgmllib.py. The sgmllib module and its tests have been removed in Python 3.0. (cherry picked from commit d2879f2095abd5c8186c7f69c964a341c2053572) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] Fix typos in docs and comments (#109619) (#109622)Alex Waygood2023-09-203-3/+3
| | | Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
* [3.11] gh-103053: Skip test_freeze_simple_script() on PGO build (#109591) ↵Victor Stinner2023-09-204-10/+31
| | | | | | | | | | | | | | | | (#109616) gh-103053: Skip test_freeze_simple_script() on PGO build (#109591) Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils. (cherry picked from commit 81cd1bd713624c3d26b647f3d28f2fd905887a0d)
* [3.11] gh-108843: fix ast.unparse for f-string with many quotes (#108980)Shantanu2023-09-181-0/+5
| | | | | | | | | | | * [3.11] gh-108843: fix ast.unparse for f-string with many quotes * 📜🤖 Added by blurb_it. * simplify --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* [3.11] gh-60283: Check for redefined test names in CI (#109161) (#109366)Hugo van Kemenade2023-09-151-0/+30
| | | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> (cherry picked from commit 3cb9a8edca6e3fa0f0045b03a9a6444cf8f7affe)
* [3.11] gh-108822: Fix regrtest clear_caches() (#109432)Victor Stinner2023-09-151-7/+0
| | | | | gh-108822: Fix regrtest clear_caches() Python 3.11 doesn't have fractions._hash_algorithm cache.
* [3.11] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) ↵Miss Islington (bot)2023-09-141-3/+7
| | | | | | | | | | | (#109427) gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) Use a longer key: FIPS mode requires at least of at least 112 bits. The previous key was only 32 bits. (cherry picked from commit e091b9f20fa8e409003af79f3c468b8225e6dcd3) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109351: Fix crash when compiling AST with invalid NamedExpr ↵Miss Islington (bot)2023-09-131-0/+27
| | | | | | | | (GH-109352) (#109380) gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352) (cherry picked from commit 79101edb03b7381b514126c68acabfcbbba2f842) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.11] gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360) (#109362)Miss Islington (bot)2023-09-131-0/+8
| | | | | | | | | | | gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360) Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora 38). Search patterns in gdb "bt" command output to detect when gdb fails to retrieve the traceback. For example, skip a test if "Backtrace stopped: frame did not save the PC" is found. (cherry picked from commit 44d9a71ea246e7c3fb478d9be62c16914be6c545) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109179: Fix traceback display for SyntaxErrors with notes ↵Irit Katriel2023-09-121-21/+22
| | | | | | | (#109197) (#109283) gh-109179: Fix traceback display for SyntaxErrors with notes (#109197) (cherry picked from commit ecd21a629a2a30bcae89902f7cad5670e9441e2c)