Commit Graph

70 Commits

Author SHA1 Message Date
Adam Turner d1f7fae424
GH-107518: Remove the Argument Clinic How-To (#109900)
* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide
2023-10-11 14:57:51 +02:00
Victor Stinner 2928e5dc65
gh-108494: Argument Clinic: Document how to generate code that uses the limited C API (#108584)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-08-30 16:02:48 +02:00
Serhiy Storchaka 2f311437cd
gh-107704: Argument Clinic: add support for deprecating keyword use of parameters (GH-107984)
It is now possible to deprecate passing keyword arguments for
keyword-or-positional parameters with Argument Clinic, using the new
'/ [from X.Y]' syntax.
(To be read as "positional-only from Python version X.Y")

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-19 10:13:35 +03:00
Erlend E. Aasland 34cafd35e3
Docs: clean up Argument Clinic howto's (#107797)
- fix formatting in @text_signature howto and NEWS entry
- fix formatting and example text in deprecate-positionals howto
2023-08-09 09:43:02 +02:00
Erlend E. Aasland 0be3743f54
gh-104683: Add --exclude option to Argument Clinic CLI (#107770)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-08 20:50:54 +00:00
Erlend E. Aasland a9aeb99579
gh-86457: Add docs for Argument Clinic @text_signature directive (#107747)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-08 08:42:08 +02:00
Erlend E. Aasland 33cb0b06ef
gh-95065: Add Argument Clinic support for deprecating positional use 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 <Alex.Waygood@Gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-07 11:28:08 +00:00
Erlend E. Aasland a6675b1a59
Docs: Argument Clinic: Move the CConverter class to the reference (#107671) 2023-08-07 02:08:34 +02:00
Erlend E. Aasland 4a5b4221e3
Docs: Argument Clinic: Improve 'How to write a custom converter' (#107328)
- Omit unneccesary wording and sentences
- Don't mention implementation details (no digression, explanation)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-08-05 20:19:37 +00:00
Erlend E. Aasland abb71c6a8f
gh-107507: Replace 'The goals of Argument Clinic' with a summary (#107508)
Summarise the goals of Argument Clinic in a single sentence.
Mention that Argument Clinic was introduced with PEP-436.
2023-07-31 23:33:13 +02:00
Erlend E. Aasland 2ad699002e
Docs: Argument Clinic: Restructure "Basic concepts and usage" (#106981)
Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-26 22:08:43 +00:00
Erlend E. Aasland 592395577c
Docs: Remove the numbered steps from the Argument Clinic tutorial (#107203)
Instead, order the tutorial as one body of prose, making it easier to
align the tutorial according to Diátaxis principles.
2023-07-26 22:54:25 +02:00
Erlend E. Aasland ff5f94b72c
Docs: Add missing markup to Argument Clinic docs (#106876)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-24 15:22:18 +00:00
Hakan Celik ebe44a5155
Docs: Remove duplicate word in Argument Clinic howto heading (#107169) 2023-07-24 13:54:39 +02:00
Erlend E. Aasland 81861fd90b
Docs: Argument Clinic: Add Background and Tutorial top-level sections (#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 <ezio.melotti@gmail.com>
2023-07-21 08:05:41 +02:00
Erlend E. Aasland 505eede38d
Docs: Argument Clinic: Group guides about default values (#106872)
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
2023-07-19 00:46:50 +02:00
Erlend E. Aasland 4cb0b9c0a9
Docs: Normalise Argument Clinic advanced topics headings (#106842)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-18 10:50:17 +02:00
Erlend E. Aasland 8c17729489
Docs: Normalize Argument Clinic How-To section capitalization (#106788) 2023-07-16 00:42:58 +02:00
Erlend E. Aasland b2c1b4da19
gh-104389: Add 'unused' keyword to Argument Clinic C converters (#104390)
Use the unused keyword param in the converter to explicitly
mark an argument as unused:

    /*[clinic input]
    SomeBaseClass.stubmethod
        flag: bool(unused=True)
    [clinic start generated code]*/
2023-05-12 10:34:00 +02:00
Erlend E. Aasland 721a78395d
gh-64658: Expand Argument Clinic return converter docs (#104175) 2023-05-05 13:32:00 +02:00
Mariusz Felisiak 847d7708ba
gh-98763: Prefer "python" over "python3" for command line examples in docs. (#98761) 2023-01-11 15:35:41 +05:30
Stanley 268129a74f
docs: Change links to label refs (#98454)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-25 20:26:28 -07:00
Nikita Sobolev 586cfb0131
gh-97956: Mention `generate_global_objects.py` in `AC How-To` (#97957) 2022-10-07 11:54:45 -07:00
Noam Cohen 347c783673
gh-95007: Remove the NoneType return converter from Argument Clinic Doc (#95529)
The converter was removed in 74b5e4ce80
2022-08-01 15:07:35 +02:00
Ned Batchelder 3440d197a5
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
2022-07-05 11:16:10 +02:00
Julien Palard 664aa94b57
Document Py_ssize_t. (GH-92512)
It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But
there's 8182 errors left.

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-05-13 14:10:16 +02:00
Inada Naoki f9c9354a7a
gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537) 2022-05-12 14:48:38 +09:00
Petr Viktorin 204946986f
bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)
* Make PyType_GetModuleByDef public (remove underscore)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-02-11 17:22:11 +01:00
Hugo van Kemenade d89fb9a5a6
bpo-45320: Remove long-deprecated inspect methods (GH-28618) 2021-10-20 20:48:55 +02:00
Erlend Egeberg Aasland e982fe496b
bpo-42048: Clinic Howto: Document AC's defining_class converter (GH-23978) 2021-01-20 12:19:57 +01:00
Serhiy Storchaka e835b31d2b
bpo-38600: NULL -> ``NULL``. (GH-17001)
Also fix some other formatting.
2019-10-30 21:37:16 +02:00
Stéphane Wirtel cbb6484573 Doc: Replace the deprecated highlightlang directive by highlight. (#13377)
highlightlang is deprecated since April 2018 in Sphinx.
See https://github.com/sphinx-doc/sphinx/pull/4845
2019-05-17 15:25:34 +05:30
Stéphane Wirtel 12e696b4f0 bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
Serhiy Storchaka 7cb7bcff20
bpo-20260: Implement non-bitwise unsigned int converters for Argument Clinic. (GH-8434) 2018-07-26 13:22:16 +03:00
Eitan Adler 9572132ab3 Docs: be less specific about python versions (GH-6985)
CPython 3.5 is old now, and we don't bump this version often,
so lets avoid using specific versions.
2018-05-20 17:38:01 +03:00
Serhiy Storchaka 46936d5a71
Improve highlighting of some code blocks. (GH-6401) 2018-04-08 19:18:04 +03:00
gfyoung ec19ba210b bpo-29596: Improve clinic howto documentation (GH-1710)
Clarify that `two-pass` buffer can only be dumped once, and it prints out all text sent to it during all processing, even from Clinic blocks *after* the dumping point.
2017-06-06 12:23:52 -07:00
Serhiy Storchaka 84b8e92e46 bpo-29918: Add missed "const" modifiers in C API documentation. (#846) 2017-03-30 10:01:03 +03:00
Martin Panter 2fed8cd6f0 Issues #28755, #28753: Merge Arg Clinic howto from 3.5 2016-12-10 04:14:02 +00:00
Martin Panter cfa9bad4b2 Issue #28755: Improve syntax highlighting in Arg Clinic howto 2016-12-10 04:10:45 +00:00
Martin Panter a277c130f7 Issue 28753: Argument Clinic howto docfix, courtesy Julien Palard. 2016-12-10 03:49:12 +00:00
Martin Panter 99b6f28351 Merge doc fixups from 3.5 2016-11-21 04:22:22 +00:00
Martin Panter 357ed2e577 Change double hyphens (en dashes) to em (longer) dashes 2016-11-21 00:15:20 +00:00
Benjamin Peterson cc854499e4 clinic: PY_LONG_LONG -> long long 2016-09-08 09:29:11 -07:00
Martin Panter b4a2b36c99 Issue #27745: Fix some typos in Argument Clinic howto, by Lele Gaifax 2016-08-12 12:02:03 +00:00
Martin Panter 1050d2d0c7 Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.
Patch by Julien Palard.
2016-07-26 11:18:21 +02:00
Martin Panter eb9957065a Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
2016-07-28 01:11:04 +00:00
Martin Panter 84544c1020 Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” module
Patch by Xiang Zhang.
2016-07-23 03:02:07 +00:00
Martin Panter e99e97762c Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAX
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.
2015-11-20 08:13:35 +00:00
Berker Peksag fee05daef8 Issue #24232: Fix typos. Patch by Ville Skyttä. 2015-05-19 01:38:05 +03:00