Skip to content

GH-92266: Remove embedded tabs from c-analyzer/cpython/_parser.py - #137622

Merged
AA-Turner merged 3 commits into
python:mainfrom
AA-Turner:c-analyzer-embedded-tabs
Sep 17, 2025
Merged

GH-92266: Remove embedded tabs from c-analyzer/cpython/_parser.py#137622
AA-Turner merged 3 commits into
python:mainfrom
AA-Turner:c-analyzer-embedded-tabs

Conversation

@AA-Turner

@AA-TurnerAA-Turner commented Aug 10, 2025

Copy link
Copy Markdown
Member

This is an attempt to avoid some of the problems we've seen with embedded tabs by changing the global variables within c-analyzer/cpython/_parser.py to use more structured data.

The output is identical, save for INCL_DIRS, where the fourth line (* ./Include/internal/mimalloc) currently uses spaces instead of tabs, showing that the current format is quite hard to properly keep up to date. The errant line was added in #109914.

What do you think @ericsnowcurrently?

See also:

Comment threadTools/c-analyzer/cpython/_parser.py Outdated
Comment threadTools/c-analyzer/cpython/_parser.py Outdated

@ericsnowcurrentlyericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM (with your own suggested changes applied)

Comment threadTools/c-analyzer/cpython/_parser.py
@AA-Turner
AA-Turner enabled auto-merge (squash) September 17, 2025 15:14
@AA-Turner
AA-Turner merged commit 2212ae5 into python:mainSep 17, 2025
43 checks passed
@AA-Turner
AA-Turner deleted the c-analyzer-embedded-tabs branch September 17, 2025 15:25
@AA-TurnerAA-Turner added the needs backport to 3.14 bugs and security fixes label Oct 7, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 7, 2025
…r.py`` (pythonGH-137622)
(cherry picked from commit 2212ae5)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

GH-139718 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Oct 7, 2025
AA-Turner added a commit that referenced this pull request Oct 7, 2025
…er.py`` (GH-137622) (#139718)
GH-92266: Remove embedded tabs from ``c-analyzer/cpython/_parser.py`` (GH-137622)
(cherry picked from commit 2212ae5)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@AA-Turner@ericsnowcurrently