GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-127178: improve compatibility in `_sysconfig_vars_(...).json` by FFY00 · Pull Request #128558 · python/cpython

Conversation

@FFY00

@FFY00 FFY00 commented Jan 6, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This patch improves environment and platform compatibility:

  • Data now matches sysconfig.get_config_vars after install
  • userbase now correctly reflects the target platform when cross-compiling
  • test_sysconfigdata_json now takes into account the following situations:
    • Running with a non-default sys.executable path
    • Running under virtual environments
    • Running under relocatable installs

To simplify the detection of relocatable installs, which needs to look at _sysconfigdata_(...), this module is now saved in sys.modules. As part of this change, the code to import the module from a specific directory was refactored to use PathFinder, simplifying the implementation.

Signed-off-by: Filipe Laíns <[email protected]

  • Issue: Convert _sysconfigdata to a JSON file #127178

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FFY00
pythonGH-127178: improve compatibility in _sysconfig_vars_(...).json
b72a436
This patch improves environment and platform compatibility
- Data now matches `sysconfig.get_config_vars` after install
- `userbase` now correctly reflects the target platform when cross-compiling
- `test_sysconfigdata_json` now takes into account the following situations:
  - Running with a non-default sys.executable path
  - Running under virtual environments
  - Running under relocatable installs

To simplify the detection of relocatable installs, which needs to look
at `_sysconfigdata_(...)`, this module is now saved in `sys.modules`.
As part of this change, the code to import the module from a specific
directory was refactored to use `PathFinder`, simplifying the
implementation.

Signed-off-by: Filipe Laíns <[email protected]
@FFY00 FFY00 added the skip news label Jan 6, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jan 6, 2025
Convert _sysconfigdata to a JSON file #127178
Open
@bedevere-app bedevere-app Bot added the awaiting core review label Jan 6, 2025
@FFY00 FFY00 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 6, 2025
@bedevere-bot

bedevere-bot commented Jan 6, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @FFY00 for commit b72a436 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 6, 2025
@FFY00 FFY00 mentioned this pull request Jan 6, 2025
gh-127146: Fix test_sysconfigdata_json for Emscripten #128556
Merged
@FFY00
Avoid get_platform() in _getuserbase() because of macOS get_config_va…
396ac89
…rs() dependency

Signed-off-by: Filipe Laíns <[email protected]
@FFY00 FFY00 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 6, 2025
@bedevere-bot

bedevere-bot commented Jan 6, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @FFY00 for commit 396ac89 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 6, 2025
FFY00 added 2 commits January 29, 2025 22:06
@FFY00
Merge branch 'main' into pythongh-127178-improve-compatibility
496d1c8
@FFY00
Skip srcdir in builddir
2c26b59
Signed-off-by: Filipe Laíns <[email protected]>
@FFY00
FFY00 merged commit c931d75 into python:main Jan 29, 2025
@bedevere-app bedevere-app Bot removed the awaiting core review label Jan 29, 2025
This was referenced Jan 29, 2025
gh-127432: Add CI job to cross build Python #128380
Merged
gh-127146: Don't compare userbase in test_sysconfig_json #129422
Closed
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Feb 7, 2025
@FFY00 @srinivasreddy
pythonGH-127178: improve compatibility in _sysconfig_vars_(...).json (
f23c3dc
python#128558)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FFY00 @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.