KEMBAR78
gh-136097: Fix sysconfig._parse_makefile() by serhiy-storchaka · Pull Request #136166 · python/cpython · GitHub
Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jul 1, 2025

  • 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.

* 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
Copy link
Member

@vstinner vstinner left a 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.

Copy link
Member

@FFY00 FFY00 left a 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 😅

@FFY00 FFY00 merged commit 9e3542a into python:main Oct 4, 2025
44 checks passed
danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
* 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.
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.

3 participants