Commit Graph

874 Commits

Author SHA1 Message Date
Miss Islington (bot) 35e5bbc845
[3.11] gh-114785: Remove content from `Porting from Python2` how-to (GH-114805) (GH-115328)
Keep the page though, because people might still rely on it (the traffic shows that they do).
Instead of our own manual we now give links to the 3rd-party ones.

(cherry picked from commit 705c76d4a2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-21 13:50:07 +01:00
Miss Islington (bot) 21edde17b3
[3.11] gh-115233: Fix an example in the Logging Cookbook (GH-115325) (GH-115355) (GH-115357)
Also add more tests for LoggerAdapter.

Also support stacklevel in LoggerAdapter._log().
(cherry picked from commit 225856ef3e)
(cherry picked from commit 91822018ee)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-12 23:25:47 +02:00
Miss Islington (bot) 50b912715e
[3.11] Update LOGGING example taken from Django docs. (GH-114903) (#114952)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-02-03 08:23:21 -07:00
Miss Islington (bot) 95f18f9738
[3.11] gh-101100: Fix sphinx warnings in `howto/logging.rst` (GH-114846) (#114872)
gh-101100: Fix sphinx warnings in `howto/logging.rst` (GH-114846)

(cherry picked from commit dc01b919c7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-01 18:45:02 +00:00
Hugo van Kemenade 3a181a10b1
[3.11] gh-101100: Fix Sphinx warnings in `howto/urllib2.rst` and `library/http.client.rst` (GH-114060) (#114064)
(cherry picked from commit c2808431b3)
2024-01-14 21:14:11 +00:00
Miss Islington (bot) 6e21c590f6
[3.11] gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894) (#113923)
gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894)
(cherry picked from commit 901a971e16)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2024-01-10 18:32:52 +01:00
Miss Islington (bot) 86424e06b7
[3.11] gh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` (GH-113493) (#113498)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-26 19:47:16 +00:00
Alex Waygood f83087ce03
[3.11] gh-101100: Improve documentation on function attributes (#112933) (#113003)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-12 14:19:02 +02:00
Miss Islington (bot) d3c12144d3
[3.11] Remove bogus annotations from the descriptor howto guide (gh-112349) (gh-112350) 2023-11-23 21:21:49 +00:00
Miss Islington (bot) b4f3a62383
[3.11] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504) (GH-112147)
gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504)
(cherry picked from commit 985679f05d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-11-16 13:34:21 +01:00
Miss Islington (bot) 316221c23f
[3.11] gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898) (#111909)
gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898)

Convert definition list to bullet list for readability on mobile
(cherry picked from commit 7d21e3d5ee)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-09 21:13:43 +02:00
Miss Islington (bot) 45f17a165b
[3.11] Glossary: Add "static type checker" (GH-111837) (#111855)
Glossary: Add "static type checker" (GH-111837)
(cherry picked from commit 8ab7ad6308)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:47:54 +00:00
Ethan Furman 4edf25565f
[3.11] gh-111797: fix enum how-to (GH-111805)
remove extra error line in how-to
2023-11-06 18:57:10 -08:00
Miss Islington (bot) cebf2d2a5d
[3.11] gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725) (#111728)
gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725)

Close database connection explicitly in test cleanup.
(cherry picked from commit f48e669504)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-11-04 15:56:08 -04:00
Ethan Furman 4a61169672
[3.11] gh-111181: Fix enum doctests (GH-111180) (GH-111617)
gh-111181: Fix enum doctests (GH-111180)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
(cherry picked from commit c4dc5a6ae8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-11-03 16:51:56 -07:00
Miss Islington (bot) 0a23960266
[3.11] gh-110383: Italicize variable name (GH-111206) (#111208)
Co-authored-by: Nick <Nikki1993@users.noreply.github.com>
2023-10-23 11:11:54 +03:00
Miss Islington (bot) 6020a3e736
[3.11] gh-110383: Added explanation about simplest regex use case for quantifiers. (GH-111110) (#111205)
Co-authored-by: Nick <Nikki1993@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-23 07:31:32 +00:00
Erlend E. Aasland 5178fb0b89
[3.11] GH-107518: Remove the Argument Clinic How-To (#109900) (#110761)
(cherry picked from commit d1f7fae424)

* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-12 09:52:59 +00:00
Ezio Melotti 90b2620b6e
[3.11] gh-110631: Fix reST indentation (GH-110724) (#110739)
* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475)
2023-10-11 23:12:53 +02:00
Adam Turner d81bcc2327
[3.11] gh-102304: Add links to the Stable ABI and Limited C API docs (#105345) (#105371) (#109901)
* Add "limited-c-api" and "stable-api" targets
* Rename the "stable-abi-list" target to "limited-api-list"
2023-09-29 11:17:44 +02:00
Miss Islington (bot) 6024a75b10
[3.11] gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ``howto/urllib2.rst`` (GH-107966) (#110087)
Co-authored-by: Yuki K <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-29 08:44:28 +00:00
Serhiy Storchaka c534637106
[3.11] gh-109634: Use :samp: role (GH-109635) (GH-109778)
(cherry picked from commit 92af0cc580)

Co-authored-by: Jacob Coffee <jacob@z7x.org>
2023-09-29 09:39:31 +03:00
Ethan Furman effa2ecdcf
[3.11] gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704) (GH-108739)
When overriding the `__new__` method of an enum, the underlying data type should be created directly; i.e. .

    member = object.__new__(cls)
    member = int.__new__(cls, value)
    member = str.__new__(cls, value)

Calling `super().__new__()` finds the lookup version of `Enum.__new__`, and will now raise an exception when detected.

(cherry picked from commit d48760b2f1)
2023-09-07 18:57:48 -07:00
Miss Islington (bot) f8ab9751da
[3.11] gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678) (#108681)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-30 15:19:44 +03:00
Miss Islington (bot) 42f9d6faa2
[3.11] gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434) (#108410)
https://docs.python.org/3/howto/pyporting.html was written for another time. In this patch:

- material that frames Python 3 as "new" is removed
- descriptions and directions have been trimmed
(cherry picked from commit 809ea7c4b6)

Co-authored-by: Daniele Procida <daniele@vurt.org>
2023-08-24 13:26:56 +02:00
Erlend E. Aasland ec0c0c8692
[3.11] Docs: clean up Argument Clinic howto's (#107797) (#107800)
(cherry picked from commit 34cafd35e3)

- fix formatting in @text_signature howto and NEWS entry
2023-08-09 07:54:32 +00:00
Erlend E. Aasland b0b26af822
[3.11] gh-86457: Add docs for Argument Clinic @text_signature directive (#107747) (#107799)
(cherry picked from commit a9aeb99579)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-09 09:25:25 +02:00
Miss Islington (bot) d58c74c335
[3.11] Docs: Argument Clinic: Move the CConverter class to the reference (GH-107671) (#107702)
(cherry picked from commit a6675b1a59)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-07 00:17:41 +00:00
Miss Islington (bot) e4b5ec71fe
[3.11] Docs: Argument Clinic: Improve 'How to write a custom converter' (GH-107328) (#107670)
- Omit unneccesary wording and sentences
- Don't mention implementation details (no digression, explanation)

(cherry picked from commit 4a5b4221e3)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-08-05 20:29:31 +00:00
Miss Islington (bot) 7e834c4554
[3.11] gh-107432 Fix incorrect indentation in annotations HOWTO (GH-107445) (#107655)
gh-107432 Fix incorrect indentation in annotations HOWTO (GH-107445)

gh-107432 Fix incorrect indentation in annotations document

Body text in https://docs.python.org/3/howto/annotations.html was
indented throughout, and was being rendered in blockquote elements.
(cherry picked from commit 5e2746d6e2)

Co-authored-by: Daniele Procida <daniele@vurt.org>
2023-08-05 14:40:44 +03:00
Miss Islington (bot) 3be07c98b3
[3.11] gh-107507: Replace 'The goals of Argument Clinic' with a summary (GH-107508) (#107517)
Summarise the goals of Argument Clinic in a single sentence.
Mention that Argument Clinic was introduced with PEP-436.
(cherry picked from commit abb71c6a8f)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-31 21:43:16 +00:00
Miss Islington (bot) 3c1bcae075
[3.11] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107418)
(cherry picked from commit f2d07d3289)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-29 09:17:20 +03:00
Serhiy Storchaka d9392c0c0a
[3.11] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107381)
(cherry picked from commit 983305268e)
2023-07-28 08:31:49 +00:00
Erlend E. Aasland 00b65da493
[3.11] Docs: Argument Clinic: Restructure "Basic concepts and usage" (#106981) (#107327)
Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

(cherry picked from commit 2ad699002e)

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-27 01:26:04 +02:00
Erlend E. Aasland 55edee247c
[3.11] Docs: Remove the numbered steps from the Argument Clinic tutorial (#107203) (#107319)
Instead, order the tutorial as one body of prose, making it easier to
align the tutorial according to Diátaxis principles.

(cherry picked from commit 592395577c)
2023-07-26 21:21:28 +00:00
Serhiy Storchaka cfa9f3b7cc
[3.11] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107311)
(cherry picked from commit af61cb9c78)
2023-07-26 19:35:16 +00:00
Erlend E. Aasland 604eb04059
[3.11] Docs: Add missing markup to Argument Clinic docs (#106876) (#107182)
(cherry picked from commit ff5f94b72c)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-24 15:45:13 +00:00
Miss Islington (bot) 798d83bec8
[3.11] Docs: Remove duplicate word in Argument Clinic howto heading (GH-107169) (#107172)
(cherry picked from commit ebe44a5155)

Co-authored-by: Hakan Celik <hakancelikdev@gmail.com>
2023-07-24 12:06:06 +00:00
Erlend E. Aasland b3e600a632
[3.11] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (#107062) (#107157)
(cherry picked from commit b447e19e72)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:49:48 +02:00
Serhiy Storchaka d2cdf0888b
[3.11] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107121)
(cherry picked from commit 08a228da05)
2023-07-23 15:06:32 +03:00
wulmer c51f766ebb
[3.11] gh-101100: Fix some broken sphinx references (GH-107095). (#107120) 2023-07-23 05:56:09 -06:00
Miss Islington (bot) 65e40aaed0
[3.11] gh-54738: Add argparse i18n howto (GH-104562) (#107101)
(cherry picked from commit dcd7acb04a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-07-23 11:23:51 +02:00
Serhiy Storchaka 6bde1b9f04
[3.11] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106952)
(cherry picked from commit fcc816dbff)
2023-07-21 14:48:30 +03:00
Miss Islington (bot) 0a57620887
[3.11] Docs: Argument Clinic: Add Background and Tutorial top-level sections (GH-106904) (#106946)
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.
(cherry picked from commit 81861fd90b)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-21 08:32:56 +02:00
Miss Islington (bot) 0c47ed7bbf
[3.11] Docs: Argument Clinic: Group guides about default values (GH-106872) (#106873)
Docs: Argument Clinic: Group guides about default values (GH-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

(cherry picked from commit 505eede38d)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-19 01:16:04 +02:00
Miss Islington (bot) 38553442c8
[3.11] Docs: Normalise Argument Clinic advanced topics headings (GH-106842) (#106852)
(cherry picked from commit 4cb0b9c0a9)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-18 12:25:25 +02:00
Miss Islington (bot) c73f9c045e
[3.11] Docs: Normalize Argument Clinic How-To section capitalization (GH-106788) (#106792)
(cherry picked from commit 8c17729489)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-16 00:50:43 +02:00
Miss Islington (bot) fed1b5a198
[3.11] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105519)
* revert enum pickling from by-name to by-value

(cherry picked from commit 4ff5690e59)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-06-08 18:02:12 -07:00
Miss Islington (bot) be20e9c647
[3.11] howto/urllib2: remove link to an outdated french translation (GH-104193) (GH-104746)
howto/urllib2: remove link to an outdated french translation (GH-104193)

We now have our own translation and it's not outdated
(cherry picked from commit 151b6bfb5d)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2023-05-22 19:57:05 +02:00
Miss Islington (bot) 03abac239c
[3.11] gh-103960: Dark mode: invert image brightness (GH-103983) (#104358)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-10 14:19:38 +00:00