Skip to content

Update sysconfig from v3.14.3 and also fix _sysconfig#7296

Merged
youknowone merged 2 commits intoRustPython:mainfrom
youknowone:sysconfig
Mar 2, 2026
Merged

Update sysconfig from v3.14.3 and also fix _sysconfig#7296
youknowone merged 2 commits intoRustPython:mainfrom
youknowone:sysconfig

Conversation

@youknowone
Copy link
Member

@youknowone youknowone commented Mar 1, 2026

Summary by CodeRabbit

  • Chores

    • Updated ignore patterns.
  • Bug Fixes

    • Enhanced system configuration data with runtime-dependent values and additional constants.
    • Updated configuration flag formats for improved compatibility.

- Add prefix, exec_prefix, BINDIR to sysconfigdata build_time_vars
- Add Py_DEBUG and ABIFLAGS to sysconfigdata
- Fix Py_GIL_DISABLED/Py_DEBUG to use int (1/0) instead of bool
- Gitignore generated _sysconfig_vars*.json
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0b5a5a and 5a11f33.

⛔ Files ignored due to path filters (4)
  • Lib/sysconfig/__init__.py is excluded by !Lib/**
  • Lib/sysconfig/__main__.py is excluded by !Lib/**
  • Lib/test/test__osx_support.py is excluded by !Lib/**
  • Lib/test/test_sysconfig.py is excluded by !Lib/**
📒 Files selected for processing (3)
  • .gitignore
  • crates/vm/src/stdlib/sysconfig.rs
  • crates/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

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 ⚠️ Warning 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

📦 Library Dependencies

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

[ ] lib: cpython/Lib/sysconfig
[x] lib: cpython/Lib/_aix_support.py
[x] lib: cpython/Lib/_osx_support.py
[x] test: cpython/Lib/test/test_sysconfig.py (TODO: 7)
[x] test: cpython/Lib/test/test__osx_support.py

dependencies:

  • sysconfig (native: _sysconfig, _winapi, importlib.machinery, importlib.util, os.path, sys)
    • _aix_support
    • _osx_support
    • json (native: _json, decoder, encoder, json.tool, sys)
    • _aix_support, _osx_support, contextlib, importlib, os, re, subprocess, tempfile, threading, types, warnings

dependent tests: (51 tests)

  • sysconfig: test_c_locale_coercion test_dtrace test_gc test_hashlib test_inspect test_launcher test_os test_osx_env test_posix test_pyexpat test_regrtest test_site test_ssl test_subprocess test_support test_sys test_sysconfig test_time test_tools test_urllib2net test_venv
    • ctypes: test_android test_buffer test_bytes test_code test_codecs test_ctypes test_genericalias test_io test_ntpath
      • platform: test__locale test__osx_support test_asyncio test_baseexception test_builtin test_cmath test_fcntl test_math test_mimetypes test_platform test_shutil test_socket test_winreg test_wsgiref
      • webbrowser: test_webbrowser
    • ensurepip: test_ensurepip
    • pydoc: test_enum test_pydoc
      • xmlrpc.server: test_docxmlrpc test_xmlrpc
    • trace: test_trace

Legend:

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

@youknowone youknowone force-pushed the sysconfig branch 2 times, most recently from c2df4b3 to 8d7d43f Compare March 1, 2026 14:28
@youknowone youknowone marked this pull request as ready for review March 2, 2026 01:20
@youknowone youknowone merged commit b1cddc4 into RustPython:main Mar 2, 2026
33 of 36 checks passed
@youknowone youknowone deleted the sysconfig branch March 2, 2026 04:13
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.

1 participant