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-113317: Add ParseArgsCodeGen class by vstinner · Pull Request #117707 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Apr 10, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: Argument Clinic: split out global stateless helpers and constants from clinic.py #113317

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot mentioned this pull request Apr 10, 2024
Argument Clinic: split out global stateless helpers and constants from clinic.py #113317
Closed
@vstinner

vstinner commented Apr 10, 2024

Copy link
Copy Markdown
Member Author

This PR is based on PR gh-117626.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner added the skip news label Apr 10, 2024
@vstinner
pythongh-113317: Add ParseArgsCodeGen class
b17f552
@vstinner
vstinner force-pushed the clinic_parse_args branch from 781133c to b17f552 Compare April 11, 2024 10:16
@vstinner

vstinner commented Apr 11, 2024

Copy link
Copy Markdown
Member Author

PR rebased on top of merged #117626.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner marked this pull request as ready for review April 11, 2024 10:17
@vstinner
vstinner requested a review from erlend-aasland as a code owner April 11, 2024 10:17
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 11, 2024
@erlend-aasland erlend-aasland changed the title [WIP] gh-113317: Add ParseArgsCodeGen class gh-113317: Add ParseArgsCodeGen class Apr 11, 2024
@erlend-aasland

erlend-aasland commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

The previous PR used the Codegen spelling. This PR uses CodeGen. Consider using only one variant :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

This is nice!

Should we consider adding this as a separate module? Or would libclinic.codegen be a better home for it?

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Apr 11, 2024

Copy link
Copy Markdown
Member Author

Should we consider adding this as a separate module?

CLanguage uses ParseArgsCodeGen which uses CLanguage... There is an inter-dependency. It's more convenient to have both classes in the same file.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

Yes, there are inter-dependencies everywhere :(

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
Rename Codegen to CodeGen
59cc0c4
@vstinner

vstinner commented Apr 11, 2024

Copy link
Copy Markdown
Member Author

The previous PR used the Codegen spelling. This PR uses CodeGen. Consider using only one variant :)

I updated this PR to rename Codegen to CodeGen.

erlend-aasland reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@vstinner
Add libclinic.parse_args module
79dac76
@vstinner

vstinner commented Apr 11, 2024

Copy link
Copy Markdown
Member Author

Should we consider adding this as a separate module?

I broke the inter-dependency between CLanguage and ParseArgsCodeGen, and I moved declare_parser() and ParseArgsCodeGen to a new libclinic.parse_args module.

erlend-aasland reacted with hooray emoji erlend-aasland reacted with rocket emoji
All reactions
  • 🎉 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

I broke the inter-dependency between CLanguage and ParseArgsCodeGen, and I moved declare_parser() and ParseArgsCodeGen to a new libclinic.parse_args module.

Nice, so now we can make the parser templates globals of the libclinic.parse_args module, instead of class members.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
Move constants at module-level
57ce479
@vstinner

vstinner commented Apr 11, 2024

Copy link
Copy Markdown
Member Author

Nice, so now we can make the parser templates globals of the libclinic.parse_args module, instead of class members.

Done.

erlend-aasland reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland approved these changes Apr 11, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 11, 2024
@vstinner
vstinner enabled auto-merge (squash) April 11, 2024 13:48
@vstinner
vstinner merged commit 671cb22 into python:main Apr 11, 2024
@vstinner
vstinner deleted the clinic_parse_args branch April 11, 2024 13:49
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 11, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@vstinner @diegorusso
pythongh-113317: Add ParseArgsCodeGen class (python#117707)
8218ad9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

2 participants

@vstinner @erlend-aasland
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.