Skip to content

Update collections from v3.14.3#7344

Merged
youknowone merged 2 commits intoRustPython:mainfrom
youknowone:upgrade/collections
Mar 4, 2026
Merged

Update collections from v3.14.3#7344
youknowone merged 2 commits intoRustPython:mainfrom
youknowone:upgrade/collections

Conversation

@youknowone
Copy link
Member

Summary

  • Updated Lib/collections and Lib/_collections_abc.py from CPython v3.14.3
  • Updated Lib/test/mapping_tests.py with upstream test changes (assertHasAttr, exceeds_recursion_limit, etc.)
  • Preserved RustPython-specific defaultdict Python fallback (_defaultdict.py) since _collections.defaultdict is not yet implemented in Rust
  • Updated existing @expectedFailure markers with error descriptions in test_collections.py and test_deque.py

Test plan

  • test_collections, test_deque, test_defaultdict, test_ordered_dict all pass
  • Dependent tests pass: test_dict, test_dictviews, test_set, test_typing, test_weakref, test_weakset, test_json, test_configparser, test_copy, test_enum, test_functools, test_reprlib, test_pprint, test_csv, test_userdict, test_shelve, test_frame

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • Lib/test/mapping_tests.py is excluded by !Lib/**
  • Lib/test/test_collections.py is excluded by !Lib/**
  • Lib/test/test_deque.py is excluded by !Lib/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: fe19ccd5-4cf1-42f8-b5a6-b72947e31958

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[ ] lib: cpython/Lib/smtplib.py
[x] test: cpython/Lib/test/test_smtplib.py
[x] test: cpython/Lib/test/test_smtpnet.py

dependencies:

  • smtplib (native: email.base64mime, email.generator, email.message, email.utils, sys)
    • base64, copy, datetime, hmac, io, re, socket, ssl

dependent tests: (5 tests)

  • smtplib: test_smtplib test_smtpnet
    • logging.handlers: test_concurrent_futures test_logging test_pkgutil

[ ] lib: cpython/Lib/collections
[x] lib: cpython/Lib/_collections_abc.py
[x] test: cpython/Lib/test/test_collections.py (TODO: 3)
[x] test: cpython/Lib/test/test_deque.py (TODO: 3)
[x] test: cpython/Lib/test/test_defaultdict.py (TODO: 1)
[x] test: cpython/Lib/test/test_ordered_dict.py (TODO: 8)

dependencies:

  • collections (native: _collections, _weakref, itertools, sys)
    • _collections_abc
    • _collections_abc, abc, annotationlib, copy, heapq, keyword, operator, reprlib, warnings

dependent tests: (299 tests)

  • collections: test_annotationlib test_array test_asyncio test_bisect test_builtin test_c_locale_coercion test_call test_collections test_configparser test_contains test_copy test_csv test_ctypes test_defaultdict test_deque test_descr test_dict test_dictviews test_enum test_exception_group test_file test_fileinput test_fileio test_frame test_funcattrs test_functools test_genericalias test_hash test_httpservers test_inspect test_io test_ipaddress test_iter test_iterlen test_json test_logging test_math test_monitoring test_ordered_dict test_pathlib test_patma test_pickle test_plistlib test_pprint test_pydoc test_random test_reprlib test_richcmp test_set test_shelve test_sqlite3 test_statistics test_string test_struct test_sys test_traceback test_tuple test_types test_typing test_unittest test_urllib test_userdict test_userlist test_userstring test_weakref test_weakset test_with
    • ast: test_ast test_compile test_compiler_codegen test_dis test_fstring test_future_stmt test_site test_ssl test_type_comments test_ucn test_unparse
      • annotationlib: test_type_annotations test_type_params
      • dbm.dumb: test_dbm_dumb
      • inspect: test_abc test_argparse test_asyncgen test_buffer test_code test_coroutines test_decimal test_generators test_grammar test_ntpath test_operator test_posixpath test_signal test_yield_from test_zipimport test_zoneinfo
      • pyclbr: test_pyclbr
      • traceback: test_asyncio test_code_module test_contextlib test_contextlib_async test_dictcomps test_exceptions test_http_cookiejar test_importlib test_listcomps test_pyexpat test_setcomps test_socket test_subprocess test_threadedtempfile test_threading test_unittest
    • asyncio: test_asyncio test_os test_sys_settrace
    • concurrent.futures._base: test_concurrent_futures
    • dbm.sqlite3: test_dbm_sqlite3
    • difflib: test_difflib
    • dis: test__opcode test_compiler_assemble test_dtrace test_opcache test_peepholer test_positional_only_arg
      • bdb: test_bdb
      • trace: test_trace
    • email.feedparser: test_email
    • http.client: test_docxmlrpc test_hashlib test_unicodedata test_urllib2 test_wsgiref test_xmlrpc
      • urllib.request: test_sax test_urllib2_localnet test_urllib2net test_urllibnet
    • importlib.metadata: test_importlib
    • inspect:
      • cmd: test_cmd
      • dataclasses: test__colorize test_ctypes test_regrtest
      • pkgutil: test_pkgutil test_runpy
      • rlcompleter: test_rlcompleter
    • logging: test_support
      • hashlib: test_hmac test_smtplib test_tarfile
      • multiprocessing.util: test_compileall test_concurrent_futures
      • venv: test_venv
    • multiprocessing: test_fcntl test_memoryview test_multiprocessing_main_handling test_re
    • platform: test__locale test__osx_support test_android test_baseexception test_cmath test_ctypes test_mimetypes test_platform test_posix test_shutil test_sysconfig test_time test_winreg
    • pprint: test_htmlparser test_sys_setprofile
      • pickle: test_bool test_bytes test_bz2 test_codecs test_concurrent_futures test_ctypes test_email test_enumerate test_fractions test_http_cookies test_itertools test_list test_lzma test_memoryio test_minidom test_picklebuffer test_pickletools test_range test_slice test_str test_type_aliases test_unittest test_uuid test_xml_dom_minicompat test_xml_etree test_zipfile test_zlib test_zoneinfo
    • queue: test_dummy_thread test_sched
    • selectors: test_selectors
      • socket: test_epoll test_exception_hierarchy test_ftplib test_httplib test_imaplib test_kqueue test_largefile test_mailbox test_mmap test_pty test_smtpnet test_socketserver test_stat test_timeout test_urllib_response
      • subprocess: test_atexit test_audit test_cmd_line test_cmd_line_script test_ctypes test_faulthandler test_file_eintr test_gc test_gzip test_json test_launcher test_msvcrt test_osx_env test_poll test_py_compile test_quopri test_repl test_script_helper test_select test_tempfile test_unittest test_utf8_mode test_wait3 test_webbrowser test_zipfile
    • shlex: test_shlex
    • shutil: test_filecmp test_glob test_importlib test_string_literals test_unicode_file
      • ctypes.util: test_ctypes
      • ensurepip: test_ensurepip
      • pathlib: test_importlib test_pathlib test_tomllib test_tools test_winapi test_zipapp test_zstd
      • tempfile: test_doctest test_importlib test_linecache test_pkg test_tabnanny test_termios test_winconsoleio test_zipfile64
      • zipfile: test_zipfile
    • statistics:
      • random: test_complex test_context test_devpoll test_float test_heapq test_int test_long test_numeric_tower test_pow test_queue test_sort test_strtod test_thread test_tokenize
    • string: test_email test_fnmatch test_secrets test_string
    • threading: test_concurrent_futures test_ctypes test_fork1 test_importlib test_robotparser test_super test_syslog test_threading_local
      • dummy_threading: test_dummy_threading
      • sysconfig: test_tools
    • traceback:
      • timeit: test_timeit
    • urllib.parse: test_urlparse
    • wave: test_wave

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@youknowone youknowone merged commit 745efbd into RustPython:main Mar 4, 2026
13 of 14 checks passed
@youknowone youknowone deleted the upgrade/collections branch March 4, 2026 15:32
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.

1 participant