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 — Migrate Argument Clinic docs from CPython to the devguide by erlend-aasland · Pull Request #1151 · python/devguide

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Aug 9, 2023 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Resolves #1148


📚 Documentation preview 📚: https://cpython-devguide--1151.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
larryhastings and others added 30 commits January 4, 2014 12:44
@larryhastings
Issue #19659: Added documentation for Argument Clinic.
0a31001
@larryhastings
Argument Clinic: fixed test suite, improved howto.
2aa5401
@larryhastings
Issue #20141: Improved Argument Clinic's support for the PyArg_Parse …
5233c16
…"O!"

format unit.
@larryhastings
Issue #19273: The marker comments Argument Clinic uses have been changed
dd8ecf3
to improve readability.
@zware
Closes #20200: Argument Clinic custom converter example should be in a
6d59917
'python' clinic block, not a 'clinic' clinic block.  Patch written by
Ryan Smith-Roberts.
@larryhastings
Issue #20214: Fixed a number of small issues and documentation errors in
81492e6
Argument Clinic (see issue for details).
@larryhastings
Minor doc fix in Clinic howto.
ade6a87
@larryhastings
Issue #20268: Argument Clinic now supports cloning the parameters
70f458e
and return converter from existing functions.
@larryhastings
Issue #20226: Major improvements to Argument Clinic.
c472248
* You may now specify an expression as the default value for a
  parameter!  Example: "sys.maxsize - 1".  This support is
  intentionally quite limited; you may only use values that
  can be represented as static C values.
* Removed "doc_default", simplified support for "c_default"
  and "py_default".  (I'm not sure we still even need
  "py_default", but I'm leaving it in for now in case a
  use presents itself.)
* Parameter lines support a trailing '\\' as a line
  continuation character, allowing you to break up long lines.
* The argument parsing code generated when supporting optional
  groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize,
  leading to a 850% speedup in parsing.  (Just kidding, this
  is an unmeasurable difference.)
* A bugfix for the recent regression where the generated
  prototype from pydoc for builtins would be littered with
  unreadable "=<object ...>"" default values for parameters
  that had no default value.
* Converted some asserts into proper failure messages.
* Many doc improvements and fixes.
@larryhastings
Issue #20287: Argument Clinic's output is now configurable, allowing
5648faf
delaying its output or even redirecting it to a separate file.
@larryhastings
Doc improvements for Clinic howto "Goals" section.
047b449
@larryhastings
Issue #20294: Argument Clinic now supports argument parsing for __new…
e17b6ff
…__ and

__init__ functions.
@larryhastings
Doc fixes for Argument Clinic.
2a0b318
@ezio-melotti
#20348: fix headers markup in Argument Clinic howto. Patch by Moritz …
f48045a
…Neeb.
@larryhastings
Documentation fixes, including fixing "suspicious" problems.
5f12ffc
@larryhastings
#Issue 20456: Several improvements and bugfixes for Argument Clinic,
d270e98
including correctly generating code for Clinic blocks inside C
preprocessor conditional blocks.
@dstufft
Fix Issue #21528 - Fix documentation typos
a0be8a3
@larryhastings
Issue #24000: Improved Argument Clinic's mapping of converters to legacy
64b5380
"format units".  Updated the documentation to match.
@taleinat
Argument Clinic: added missing bit of info in howto
66db86b
@berkerpeksag
Issue #24232: Fix typos. Patch by Ville Skyttä.
051e5a2
@berkerpeksag
Issue #24232: Fix typos. Patch by Ville Skyttä.
2902a6a
@orsenthil
Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multip…
aff9abe
…le documentation typos.

Related Issues:

#issue21528
#issue24453
@orsenthil
null merge with 3.4
125f205
Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple documentation typos.

Related Issues:
#issue21528
#issue24453
@ned-deily
null merge 3.4 to 3.5 (9a0c5ffe7420 merged 3.4 to default, bypassing …
030c577
…3.5)
@ned-deily
null merge 3.5 to default (9a0c5ffe7420 merged 3.4 to default, bypass…
0a18965
…ing 3.5)
@vadmium
Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAX
cdc1d5b
The underlying zlib library stores sizes in “unsigned int”. The corresponding
Python parameters are all sizes of buffers filled in by zlib, so it is okay
to reduce higher values to the UINT_MAX internal cap. OverflowError is still
raised for sizes that do not fit in Py_ssize_t.

Sizes are now limited to Py_ssize_t rather than unsigned long, because Python
byte strings cannot be larger than Py_ssize_t. Previously this could result
in a SystemError on 32-bit platforms.

This resolves a regression in the gzip module when reading more than UINT_MAX
or LONG_MAX bytes in one call, introduced by revision 62723172412c.
@vadmium
Issue #25626: Merge zlib fix from 3.5
bc32170
@vadmium
Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” mo…
5cbbd2f
…dule

Patch by Xiang Zhang.
@vadmium
Issue #27626: Spelling fixes in docs, comments and internal names
5a543c9
Based on patch by Ville Skyttä.
@vadmium
Issue #26462: Doc: reduce literal_block warnings, fix syntax highligh…
a248952
…ting.

Patch by Julien Palard.
erlend-aasland and others added 19 commits July 18, 2023 10:50
@erlend-aasland @ezio-melotti
Docs: Normalise Argument Clinic advanced topics headings (#106842)
e67a548
Co-authored-by: Ezio Melotti <[email protected]>
@erlend-aasland
Docs: Argument Clinic: Group guides about default values (#106872)
d7a9d61
Previous ToC layout (excerpt):                                                                                          

    - How to use symbolic default values
    ...
    - How to assign default values to parameter
      - How to use the ``NULL`` default value
      - How to use expressions as default values

New layout:

    - How to assign default values to parameter
      - The ``NULL`` default value
      - Symbolic default values
      - Expressions as default values
@erlend-aasland @ezio-melotti
Docs: Argument Clinic: Add Background and Tutorial top-level sections…
c6bf58b
… (#106904)

Add Background as a toplevel section with the following subsections:

- Background
  - The goals of Argument Clinic
  - Basic concepts and usage

Rename "Converting your first function" to Tutorial.

Add anchors for Background, Tutorial, and How-to Guides:

- :ref:`clinic-background`
- :ref:`clinic-tutorial`
- :ref:`clinic-howtos`

Link to these from within the Abstract.

Break the compatibility paragraph out of Abstract and make it a note.

Co-authored-by: Ezio Melotti <[email protected]>
@hakancelikdev
Docs: Remove duplicate word in Argument Clinic howto heading (#107169)
d7f9081
@erlend-aasland @ezio-melotti @serhiy-storchaka
Docs: Add missing markup to Argument Clinic docs (#106876)
6ffa5e8
Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
@erlend-aasland
Docs: Remove the numbered steps from the Argument Clinic tutorial (#1…
6dc096d
…07203)

Instead, order the tutorial as one body of prose, making it easier to
align the tutorial according to Diátaxis principles.
@erlend-aasland @AA-Turner
@AlexWaygood @ezio-melotti
Docs: Argument Clinic: Restructure "Basic concepts and usage" (#106981)
8c81360
Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Ezio Melotti <[email protected]>
@erlend-aasland
gh-107507: Replace 'The goals of Argument Clinic' with a summary (#10…
d9390c8
…7508)

Summarise the goals of Argument Clinic in a single sentence.
Mention that Argument Clinic was introduced with PEP-436.
@erlend-aasland @ezio-melotti
Docs: Argument Clinic: Improve 'How to write a custom converter' (#10…
7a96719
…7328)

- Omit unneccesary wording and sentences
- Don't mention implementation details (no digression, explanation)

Co-authored-by: Ezio Melotti <[email protected]>
@erlend-aasland
Docs: Argument Clinic: Move the CConverter class to the reference (#1…
d2da97a
…07671)
@erlend-aasland @AlexWaygood @serhiy-storchaka
gh-95065: Add Argument Clinic support for deprecating positional use …
d03a72a
…of parameters (#95151)

It is now possible to deprecate passing parameters positionally with
Argument Clinic, using the new '* [from X.Y]' syntax.
(To be read as "keyword-only from Python version X.Y")

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
@erlend-aasland @AlexWaygood
gh-86457: Add docs for Argument Clinic @text_signature directive (#10…
bfaa355
…7747)

Co-authored-by: Alex Waygood <[email protected]>
@erlend-aasland @serhiy-storchaka
gh-104683: Add --exclude option to Argument Clinic CLI (#107770)
fbef1af
Co-authored-by: Serhiy Storchaka <[email protected]>
@erlend-aasland
Docs: clean up Argument Clinic howto's (#107797)
f8d0c67
- fix formatting in @text_signature howto and NEWS entry
- fix formatting and example text in deprecate-positionals howto
@erlend-aasland
Merge remote-tracking branch 'clone/main' into migrate-clinic-docs
9b75651
@erlend-aasland
Add clinic.rst with history
d3b2f41
@erlend-aasland
Remove migrated clinic.rst path (Doc/howto/clinic.rst)
62ffd34
@erlend-aasland
Add clinic.rst to Development Tools and conf.py
5d3ca1a
@erlend-aasland
Adapt clinic.rst
97fe521
- use cpy-file iso. source

- fix Sphinx complaint about 'range'

- mark up abstract similar to other devguide pages
@erlend-aasland erlend-aasland mentioned this pull request Aug 9, 2023
Move the Argument Clinic docs to the devguide python/cpython#107518
Closed
3 tasks done
@ghost

ghost commented Aug 9, 2023

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

  • [email protected]

Click the button to sign:
CLA not signed

All reactions

Sorry, something went wrong.

Uh oh!

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

ezio-melotti
ezio-melotti reviewed Aug 9, 2023
View reviewed changes

@ezio-melotti ezio-melotti left a comment

Copy link
Copy Markdown
Member

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.

Should this documented be added to the table in https://devguide.python.org/#contributing too?

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland

erlend-aasland commented Aug 9, 2023

Copy link
Copy Markdown
Contributor Author

Should this documented be added to the table in https://devguide.python.org/#contributing too?

That sounds like a good idea.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Aug 11, 2023

Copy link
Copy Markdown
Contributor Author

Should this documented be added to the table in https://devguide.python.org/#contributing too?

That sounds like a good idea.

But, IMO, we should do that after the migration. I think it's better if this PR only focus on the act of migrating clinic.rst.

ezio-melotti 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.

AA-Turner
AA-Turner requested changes Aug 11, 2023
View reviewed changes

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

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.

I think the git history is not be quite right here (due to d3b2f41 and 62ffd34) -- if you look in this branch's blame for clinic.rst, it only goes back to the "Add clinic.rst with history", rather than any earlier commits.

I believe that if you squash the two commits I linked above, git will properly detect it as a file moved operation & history will work. (This worked locally for me, at least!)

A

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with eyes emoji
All reactions
  • 👀 1 reaction
Comment thread conf.py
rediraffe_redirects = {
# Development Tools
"clang.rst": "development-tools/clang.rst",
"clinic.rst": "development-tools/clinic.rst",

@AA-Turner AA-Turner Aug 11, 2023

Copy link
Copy Markdown
Member

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.

These redirects were for when pages were at the top level -- it isn't really needeed for an entirely new page.

Sorry, something went wrong.

Uh oh!

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

All reactions

@erlend-aasland erlend-aasland Aug 11, 2023

Copy link
Copy Markdown
Contributor Author

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.

Ok, thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland

erlend-aasland commented Aug 11, 2023

Copy link
Copy Markdown
Contributor Author

I think the git history is not be quite right here (due to d3b2f41 and 62ffd34) -- if you look in this branch's blame for clinic.rst, it only goes back to the "Add clinic.rst with history", rather than any earlier commits.

I believe that if you squash the two commits I linked above, git will properly detect it as a file moved operation & history will work. (This worked locally for me, at least!)

Thanks for the heads-up. I'll look into it.

AA-Turner 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.

@AA-Turner AA-Turner mentioned this pull request Sep 6, 2023
Move Argument Clinic's documentation to the Developer's Guide #1160
Merged
@erlend-aasland

erlend-aasland commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

Closing in favour of #1160

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland closed this Sep 6, 2023
@erlend-aasland
erlend-aasland deleted the migrate-clinic-docs branch September 6, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ezio-melotti ezio-melotti ezio-melotti left review comments
@AA-Turner AA-Turner AA-Turner requested changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Migrate Argument Clinic docs from the CPython repo to the devguide

Uh oh!

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

20 participants

@erlend-aasland @AA-Turner @ezio-melotti @larryhastings @zware @dstufft @taleinat @berkerpeksag @orsenthil @ned-deily @vadmium @benjaminp @serhiy-storchaka @gfyoung @grimreaper @matrixise @hugovk @encukou @methane @JulienPalard
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 01402520 — 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.