Skip to content

Update Lib iterator and group concurrency tests to Python 3.15 - #9436

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:youknowdot/free-threading-iterators-315-20261028
Oct 29, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:youknowdot/free-threading-iterators-315-20261028

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Sync the missing canonical Python 3.15 free-threading itertools and grp suites (11 test methods).

Both files are copied through scripts/update_lib migrate from CPython d220409a13b77de7a6c30abe16ea90db01528edc, byte-identical. No new markers, assertion changes, native changes, or duplicated package initializer.

Validation and scope

  • Updater unit tests: 228 passed. Applicable configured hooks and diff checks passed.
  • Selected native iterator state/reference lifetime and group-database APIs were independently source-reviewed. No local concurrency tests, NSS/provider operations, or native builds were run. Hosted CI must establish runtime results.
  • Iterator tests mostly check exhaustion and unexpected errors, not ordered/exact results or general iterator atomicity. The tee tests permit RuntimeError as upstream does.
  • The iterator suite starts 2,068 threads over its rounds, at most 10 simultaneously, and can consume about 3.4 million tee items. Existing CI's 600-second timeout is outer containment, not a fixed completion-time or deadlock guarantee.
  • Source review found a possible initial-cache publication race in cycle; the same fetch-then-cache structure exists in canonical CPython. This is not established as a RustPython-specific difference, and the unchanged canonical test retains the ability to expose it.
  • Group tests perform 20 full enumerations. Extended lookups are capped by an existing post-enumeration 1,000-entry skip, but enumeration itself has no fixed entry bound. NSS providers can block or perform network reads, and concurrent database changes can affect round-trip assertions. No provider settings are changed.
  • RustPython passes the package GIL-disabled gate; ordinary threading and module/platform gates remain unchanged.

Sync unchanged canonical iterator and group database regression suites with existing capability gates.

Assisted-by: OpenAI Codex: model version unavailable
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

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

[ ] test: cpython/Lib/test/test_free_threading

dependencies:

dependent tests: (no tests depend on free_threading)

Legend:

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

@youknowone
youknowone marked this pull request as ready for review October 29, 2026 00:40
@youknowone
youknowone merged commit f1bdf88 into RustPython:main Oct 29, 2026
21 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-29T00:41:22.560233Z
We couldn’t complete this review. Comment @codex review to try again.
c705b73 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

3 participants