Commit Graph

856 Commits

Author SHA1 Message Date
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
Nikita Sobolev 4ff5690e59
gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348)
* revert enum pickling from by-name to by-value

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-06-08 11:40:15 -07:00
Victor Stinner bae415ad02
gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)
* Add "limited-c-api" and "stable-api" references.
* Rename "stable-abi-list" reference to "limited-api-list".
* Makefile: Document files regenerated by "make regen-limited-abi"
* Remove first empty line in generated files:

  - Lib/test/test_stable_abi_ctypes.py
  - PC/python3dll.c
2023-06-06 08:40:32 +00:00
Mathieu Dupuy 151b6bfb5d
howto/urllib2: remove link to an outdated french translation (GH-104193)
We now have our own translation and it's not outdated
2023-05-22 15:03:29 +02:00
gsallam be0c106789
gh-103295: expose API for writing perf map files (#103546)
Co-authored-by: Aniket Panse <aniketpanse@fb.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-05-21 11:12:24 +01: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
Hugo van Kemenade 13ac1766bc
gh-103960: Dark mode: invert image brightness (#103983) 2023-05-10 16:46:37 +03:00
Erlend E. Aasland 721a78395d
gh-64658: Expand Argument Clinic return converter docs (#104175) 2023-05-05 13:32:00 +02:00
Hugo van Kemenade 5b05b013ff
gh-101100: Fix Sphinx warnings in `curses` and `curses.ascii` modules (#103457)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-05-02 23:09:04 -06:00
Rafael Fontenelle 68ed2a2a3f
GH-103484: Fix redirected permanently URLs (#104001)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2023-05-02 09:34:44 +03:00
Hugo van Kemenade 79ae019164
gh-101100: Fix Sphinx warnings in `argparse` module (#103289)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-04-24 15:36:32 -06:00
Rafael Fontenelle caed49448d
GH-103484: Fix broken links reported by linkcheck (#103608)
* Doc: Fix broken links reported by linkcheck

* Apply suggestions from code review

- Remove extra diff line in faq/library.rst (merwok)
- Use HTTPS to link Unicode 15.0.0 to solve a redirect (hugovk)
- Use wayback machine link for openssl 1.1.0 instead of linking 1.1.1, "as this text mentions a feature from 1.1.0" (hugovk)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Doc: Make mark-up code as literal

* Doc: Alphabetize items in linkcheck_ignore

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Doc: Improve comment in sphinx conf

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

---------

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-22 08:24:47 -06:00
Raymond Hettinger 7b134d3e71
Descriptor HowTo: Update to include attributes added in Python 3.10 (GH-103666) 2023-04-22 08:29:40 -05:00
Ethan Furman 700ec657c8
gh-103596: [Enum] do not shadow mixed-in methods/attributes (GH-103600)
For example:

    class Book(StrEnum):
        title = auto()
        author = auto()
        desc = auto()

    Book.author.desc is Book.desc

but

    Book.author.title() == 'Author'

is commonly expected.  Using upper-case member names avoids this confusion and possible performance impacts.

Co-authored-by: samypr100 <3933065+samypr100@users.noreply.github.com>
2023-04-18 16:19:23 -07:00
AN Long 282f0d26e3
Fix syntax typo in isolating extensions doc (#103516) 2023-04-14 00:40:25 -07:00
Boris Verkhovskiy a3d313a9e2
Proofread howto/perf_profiling.rst (#103530) 2023-04-13 20:07:49 -07:00
Ethan Furman a6f95941a3
gh-103479: [Enum] require __new__ to be considered a data type (GH-103495)
a mixin must either have a __new__ method, or be a dataclass, to be interpreted as a data-type
2023-04-13 08:31:03 -07:00
Ethan Furman 4ec8dd10bd
gh-93910: [Enum] remove member.member deprecation (GH-103236)
i.e. Color.RED.BLUE is now officially supported.
2023-04-05 17:33:52 -07:00
Ethan Furman 810d365b5e
gh-103056: [Enum] use staticmethod decorator for _gnv_ (GH-103231)
_gnv_ --> _generate_next_value_
2023-04-03 17:47:40 -07:00
Ethan Furman 5ffc1e5a21
gh-98298, gh-74730: [Enum] update docs (GH-103163)
fix FlagBoundary statements
add warning about reloading modules and enum identity
2023-04-03 14:57:42 -07:00
Matěj Cepl d835b3f05d
gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635) 2023-03-29 09:52:53 +01:00
VMan 6daf42b28e
[doc] Improve grammar/fix missing word (GH-102060) 2023-02-26 18:45:27 +05:30
Peter Jiping Xie 20c11f2e60
gh-101440: fix json snippet error in logging-cookbook.rst (#101439) 2023-01-31 17:30:38 +02:00
Peter Jiping Xie db757f0e44
gh-101386: fix typos found by codespell (#101387) 2023-01-28 11:57:40 +02:00
Vladimir Malinovskii 8cdbc46090
Provided better example for logging cookbook (GH-101164)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2023-01-20 08:54:48 +00: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
Yao-Ching Huang b2f7b2ef0b
gh-100916: Convert argument to appropriate type (GH-100917) 2023-01-10 10:17:57 +00:00
MonadChains f5b7b19bf1
gh-99535: Add test for inheritance of annotations and update documentation (#99990) 2022-12-24 12:07:14 -08:00
Stanley 286e3c76a9
gh-99087: Add missing newline for prompts in docs (GH-98993)
Add newline for prompts so copying to REPL does not cause errors.
2022-12-08 19:31:19 -08:00
Ethan Furman 679efbb080
gh-94943: [Enum] improve repr() when inheriting from a dataclass (GH-99740)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-12-06 13:43:41 -08:00
Ethan Furman 73a921b070
gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-11-12 10:39:47 -08:00
Bruno Neyra b3bd69c1bf
[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265) 2022-11-08 16:39:56 -08:00
Skip Montanaro 1fd20d0b57
argparse howto: Use f-string in preference to "...".format() (#98883) 2022-11-02 19:08:08 -07:00
Vinay Sajip 50a9b037a6
[doc] Update cookbook example for socket-based logging in a production sett… (GH-98922)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-11-01 23:00:17 +00:00
partev f4d56292e9
Fix wording in Functional Programming HOWTO (GH-98939) 2022-10-31 21:49:27 -05:00
partev 3b86538661
Fix typo in sorting HOWTO (#98888) 2022-10-31 12:58:13 -05:00
Erlend E. Aasland 723ebe76e7
gh-96143: Improve perf profiler docs (#96445) 2022-10-27 14:06:48 +01:00
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
Vinay Sajip a956c2fd55
[doc] Improve logging cookbook example. (GH-98481) 2022-10-20 12:46:03 +01:00
Raymond Hettinger ae19217867
GH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (GH-98336) 2022-10-16 14:34:25 -05:00
Vinay Sajip 11c25a402d
[doc] Update logging cookbook with an example of custom handling of levels. (GH-98290)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-15 21:23:06 +01:00
Shantanu c39a0c3354
gh-65046: Link to logging cookbook from asyncio docs (#98207) 2022-10-11 21:42:57 -07:00
Géry Ogam 2d2e01aa4c
Minor edits to the Descriptor HowTo Guide (GH-24901)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2022-10-08 20:54:21 -05:00
Nikita Sobolev 586cfb0131
gh-97956: Mention `generate_global_objects.py` in `AC How-To` (#97957) 2022-10-07 11:54:45 -07:00
Hugo van Kemenade fa2d43e518
Docs: Fix backtick errors found by sphinx-lint (#97998)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-06 18:01:30 -07:00
Adam Turner f612565bd3
gh-93738: Disallow pre-v3 syntax in the C domain (#97962)
Also, disable using invalid sphinx-lint 0.6.2.
2022-10-06 10:11:37 -07:00
Tshepang Mbambo 815008a3a5
I changed my surname early this year (#96671)
* I recently changed my name

* Update ACKS
2022-10-05 11:16:45 -07:00