Skip to content

Conversation

@terryluan12
Copy link
Contributor

@terryluan12 terryluan12 commented Jan 18, 2026

So I know I was told to make all the downgrading changes in one big PR.
I have now also made all of the adding untracked tests in one big PR lmao.

(Please let me know if I should create individual PR's. I absolutely understand if I do, since this is massive)

This PR adds (most of) the rest of the untracked test libraries from version 3.13.11 that were left to be added.
I did not import the libraries themselves, as even I thought that was too much for one PR lol

I plan to update the libraries to v3.14.2 before merging, but I figure I will probably have to separate out at least some tests, so wanted to get out this PR before I do anything else

There are 6 commits, that I organized in a way where it should be easier to review. Specifically:

  1. Updated all tests/test helper files... - just a pure "copy-paste" (I used the lib-updater tool, for the non-brand new tests) of the libraries.
  2. Used a mixture of the bash script I coded up + manual annotation to add expectedFailures/skips
  3. I used raise unittest.SkipTest or import_helper.import_module to skip test files which needed modules that were not implemented
  4. For the doctests, I skipped the tests, and added a big chunk at the top clarifying the specific lines of codes and errors that arose (many are simple wording changes)
  5. There were a couple trouble files where I commented out large chunks of code, because it wouldn't run otherwise; I just wanted to ask if there were any recommendations on better ways to fix the files in question (test_type_aliases.py + test_type_params.py.
  6. By reformatting annotations, it should make using the lib_updater easier to use (so only major changes are noted)

A list of everything I added/updated (as well as some tests I had questions about)

New files:
* cjkencodings/
* crashers/
* leakers/
* regrtestdata/
* test_capi/
* test_gdb/
* test_interpreters/
* test_module/
* test_pydoc/
* test_sqlite3/
* test_tkinter/
* test_ttk/
* tkinterdata/
* tokenizedata/
* wheeldata/
* _test_embed_set_config.py
* _test_embed_structseq.py
* test_monitoring_shutdown.py
* .ruff.toml
* audit-tests.py
* bisect_cmd.py
* clinic.test.c
* cov.py
* curses_tests.py
* dis_module.py
* empty.vbs
* levenshtein_examples.json
* memory_watchdog.py
* multibytecodec_support.py
* profilee.py
* pstats.pck
* reperf.py
* ssltests.py
* test__interpchannels.py
* test__interpreters.py
* test__locale.py
* test_asdl_parser.py
* test_clinic.py
* test_coroutines.py
* test_cprofile.py
* test_curses.py
* test_dbm
*.py
* test_embed.py
* test_extcall.py
* test_fileutils.py
* test_finalization.py
* test_flufl.py
* test_fork1.py
* test_frame.py
* test_frozen.py
* test_gc.py
* test_generator_stop.py
* test_genexps.py
* test_getpath.py
* test_idle.py
* test_imaplib.py
* test_launcher.py
* test_lltrace.py
* test_metaclass.py
* test_minidom.py
* test_modulefinder.py
* test_multibytecodec.py
* test_osx_env.py
* test_pdb.py
* test_peepholer.py
* test_pep646_syntax.py
* test_poplib.py
* test_profile.py
* test_pstats.py
* test_readline.py
* test_sax.py
* test_select.py
* test_source_encoding.py
* test_stable_abi_ctypes.py
* test_startfile.py
* test_strptime.py
* test_tcl.py
* test_threadsignals.py
* test_tracemalloc.py
* test_ttk_textonly.py
* test_turtle.py
* test_type_annotations.py
* test_type_cache.py
* test_unpack_ex.py
* test_unparse.py
* test_winconsoleio.py
* test_winsound.py
* test_zipimport_support.py

Modified files:
* test_dataclasses/
* test_importlib/
* test_zoneinfo/
* xmltestdata/
* test_except_star.py
* test_lzma.py
* test_struct.py
* test_winapi.py

Ignored files - I'm 90% sure I'm good to ignore it:
* test_cext/ - Test C extensions
* test_cppext/ - Test Cpp extensions
* test_peg_generator/ - Parser Generator tests
* test_xxlimited.py - CPython Internal tool
* test_xxtestfuzz.py - CPython Internal tool
* test_dict_version.py - Not importing per #5529

Ignored files - Bytecode/compilation specific files (please verify):
* test_compiler_assemble.py
* test_compiler_codegen.py

Ignored files - Ignored because I'm completely unsure:
* test_external_inspection.py
* test_generated_cases.py
* test_optimizer.py

These are tests which were added, but are not notated on #5529. Please verify if they should be added:
* test_free_threading/ - tests for multithreading
* test_apple.py - Apple tests
* test_codecencodings_.py - RustPython states that only utf-8 encoding is supported. Is this temporary?
* test_codecmaps_
.py - RustPython states that only utf-8 encoding is supported. Is this temporary?
* test_monitoring.py
* test_msvcrt.py - Windows tests
* test_perfmaps.py
* test_perf_profiler.py
* test_termios.py - Termios is not mentioned in RustPython#5529
* test_type_aliases.py
* test_type_params.py
* test_wmi.py
* win_console_handler.py

New files:
    * cjkencodings/
    * crashers/
    * leakers/
    * regrtestdata/
    * test_capi/
    * test_gdb/
    * test_interpreters/
    * test_module/
    * test_pydoc/
    * test_sqlite3/
    * test_tkinter/
    * tkinterdata/
    * tokenizedata/
    * wheeldata/
    * _test_embed_set_config.py
    * _test_embed_structseq.py
    * _test_monitoring_shutdown.py
    * .ruff.toml
    * audit-tests.py
    * bisect_cmd.py
    * clinic.test.c
    * cov.py
    * curses_tests.py
    * dis_module.py
    * empty.vbs
    * levenshtein_examples.json
    * memory_watchdog.py
    * multibytecodec_support.py
    * profilee.py
    * pstats.pck
    * reperf.py
    * ssltests.py
    * test__interpchannels.py
    * test__interpreters.py
    * test__locale.py
    * test_asdl_parser.py
    * test_clinic.py
    * test_coroutines.py
    * test_cprofile.py
    * test_curses.py
    * test_dbm_*.py
    * test_extcall.py
    * test_fileutils.py
    * test_finalization.py
    * test_flufl.py
    * test_fork1.py
    * test_frame.py
    * test_embed.py
    * test_frozen.py
    * test_gc.py
    * test_generator_stop.py
    * test_genexps.py
    * test_getpath.py
    * test_imaplib.py
    * test_launcher.py
    * test_lltrace.py
    * test_metaclass.py
    * test_minidom.py
    * test_modulefinder.py
    * test_multibytecodec.py
    * test_osx_env.py
    * test_pdb.py
    * test_peepholer.py
    * test_pep646_syntax.py
    * test_poplib.py
    * test_profile.py
    * test_pstats.py
    * test_readline.py
    * test_sax.py
    * test_select.py
    * test_source_encoding.py
    * test_stable_abi_ctypes.py
    * test_startfile.py
    * test_strptime.py
    * test_tcl.py
    * test_ttk/
    * test_ttk_textonly.py
    * test_threadsignals.py
    * test_tracemalloc.py
    * test_turtle.py
    * test_type_annotations.py
    * test_type_cache.py
    * test_unpack_ex.py
    * test_unparse.py
    * test_winconsoleio.py
    * test_winsound.py
    * test_free_threading/ - It seems to be a test for GIL, which RustPython doesn't have, but also the folder already exists and has a `test_tokenize` in it?
    * test_apple.py - Apple tests
    * test_codecencodings_*.py - RustPython states that only utf-8 encoding is supported. Is this temporary?
    * test_codecmaps_*.py - RustPython states that only utf-8 encoding is supported. Is this temporary?
    * test_idle.py - Is idle going to be supported?
    * test_monitoring.py
    * test_msvcrt.py - Windows tests
    * test_perfmaps.py
    * test_perf_profiler.py
    * test_termios.py - Termios is not mentioned in RustPython#5529
    * test_type_aliases.py
    * test_type_params.py
    * test_wmi.py
    * test_zipimport_support.py
    * win_console_handler.py

Modified files:
    * certdata/
    * libregrtest/
    * test_dataclasses/
    * test_import/
    * test_importlib/
    * test_tomllib/
    * test_zipfile/
    * test_zoneinfo/
    * typinganndata/
    * xmltestdata/
    * test_except_star.py
    * test_lzma.py
    * test_struct.py
    * test_winapi.py
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@terryluan12 terryluan12 marked this pull request as draft January 18, 2026 09:22
@youknowone
Copy link
Member

Thanks. I will merge it as long as it pass CI. If not, splitting will be preferred. (and goes to 3.14, yeah)
I honestly don't believe this size patch can run without break.

We usually also don't bring test when we don't have feature. e.g. test_capi will test nothing right now.
That will become future burden to update them to new version without any benefit - because our library update is not an automated way yet.

@terryluan12 terryluan12 force-pushed the update_remaining_tests_semiautomated branch from 7e74525 to fcac1c4 Compare January 18, 2026 09:45
Comment on lines +1 to +18
# TODO: RUSTPYTHON
try:
nonlocal_ex = """\
def f():
x = 1
def g():
nonlocal x
x = 2
y = 7
def h():
nonlocal x, y
"""
import ast
import unittest
ast1 = ast.parse(nonlocal_ex)
code2 = ast.unparse(ast1)
except AttributeError:
raise unittest.SkipTest('TODO: RUSTPYTHON; type_comment attribute not implemented. FunctionDef, AsyncFunctionDef, For, AsyncFor, With and AsyncWith should have attribute')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add any tests with patched raise unittest.SkipTest
This is actually not being tested. And even when we implement it, this is not automatically detected,

We discussed a few times about skip, we don't like it. Please do not add skip without significant benefits.

@youknowone
Copy link
Member

And we have to split the patch. json already got conflict. Other libraries will be too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants