Skip to content

Update libc to 0.2.177#6300

Merged
youknowone merged 2 commits intoRustPython:mainfrom
ShaharNaveh:update-libc-177
Nov 27, 2025
Merged

Update libc to 0.2.177#6300
youknowone merged 2 commits intoRustPython:mainfrom
ShaharNaveh:update-libc-177

Conversation

@ShaharNaveh
Copy link
Contributor

@ShaharNaveh ShaharNaveh commented Nov 27, 2025

Summary by CodeRabbit

  • Chores
    • Updated dependencies for improved stability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

Dependency version bump for libc from 0.2.169 to 0.2.177 across Cargo.toml, posix.rs imports, and libc_posix.py script. Import reorganization in posix.rs groups related constants but preserves functionality. No logic changes.

Changes

Cohort / File(s) Summary
libc dependency version update
Cargo.toml, scripts/libc_posix.py
Version bumped from 0.2.169 to 0.2.177 in Cargo.toml dependencies; LIBC_VERSION constant updated from "0.2.175" to "0.2.177" in script.
POSIX import reorganization
crates/vm/src/stdlib/posix.rs
libc constants (F_TEST, F_TLOCK, F_ULOCK, O_NDELAY, O_NOCTTY, O_SYNC, P_ALL, P_PGID, P_PID, SCHED_FIFO, SCHED_RR) relocated and regrouped across import blocks; net set of imports unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • youknowone

Poem

🐰 A version hop, so small and neat,
From .169 to .177 we leap,
Constants shuffled in their place,
With libc dancing through the space,
Dependencies fresh, scripts aligned,
Smooth sailing for the codebase kind! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: updating the libc dependency from 0.2.169 to 0.2.177.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e7a490 and 081a8f0.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • Cargo.toml (1 hunks)
  • crates/vm/src/stdlib/posix.rs (2 hunks)
  • scripts/libc_posix.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.rs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.rs: Follow the default rustfmt code style in Rust code (cargo fmt to format)
Always run clippy to lint Rust code (cargo clippy) before completing tasks and fix any warnings or lints introduced by your changes
Follow Rust best practices for error handling and memory management

Files:

  • crates/vm/src/stdlib/posix.rs
**/src/**/*.rs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use the macro system (pyclass, pymodule, pyfunction, etc.) when implementing Python functionality in Rust

Files:

  • crates/vm/src/stdlib/posix.rs
**/*.py

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.py: Follow PEP 8 style for custom Python code
Use ruff for linting Python code

Files:

  • scripts/libc_posix.py
🧠 Learnings (3)
📚 Learning: 2025-06-27T14:47:28.810Z
Learnt from: moreal
Repo: RustPython/RustPython PR: 5847
File: vm/src/stdlib/stat.rs:547-567
Timestamp: 2025-06-27T14:47:28.810Z
Learning: In RustPython's stat module implementation, platform-specific constants like SF_SUPPORTED and SF_SYNTHETIC should be conditionally declared only for the platforms where they're available (e.g., macOS), following CPython's approach of optional declaration rather than providing fallback values for other platforms.

Applied to files:

  • crates/vm/src/stdlib/posix.rs
📚 Learning: 2025-06-27T14:47:28.810Z
Learnt from: moreal
Repo: RustPython/RustPython PR: 5847
File: vm/src/stdlib/stat.rs:547-567
Timestamp: 2025-06-27T14:47:28.810Z
Learning: In RustPython's stat module implementation, platform-specific constants like SF_SUPPORTED and SF_SYNTHETIC should be conditionally declared only for the platforms where they're available (e.g., macOS), following CPython's approach of optional declaration using #ifdef checks rather than providing fallback values for other platforms.

Applied to files:

  • crates/vm/src/stdlib/posix.rs
📚 Learning: 2025-11-25T11:05:02.899Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T11:05:02.899Z
Learning: Applies to Lib/**/*.py : Minimize modifications to CPython standard library files in the Lib/ directory

Applied to files:

  • scripts/libc_posix.py
🔇 Additional comments (4)
Cargo.toml (1)

178-178: Workspace libc version bump looks consistent

libc is now pinned to 0.2.177 in [workspace.dependencies], which will also feed the Windows target via libc = { workspace = true }. This is a clean, centralized bump; just ensure cargo check, cargo test, and cargo clippy pass across all targets after the update.

scripts/libc_posix.py (1)

16-16: LIBC_VERSION aligned with Cargo workspace libc

LIBC_VERSION now matches the workspace libc = "0.2.177", so build_url will fetch semver data from the correct libc tag. This keeps the generated posix.rs in sync with the crate version; just confirm the file was regenerated with this script for this bump.

crates/vm/src/stdlib/posix.rs (2)

203-206: Regrouped libc constants under cfg look fine

The expanded import list (F_TEST, F_TLOCK, F_ULOCK, O_SYNC, P_ALL, P_PGID, P_PID, SCHED_FIFO, SCHED_RR) under the existing multi-OS #[cfg(any(...))] keeps these libc constants gated to platforms where they’re expected, and matches the pattern used elsewhere in this module. This looks like generated output in line with the libc 0.2.177 semver data.


218-220: Additional libc flags/wait constants grouping is consistent

Importing O_ASYNC, O_NDELAY, O_NOCTTY together with WEXITED, WNOWAIT, and WSTOPPED under the broader multi-OS cfg (including redox) keeps the attribute exposure centralized and matches the generator-driven style used for other constant groups. Assuming this came from rerunning scripts/libc_posix.py against libc 0.2.177, the change is purely organizational.


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.

@ShaharNaveh ShaharNaveh marked this pull request as ready for review November 27, 2025 15:52
@youknowone youknowone merged commit 896144e into RustPython:main Nov 27, 2025
13 checks passed
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.

2 participants