Repository navigation
Align OS argument conversion and syscall handling with Python 3.15 - #9146
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters: 7
📒 Files selected for processing: 7
✨ Finishing Touches
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. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: :4: SyntaxWarning: invalid decimal literal dependencies:
dependent tests: (186 tests)
Legend:
|
Import canonical os tests through update_lib, retaining existing guards. Preserve raw descriptor validation, errno, audit ordering, signal retries and unlocked sendfile buffers. Validation: independent source review passed; matching release build and nine bounded canonical cases pending. Assisted-by: OpenAI Codex:model version unavailable
Add hash-pinned selective assignment migration within test.support and import the three Python 3.15.0 privilege helpers plus their public exports. Preserve unrelated support helpers and existing test markers. Validation: 177 host updater tests pass; byte-identical canonical helper provenance verified. Independent source review passed. Native import validation pending integration onto current main. Assisted-by: OpenAI Codex:model version unavailable
3f91766 to
948ebad
Compare
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 948ebad7a7
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if count > i32::MAX as usize { | ||
| return Err(vm.new_overflow_error(format!("sendfile() {kind} is too large"))); | ||
| } | ||
| let mut v = Vec::with_capacity(count); |
There was a problem hiding this comment.
Reserve sendfile sequence capacity fallibly
On macOS, a custom headers or trailers sequence whose __len__ reports a huge value (up to i32::MAX) reaches this allocation before any __getitem__ call. Vec::with_capacity handles allocation failure through Rust's OOM path, which aborts the interpreter, so even a sequence that would immediately raise IndexError can terminate the process instead of producing MemoryError or its normal exception; reserve fallibly and map failure to vm.no_memory_error().
Useful? React with 👍 / 👎.
| from .utils import create_file | ||
|
|
||
|
|
||
| class Win32KillTests(unittest.TestCase): |
There was a problem hiding this comment.
Preserve the removed Windows error tests
When running the suite on Windows, the split into this new module omits the parent revision's entire Win32ErrorTests class (test_rename, test_remove, test_chdir, test_mkdir, test_utime, and test_chmod); a repo-wide search under Lib/test/test_os confirms that class was not relocated. Preserve those bodies in test_windows.py so the package migration does not delete platform-specific test logic, which the repository explicitly forbids.
AGENTS.md reference: AGENTS.md:L276-L282
Useful? React with 👍 / 👎.
|
|
||
|
|
||
| def load_tests(*args): | ||
| return load_package_tests(os.path.dirname(__file__), *args) |
There was a problem hiding this comment.
Update the OS test dependency after the package move
With the OS tests now represented by this package, DEPENDENCIES["os"]["test"] in scripts/update_lib/deps.py:689-693 still names test_os.py. get_test_paths() gives that explicit entry priority, and cmd_quick.py:415-418 warns and skips it when absent, so the next quick update of Lib/os.py will update test_popen.py but leave this entire package stale; change the dependency entry to test_os.
Useful? React with 👍 / 👎.
Summary
Rebased onto main at
9e18d7be6b90cec1fa01429a2955f1623dd53d4c, preserving the merged #9142 updater behavior. The CI repair adds six canonicaltest.supportlines through an actualupdate_lib migrateinvocation pinned to CPythond220409a13b77de7a6c30abe16ea90db01528edc: three root-user decorator assignments and two export names. Unrelated existing support helpers and customizations remain intact. The existing updater and its tests gain a narrowly scoped, hash-pinned selectivetest.supportimport mode with dependency and mode-conflict checks.This PR excludes closerange (#9031), mmap (#9141), getpath/sysconfig/venv and test_io changes.
Validation
Independent source/integration review and normal commit hooks passed.
Current rebased head
948ebad7a7e6be094e63445fc13a9870527172de:threading,stdlib,stdio,importlib,host_env).test.supportand the canonicaltest.test_os.test_osmodule, checking the imported helpers and root/non-root decorator flags/reasons in a non-root environment. Zero test bodies, loaders or fixtures were run.Historical focused runtime coverage on the original head
3f91766266469f922b44b32dbcbe630dbff591db:Those historical OS cases were not rerun on the rebased head. No broad OS suite, root-account execution or cross-platform local validation is claimed.
Remaining differences and coverage limits