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 — Lib/sysconfig.py expands non-variables · Issue #78870 · python/cpython

Lib/sysconfig.py expands non-variables #78870

New issue
Copy link
New issue
Copy link
Closed
Closed
Lib/sysconfig.py expands non-variables#78870
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sysconfigtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

lepaperwan
mannequin
opened on Sep 14, 2018
Issue body actions
BPO 34689
Nosy @berkerpeksag, @serhiy-storchaka, @lepaperwan
PRs
  • bpo-34689: Prevent sysconfig._parse_makefile from expanding $${variables} #9362
  • bpo-34689: Prevent sysconfig._parse_makefile from expanding $${variables} #20439
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2018-09-14.20:11:33.198>
    labels = ['type-bug', 'library', '3.10']
    title = 'Lib/sysconfig.py expands non-variables'
    updated_at = <Date 2020-07-06.08:47:02.118>
    user = 'https://github.com/lepaperwan'

    bugs.python.org fields:

    activity = <Date 2020-07-06.08:47:02.118>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2018-09-14.20:11:33.198>
    creator = 'lepaperwan'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34689
    keywords = ['patch']
    message_count = 1.0
    messages = ['325393']
    nosy_count = 3.0
    nosy_names = ['berker.peksag', 'serhiy.storchaka', 'lepaperwan']
    pr_nums = ['9362', '20439']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue34689'
    versions = ['Python 3.10']

    Linked PRs

    • GH-78870: copy test from GH-20439 #139884

    Activity

    1. lepaperwan commented on Sep 14, 2018

      @lepaperwan
      lepaperwanmannequin
      on Sep 14, 2018
      MannequinAuthor
      More actions

      Lib/sysconfig.py _parse_makefile needs to expand Makefile-style variables which includes $() ${} variables with a litteral $ being $$.

      That last particular point is properly accounted for in the first half of the function when determining values that need expansion and those that don't. However, the second half that actually performs variable expansion doesn't.

      Sample breaking input:
      VAR1= VALUE1
      VAR2= VALUE2
      VAR3=$${VAR1} ${VAR2}

      Output:
      Expect: {'VAR1': 'VALUE1', 'VAR2': 'VALUE2', 'VAR3': '$${VAR1} VALUE2'}
      Actual: {'VAR1': 'VALUE1', 'VAR2': 'VALUE2', 'VAR3': '$VALUE1 VALUE2'}

      I'm working on patching this but I'm putting this here as feedback is welcome.

      As far as I could tell, this is a side effect of b2b1217, which patched bpo-24705.

    2. lepaperwan
      added
      3.7 (EOL)end of lifeend of life
      3.8 (EOL)end of lifeend of life
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Sep 14, 2018
    3. terryjreedy
      added
      3.10 (EOL)end of lifeend of life
      and removed
      3.7 (EOL)end of lifeend of life
      3.8 (EOL)end of lifeend of life
      on Jul 6, 2020
    4. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    5. FFY00
      added
      3.11only security fixesonly security fixes
      3.12only security fixesonly security fixes
      topic-sysconfig
      on Apr 3, 2023
    6. StanFromIreland
      removed
      3.11only security fixesonly security fixes
      3.10 (EOL)end of lifeend of life
      3.12only security fixesonly security fixes
      on Aug 12, 2025
    7. FFY00
      added a commit that references this issue on Oct 10, 2025

      pythonGH-78870: copy test from pythonGH-20439

      d110b05
    8. FFY00 commented on Oct 10, 2025

      @FFY00
      FFY00
      on Oct 10, 2025
      Member
      More actions

      This issue seems to have been fixed by GH-136166.

    9. FFY00
      closed this as completedon Oct 10, 2025
    10. FFY00
      added a commit that references this issue on Oct 10, 2025

      GH-78870: copy test from GH-20439 (#139884)

      9e15770
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sysconfigtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        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.