FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-128152: Argument Clinic: don't parse CPP directives inside C comments by erlend-aasland · Pull Request #128464 · python/cpython · GitHub

Repository navigation

gh-128152: Argument Clinic: don't parse CPP directives inside C comments - #128464

Merged
erlend-aasland merged 2 commits into
python:mainfrom
erlend-aasland:clinic/empty-comments
Jan 4, 2025
Merged

erlend-aasland merged 2 commits into
python:mainfrom
erlend-aasland:clinic/empty-comments

Conversation

erlend-aasland commented Jan 3, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

Resolves #128152

erlend-aasland requested a review from picnixz January 3, 2025 22:52
erlend-aasland changed the title clinic/empty comments gh-128152: Argument Clinic: don't parse CPP directives inside C comments Jan 3, 2025
erlend-aasland added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Jan 3, 2025

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not an expert in AC but this looks good. At least, I can now use empty lines in python input. By the way, I think I've just understood that CPP stands for Clinic Pre-Processor/Processing and not for C++....

Copy link
Copy Markdown
Contributor Author

I can now use empty lines in python input

Yes, # prefixed lines are now correctly passed on as Python code. For clinic input blocks, they are correctly ignored as "Clinic comments":

def valid_line(self, line: str) -> bool:
# ignore comment-only lines
if line.lstrip().startswith('#'):
return False

erlend-aasland commented Jan 3, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review! I'll land this tomorrow.

erlend-aasland self-assigned this Jan 3, 2025
erlend-aasland merged commit a4e773c into python:main Jan 4, 2025
erlend-aasland deleted the clinic/empty-comments branch January 4, 2025 10:46

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 4, 2025
…ide C comments (pythonGH-128464)

(cherry picked from commit a4e773c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>

This comment was marked as outdated.

bedevere-app Bot commented Jan 4, 2025

Copy link
Copy Markdown

GH-128478 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jan 4, 2025
erlend-aasland removed the needs backport to 3.12 only security fixes label Jan 4, 2025
erlend-aasland added a commit that referenced this pull request Jan 4, 2025
…side C comments (GH-128464) (#128478)

(cherry picked from commit a4e773c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 6, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Argument Clinic's [python input] blocks do not support empty lines in comments

2 participants


Back | FazBrowse Home | New Git URL