Update sysconfig from v3.14.3 and also fix _sysconfig by youknowone · Pull Request #7296 · RustPython/RustPython
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
Lib/sysconfig/__init__.pyis excluded by!Lib/**Lib/sysconfig/__main__.pyis excluded by!Lib/**Lib/test/test__osx_support.pyis excluded by!Lib/**Lib/test/test_sysconfig.pyis excluded by!Lib/**
📒 Files selected for processing (3)
.gitignorecrates/vm/src/stdlib/sysconfig.rscrates/vm/src/stdlib/sysconfigdata.rs
📝 Walkthrough
Walkthrough
This PR updates sysconfig configuration handling by replacing boolean literals with integer equivalents for Py_GIL_DISABLED and Py_DEBUG, adding runtime-dependent path variables (prefix, exec_prefix, BINDIR) to build-time configuration, and introducing ABIFLAGS constant. A .gitignore pattern is also added.
Changes
| Cohort / File(s) | Summary |
|---|---|
Gitignore .gitignore |
Added ignore pattern for generated sysconfig JSON files (Lib/_sysconfig_vars*.json). |
Configuration Values crates/vm/src/stdlib/sysconfig.rs, crates/vm/src/stdlib/sysconfigdata.rs |
Updated config flags from booleans to integers (Py_GIL_DISABLED: true→1, Py_DEBUG: false→0) and added runtime-dependent path variables (prefix, exec_prefix, BINDIR) and ABIFLAGS constant to build-time configuration. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
- Update
{site,sysconfig}.pyfrom 3.13.7 #6132: Modifies the same sysconfig.rs module with config variable updates (Py_GIL_DISABLED, Py_DEBUG). - update test_sys from 3.14.2 #6781: Updates stdlib configuration flags including ABIFLAGS and debug-related config values across sys/sysconfig modules.
Poem
A rabbit hopped through configs with delight, 🐰
Swapping booleans for integers bright,
With paths and flags now set just right,
The sysconfig dances in Python's light! ✨
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title references updating sysconfig and fixing _sysconfig, which aligns with the actual changes: sysconfig.rs modifications, sysconfigdata.rs enhancements, and a .gitignore update for _sysconfig_vars*.json. However, the title is somewhat vague about what 'v3.14.3' refers to and what specific 'fix' is being applied. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
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 @coderabbitai help to get the list of available commands and usage tips.