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-136097: Fix sysconfig._parse_makefile() by serhiy-storchaka · Pull Request #136166 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 1, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Fix potential infinite recursion.
  • Fix a bug when reference can cross boundaries of substitutions, e.g. a=$( b=$(a)a)
  • Fix potential quadratic complexity.
  • Fix KeyError for undefined CFLAGS, LDFLAGS, or CPPFLAGS.
  • Fix infinite recursion when keep_unresolved=False.
  • Unify behavior with keep_unresolved=False for bogus $ occurred before and after variable references.
  • Issue: sysconfig --generate-posix-vars can hang on cyclic variable definitions #136097

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
serhiy-storchaka requested a review from FFY00 as a code owner July 1, 2025 11:45
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Jul 1, 2025
@bedevere-app bedevere-app Bot added the awaiting core review label Jul 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jul 1, 2025
sysconfig --generate-posix-vars can hang on cyclic variable definitions #136097
Closed
@serhiy-storchaka serhiy-storchaka removed needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Jul 1, 2025
@serhiy-storchaka
pythongh-136097: Fix sysconfig._parse_makefile()
3888755
* Fix potential infinite recursion.
* Fix a bug when reference can cross boundaries of substitutions, e.g.
  a=$(
  b=$(a)a)
* Fix potential quadratic complexity.
* Fix KeyError for undefined CFLAGS, LDFLAGS, or CPPFLAGS.
* Fix infinite recursion when keep_unresolved=False.
* Unify behavior with keep_unresolved=False for bogus $ occurred before
  and after variable references.
@serhiy-storchaka
serhiy-storchaka force-pushed the sysconfig-parse_makefile branch from 967214c to 3888755 Compare July 1, 2025 12:31
vstinner
vstinner approved these changes Jul 2, 2025
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. Thanks for adding many tests.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jul 2, 2025
FFY00
FFY00 approved these changes Oct 4, 2025
View reviewed changes

@FFY00 FFY00 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I'm always a bit relunctant to touch this code, but this change looks good. Let's merge and keep an eye out for possible downstream issues 😅

Sorry, something went wrong.

Uh oh!

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

All reactions
@FFY00
FFY00 merged commit 9e3542a into python:main Oct 4, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 4, 2025
@picnixz picnixz mentioned this pull request Oct 5, 2025
test_peg_generator failures on some buildbots #139604
Closed
danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
@serhiy-storchaka @danigm
pythongh-136097: Fix sysconfig._parse_makefile() (python#136166)
328e5b9
* Fix potential infinite recursion.
* Fix a bug when reference can cross boundaries of substitutions, e.g.
  a=$(
  b=$(a)a)
* Fix potential quadratic complexity.
* Fix KeyError for undefined CFLAGS, LDFLAGS, or CPPFLAGS.
* Fix infinite recursion when keep_unresolved=False.
* Unify behavior with keep_unresolved=False for bogus $ occurred before
  and after variable references.
This was referenced Oct 10, 2025
Lib/sysconfig.py expands non-variables #78870
Closed
bpo-34689: Prevent sysconfig._parse_makefile from expanding $${variables} #20439
Closed
@serhiy-storchaka
serhiy-storchaka deleted the sysconfig-parse_makefile branch July 1, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@FFY00 FFY00 FFY00 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

3 participants

@serhiy-storchaka @vstinner @FFY00
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 01402503 — 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.