Repository navigation
Update Lib free-threading core API tests to Python 3.15 - #9428
youknowone merged 3 commits into
Conversation
Migrate eight canonical files with scripts/update_lib. Defer deque and CSV concurrency tests pending native semantics work. Assisted-by: OpenAI Codex: model version unavailable
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters: 19
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including
|
Migrate seven Python 3.15 modules using scripts/update_lib, preserving canonical assertions and package gates. Concurrency behavior remains for hosted CI verification. Assisted-by: OpenAI Codex: model version unavailable
Migrate four unchanged Python 3.15 modules with scripts/update_lib. Preserve canonical coverage limits; scanner execution-guard parity remains separate native work. Assisted-by: OpenAI Codex: model version unavailable
📦 Library DependenciesThe 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:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
scripts/update_lib migrateto add the canonical Python 3.15 free-threading package initializer and eighteen reviewed API test modules: bisect, exceptions, functions, functools, threading, types, string template races, methodcaller, enumerate, reversed, zip, itertools combinations/product, context, function annotations, list mutations, suggestions, system settings, and regular expressions.d220409a13b77de7a6c30abe16ea90db01528edc. No test edits, RustPython skips, native changes, or dependency changes.test_collectionsandtest_csvremain deferred: deque mutation errors and CSV reader generation errors differ from canonical concurrency expectations. Their CPython critical-section semantics need separate native work; simply locking across arbitrary user callbacks risks reentrant deadlocks.Runtime scope and limitations
RustPython advertises
Py_GIL_DISABLED=1, so the canonical package gate does not skip these tests. Existing APIs and native locking paths were source-reviewed, but concurrency behavior has not been executed or proven compatible locally. There are 44 class test methods (approximately 46 cases by static inheritance, not runtime discovery; the combinatoric module's top-leveltest_concurrent_iterationfunction is only a helper).Most workers have fixed loops or drain finite immutable inputs. List append/extend readers instead depend on successful completion of their 5,000-item writer; failure of that writer may strand readers. The list group has up to 11 simultaneous workers, and its reader iteration count is scheduling-dependent. The context writer is event-terminated: readers set the event in
finally, andstart_threadsalso calls its unlock callback to set it. Barriers and several direct joins/executor waits have no individual timeout. The existing native CI regrtest--timeout 600provides outer subprocess containment, not a guarantee of termination, deadlock freedom, or runtime success.Coverage is deliberately described narrowly: zip primarily checks concurrent exhaustion, not atomic tuple pairing or ordering; enumerate does not assert item/index pairing; combinations tests
r=2, not the separater=0state path. Passing these tests would not prove general concurrent iterator atomicity. The regex scanner regression permits executions without a concurrent-entry error and checks neither ordering nor match counts: RustPython still lacks CPython's scanner execution guard, so this does not establish scanner concurrency equivalence. The canonical integer-string-limit test captures the final loop variable in its lambdas, so it exercises simultaneous setters rather than mixed getters/setters; the dlopenflags test retains its canonical capability skip. Those broader native semantics remain separate compatibility work.Validation
PYTHONPATH=scripts <CPython 3.15 host> -m unittest discover -s scripts/update_lib/tests: 228 passed after the four-file extension.git diff --checkpassed.