Repository navigation
Use 64-bit Windows CRT and FILETIME timestamps - #9116
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 8
✨ 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 |
Use the explicit 64-bit CRT ABI regardless of libc time_t width, and preserve 64-bit FILETIME seconds throughout stat producers and consumers. Add bounded Windows regressions for 2040 calendar and stat conversions while retaining existing historical timestamps and error behavior. AI assistance: OpenAI Codex implemented and independently source-reviewed this split, prepared bounded Python regressions and performed cross-target compile checks. Windows runtime and human manual testing are not claimed. Assisted-by: OpenAI Codex:model version unavailable
3993790 to
a94fc72
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
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: a94fc72537
ℹ️ 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".
| assert os.name == "posix" or os.name == "nt" | ||
|
|
||
|
|
||
| def windows_stat_preserves_time64(): |
There was a problem hiding this comment.
Remove the prohibited snippet-test additions
The new windows_stat_preserves_time64 function adds fresh assertions and test logic to an existing test file, as do test_windows_time64 in stdlib_datetime.py and the new Windows block in stdlib_time.py; repository policy limits test-file changes to adding or removing expected-failure markers, so these regression additions need to be removed or relocated before this patch can comply.
AGENTS.md reference: AGENTS.md:L275-L279
Useful? React with 👍 / 👎.
Summary
Split the Windows timestamp-width correction out of #8954, preserving current main's negative FILETIME fallback and historical timezone-offset handling.
libc::time64_tconsistently for explicit_gmtime64_s,_localtime64_s,_mktime64, and_time64calls and their VM/datetime consumers.libc0.2.189 can definetime_tasi32on x86 Windows GNU.stat/fstat/scandirtimestamps on one temporary file. Existing tests, nanosecond handling, error mapping, musl annotations, and datetime fold probing remain intact.No Lib changes, pytime migration, profiler/sleep changes, or os.utime implementation changes.
Validation
Rebased without patch changes onto main
016ed92f9(including #9117) after the previous head encountered the shared malachite 0.13/0.14 example-build failure. Current head:a94fc72537124b75c8168f121e14c04384f78e35.git range-diffconfirms the same eight-file patch; no #9118 changes were cherry-picked. Both Windows host_env compile checks were rerun successfully after rebase. Linux check/Clippy results below belong to the pre-rebase head399379064; full Linux checks were not repeated for this patch-identical rebase.cargo fmt --all --check,git diff --check, and normal repository commit hooks.cargo check --locked -p rustpython-host_env --no-default-featuresfor bothi686-pc-windows-gnuandx86_64-pc-windows-gnu, using official stable rustup targets.28393e932reproduced four timestamp-width compile errors; all four are resolved by this split.cargo check --locked -p rustpython-host_env -p rustpython-vm -p rustpython-stdlibwith default package features.cargo clippy --locked -p rustpython-host_env -p rustpython-vm -p rustpython-stdlibwith no warnings.Windows checks above are compile-only: no Windows linking or runtime testing was performed, and the new Windows-gated regressions have not run locally. Full Windows VM/stdlib cross-compilation requires a C/assembly toolchain for mandatory dependencies that is not installed here. Linux checks do not validate Windows-only code. Full workspace/C-API tests and Python regression suites were not run locally. Keeping this draft pending Windows CI/runtime validation.
Exact source comparison with #9110 head
efaf621dfound no overlapping nt.rs hunks; no changes were imported from that PR.AI assistance
OpenAI Codex implemented and independently source-reviewed this split, prepared regression tests, and performed the automated checks listed above. No human manual testing is claimed.