Skip to content

build(deps): upgrade libc and fix iOS compatibility - #9359

Draft
youknowdot wants to merge 5 commits into
RustPython:mainfrom
youknowdot:fix/libc-0.2.191-ios-20261025
Draft

youknowdot wants to merge 5 commits into
RustPython:mainfrom
youknowdot:fix/libc-0.2.191-ios-20261025

Conversation

@youknowdot

@youknowdot youknowdot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Continue #9240's libc 0.2.189 → 0.2.191 upgrade, preserving the original Dependabot commit and attribution.

  • Temporarily pin nix to upstream commit f9ba3ed0698255d93240b07ecbf39ecb05a8a5cd, which includes the Apple socket availability fix in fix: compatibility with libc 0.2.190 nix-rust/nix#2821; update cfg_aliases to 0.2.2.
  • Export SYSPROTO_CONTROL only on macOS and omit os.system on Apple mobile targets where libc does not provide it.
  • Copy Lib/_ios_support.py unchanged from final CPython 3.15.0, including the libobjc.dylib fallback and ImportError handling when the Objective-C runtime cannot be loaded.

No fake platform APIs or new test skips are introduced.

Validation

At head 3d6287b:

The hosted iOS result is a cross-compilation check, not an iOS device or simulator runtime test.

AI assistance: OpenAI Codex, disclosed in the commit trailers.

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility across Apple platforms by limiting system-command functionality to supported targets.
    • Restricted the SYSPROTO_CONTROL socket attribute to macOS; other supported Apple socket attributes remain available on Apple platforms.
    • Updated platform-specific dependency compatibility for iOS.

dependabot Bot and others added 3 commits October 25, 2026 06:27
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.189 to 0.2.191.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.191/CHANGELOG.md)
- [Commits](rust-lang/libc@0.2.189...0.2.191)

---
updated-dependencies:
- dependency-name: libc
  dependency-version: 0.2.191
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Pin nix to the exact upstream macOS-only API fix until it is released. Update the cfg_aliases minimum required by that revision.

Assisted-by: OpenAI Codex:model version unavailable
Preserve the Dependabot upgrade and iOS fix while incorporating upstream actionlint and mach2 dependency updates.

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

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ef6e2db and 3d6287b.

Files ignored due to path filters: 2
  • Cargo.lock is excluded by !**/*.lock
  • Lib/_ios_support.py is excluded by !Lib/**
Files selected for processing: 5
  • Cargo.toml
  • crates/host_env/src/os.rs
  • crates/host_env/src/socket.rs
  • crates/stdlib/src/socket.rs
  • crates/vm/src/stdlib/os.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The changes override the crates.io nix dependency and adjust the availability of system and selected socket constants on Apple platforms.

Changes: Apple Platform Compatibility

Layer / File(s) Summary
System API availability
Cargo.toml, crates/host_env/src/os.rs, crates/vm/src/stdlib/os.rs
The nix dependency now uses a specified Git revision. The system APIs are excluded on iOS, tvOS, watchOS, and visionOS. The ToCString import is local to the function.
Socket constant availability
crates/host_env/src/socket.rs, crates/stdlib/src/socket.rs
SYSPROTO_CONTROL is now restricted to macOS. The other listed Apple socket constants retain their Apple-target availability.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: youknowone, shaharnaveh

Merge Risk: Minimal · up to 3d628

No concrete current-head compatibility or dependency-resolution risk was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: upgrading libc-related dependencies and fixing iOS compatibility.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • 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.

Expose SYSPROTO_CONTROL only on macOS and omit os.system on Apple mobile targets where libc does not provide it. Keep host and Python exports consistent with the platform declarations and CPython availability.

Assisted-by: OpenAI Codex:model version unavailable
Migrate Lib/_ios_support.py through scripts/update_lib to CPython 3.15
commit d220409a13b77de7a6c30abe16ea90db01528edc. Fall back to the bare
libobjc.dylib name when find_library cannot resolve the shared-cache entry,
and normalize loader OSError to ImportError.

Linux default and frozen-stdlib cargo check gates are compile-only. They do
not validate iOS dynamic loading, Objective-C symbols, or native runtime.

Assisted-by: OpenAI Codex:model version unavailable
@github-actions

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

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

[x] lib: cpython/Lib/_ios_support.py

dependencies:

  • _ios_support

dependent tests: (30 tests)
- [ ] platform: test__locale test__osx_support test_asyncio test_baseexception test_builtin test_calendar test_cmath test_ctypes test_fcntl test_math test_mimetypes test_os test_platform test_regrtest test_shutil test_socket test_ssl test_strptime test_sysconfig test_time test_tkinter test_winreg test_wsgiref
- [x] idlelib: test_idle
- [ ] profiling.sampling.gecko_collector: test_profiling
- [ ] profiling.sampling.heatmap_collector: test_profiling
- [ ] pydoc: test_enum test_pydoc
- [x] uuid: test_os
- [x] webbrowser: test_webbrowser

Legend:

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

@youknowdot youknowdot changed the title build(deps): upgrade libc with iOS-compatible nix build(deps): upgrade libc and fix iOS compatibility Oct 26, 2026
@youknowone
youknowone marked this pull request as ready for review October 26, 2026 01:06
@chatgpt-codex-connector

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 🔄 Running since 2026-10-26T01:06:28.746270Z 3d6287b 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.

Comment thread Cargo.toml

[patch.crates-io]
# Keep libc 0.2.191 compatible with iOS until nix releases https://github.com/nix-rust/nix/pull/2821.
nix = { git = "https://github.com/nix-rust/nix", rev = "f9ba3ed0698255d93240b07ecbf39ecb05a8a5cd" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a good idea. wait new release

@youknowone
youknowone marked this pull request as draft October 26, 2026 01:06
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