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: Argument Clinic: Add libclinic.clanguage by vstinner · Pull Request #117455 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Apr 2, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Add libclinic.lang_c module and move the following classes and functions there:

  • CLanguage
  • declare_parser()

Add libclinic.codegen and move the following classes there:

  • BlockPrinter
  • BufferSeries
  • Destination

Move these functions to libclinic.function:

  • permute_left_option_groups()
  • permute_optional_groups()
  • permute_right_option_groups()
  • 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
@vstinner vstinner added the skip news label Apr 2, 2024
@vstinner
vstinner requested a review from erlend-aasland as a code owner April 2, 2024 12:00
@bedevere-app bedevere-app Bot mentioned this pull request Apr 2, 2024
Argument Clinic: split out global stateless helpers and constants from clinic.py #113317
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 2, 2024
erlend-aasland
erlend-aasland reviewed Apr 2, 2024
View reviewed changes
Comment thread Tools/clinic/libclinic/block_printer.py Resolved

Uh oh!

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

Comment thread Tools/clinic/libclinic/clanguage.py Resolved

Uh oh!

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

@vstinner
vstinner force-pushed the ac_clang branch 2 times, most recently from 21917ec to 04d91d6 Compare April 2, 2024 12:33
@vstinner

vstinner commented Apr 2, 2024

Copy link
Copy Markdown
Member Author

@erlend-aasland: I updated the PR to address your review. Please review the updated PR.

I used git rebase to rewrite the commit message and rename files.

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland approved these changes Apr 3, 2024
View reviewed changes

@erlend-aasland erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks! I think libclinic.codegen makes sense. Also, it makes sense to put the option group stuff together with the parameter stuff (currently in function.py).

I realise that we already got a libclinic.language.py file with the PythonLanguage and Language classes. I'm fine with using clanguage.py instead of lang_c.py, as was your original suggestion. Up to you.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 3, 2024
@vstinner
pythongh-113317: Argument Clinic: Add libclinic.clanguage
e4770e1
Add libclinic.clanguage module and move the following classes and
functions there:

* CLanguage
* declare_parser()

Add libclinic.codegen and move the following classes there:

* BlockPrinter
* BufferSeries
* Destination

Move the following functions to libclinic.function:

* permute_left_option_groups()
* permute_optional_groups()
* permute_right_option_groups()
@vstinner
vstinner force-pushed the ac_clang branch from eff5c71 to e4770e1 Compare April 3, 2024 17:47
@vstinner

vstinner commented Apr 3, 2024

Copy link
Copy Markdown
Member Author

I realise that we already got a libclinic.language.py file with the PythonLanguage and Language classes. I'm fine with using clanguage.py instead of lang_c.py, as was your original suggestion. Up to you.

I renamed the file to clanguage.py.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner enabled auto-merge (squash) April 3, 2024 17:47
@vstinner
vstinner merged commit c43f6a4 into python:main Apr 3, 2024
@vstinner
vstinner deleted the ac_clang branch April 3, 2024 18:17
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 3, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@vstinner @diegorusso
pythongh-113317: Argument Clinic: Add libclinic.clanguage (python#117455
d669969
)

Add libclinic.clanguage module and move the following classes and
functions there:

* CLanguage
* declare_parser()

Add libclinic.codegen and move the following classes there:

* BlockPrinter
* BufferSeries
* Destination

Move the following functions to libclinic.function:

* permute_left_option_groups()
* permute_optional_groups()
* permute_right_option_groups()
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.