Commit graph

899 commits

Author SHA1 Message Date
Miss Islington (bot)
98a8590e73
[3.12] Update LOGGING example taken from Django docs. (GH-114903) (#114951)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-02-03 08:23:33 -07:00
Hugo van Kemenade
cc5870a1d7
[3.12] gh-101100: Fix sphinx warnings in howto/logging.rst (GH-114846) (#114878)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-01 20:45:51 +00:00
Hugo van Kemenade
cc11c76da7
[3.12] gh-101100: Fix Sphinx warnings in howto/urllib2.rst and library/http.client.rst (GH-114060) (#114063)
(cherry picked from commit c2808431b3)
2024-01-14 21:14:08 +00:00
Miss Islington (bot)
3fc45e6c4e
[3.12] gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894) (#113922)
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:54 +01:00
Miss Islington (bot)
2f5bfc7e66
[3.12] gh-101100: Fix Sphinx warnings in howto/isolating-extensions.rst (GH-113493) (#113497)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-26 19:46:40 +00:00
Hugo van Kemenade
54fcfbde30
[3.12] gh-101100: Improve documentation on function attributes (GH-112933) (#112974)
(cherry picked from commit 4c5b9c107a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-12 10:10:27 +00:00
Miss Islington (bot)
749c8fdafb
[3.12] [Enum] update class creation for RuntimeError changes (GH-111815) (GH-112526)
(cherry picked from commit f9e6ce0395)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-11-29 13:49:52 -08:00
Miss Islington (bot)
2199cebd0f
[3.12] Descriptor HowTo: Sync the error-messages with the C code. Add tests. (gh-112403) (gh-112411) 2023-11-25 22:24:43 +00:00
Miss Islington (bot)
86db104eeb
[3.12] Remove bogus annotations from the descriptor howto guide (GH-112349) (#112352)
Remove bogus annotations from the descriptor howto guide (GH-112349)
(cherry picked from commit d9fc15222e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-11-23 23:07:14 +00:00
Miss Islington (bot)
2e17a81719
[3.12] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504) (GH-112148)
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:29 +01:00
Miss Islington (bot)
77f59bf664
[3.12] Fix typo in perf profiling docs (GH-112112) (#112117)
Fix typo in perf profiling docs (GH-112112)
(cherry picked from commit 0cfdd6e3d1)

Co-authored-by: Ryuji Tsutsui <ryu22e+github@gmail.com>
2023-11-15 15:48:04 +00:00
Miss Islington (bot)
fe7631e558
[3.12] gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898) (#111908)
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:23 +02:00
Miss Islington (bot)
42699c82d7
[3.12] Glossary: Add "static type checker" (GH-111837) (#111854)
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:45:17 +00:00
Miss Islington (bot)
9c583f36d5
[3.12] gh-111724: Fix doctest ResourceWarning in howto/descriptor.rst (GH-111725) (#111727)
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:55:55 -04:00
Miss Islington (bot)
ec00397912
[3.12] gh-111181: Fix enum doctests (GH-111180) (GH-111518)
gh-111181: Fix enum doctests (GH-111180)
(cherry picked from commit c4dc5a6ae8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-10-31 15:01:28 -07:00
Miss Islington (bot)
4d781bce27
[3.12] gh-110383: Italicize variable name (GH-111206) (#111207)
Co-authored-by: Nick <Nikki1993@users.noreply.github.com>
2023-10-23 11:11:41 +03:00
Miss Islington (bot)
8f94d0f692
[3.12] gh-110383: Added explanation about simplest regex use case for quantifiers. (GH-111110) (#111204)
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:56 +00:00
Erlend E. Aasland
e8d04190c6
[3.12] GH-107518: Remove the Argument Clinic How-To (#109900) (#110760)
(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:37:37 +00:00
Ezio Melotti
7d5a982609
[3.12] gh-110631: Fix reST indentation (GH-110724) (#110738)
* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475)
2023-10-11 23:12:36 +02:00
Miss Islington (bot)
5635913125
[3.12] Fix env var typo in perf profiling docs (GH-110404) (#110414)
Fix env var typo in perf profiling docs (GH-110404)

Fix typo in docs
(cherry picked from commit a13620685f)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-10-05 20:40:19 +03:00
Miss Islington (bot)
d2a31319a5
[3.12] gh-101100: Fix references to `URLError and HTTPError in howto/urllib2.rst` (GH-107966) (#110086)
gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ``howto/urllib2.rst`` (GH-107966)
(cherry picked from commit bfd94ab9e9)

Co-authored-by: Yuki K <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-29 15:30:44 +02:00
Miss Islington (bot)
2622b13046
[3.12] gh-109634: Use :samp: role (GH-109635) (#109776)
gh-109634: Use :samp: role (GH-109635)
(cherry picked from commit 92af0cc580)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-24 13:54:36 +02:00
Miss Islington (bot)
8c3793a539
[3.12] gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704) (#108733)
gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704)

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)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-09-01 00:04:55 +02:00
Miss Islington (bot)
420db1027b
[3.12] gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678) (#108680)
gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678)
(cherry picked from commit c7cef54631)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-30 15:21:58 +02:00
Miss Islington (bot)
09487a202f
[3.12] gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434) (#108409)
gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434)

https://docs.python.org/3/howto/pyporting.htmlGH-porting-python-2-code-to-python-3 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 12:30:57 +02:00
Miss Islington (bot)
a27f18a382
[3.12] docs: fix grammar in isolating-extensions.rst (GH-108037) (#108218)
docs: fix grammar in isolating-extensions.rst (GH-108037)
(cherry picked from commit 47022a079e)

Co-authored-by: David Lechner <david@pybricks.com>
2023-08-21 21:40:08 +02:00
Miss Islington (bot)
19863c36d2
[3.12] Docs: Argument Clinic: Move the CConverter class to the reference (GH-107671) (#107701)
Docs: Argument Clinic: Move the CConverter class to the reference (GH-107671)
(cherry picked from commit a6675b1a59)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-07 12:03:07 +02:00
Miss Islington (bot)
e94548479a
[3.12] Docs: Argument Clinic: Improve 'How to write a custom converter' (GH-107328) (#107669)
Docs: Argument Clinic: Improve 'How to write a custom converter' (GH-107328)

- 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-06 22:09:00 +02:00
Miss Islington (bot)
236cdadb08
[3.12] gh-107432 Fix incorrect indentation in annotations HOWTO (GH-107445) (#107654)
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:08:04 +02:00
Miss Islington (bot)
3f6afafa7e
[3.12] gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403) (gh-107521)
gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403)

It was added in 3.12 for PEP 684 (per-interpreter GIL).
(cherry picked from commit fb344e99aa)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-07-31 23:15:13 +00:00
Miss Islington (bot)
fd60855299
[3.12] gh-107507: Replace 'The goals of Argument Clinic' with a summary (GH-107508) (#107516)
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:42:58 +00:00
Serhiy Storchaka
d514e1439f
[3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107419)
(cherry picked from commit f2d07d3289)
2023-07-29 09:16:27 +03:00
Serhiy Storchaka
4014869b4b
[3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380)
(cherry picked from commit 983305268e)
2023-07-28 08:20:53 +00:00
Miss Islington (bot)
5f3e371e2d
[3.12] Docs: Argument Clinic: Restructure "Basic concepts and usage" (GH-106981) (#107325)
Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

(cherry picked from commit 2ad699002e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
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 09:07:55 +02:00
Miss Islington (bot)
6bbcd792f7
[3.12] Docs: Remove the numbered steps from the Argument Clinic tutorial (GH-107203) (#107317)
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)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-26 21:03:35 +00:00
Miss Islington (bot)
9f5a5f0b33
[3.12] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107310)
(cherry picked from commit af61cb9c78)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-26 22:30:46 +03:00
Miss Islington (bot)
5ff4dfa0cb
[3.12] Docs: Add missing markup to Argument Clinic docs (GH-106876) (#107181)
(cherry picked from commit ff5f94b72c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-24 15:32:51 +00:00
Miss Islington (bot)
03271069af
[3.12] Docs: Remove duplicate word in Argument Clinic howto heading (GH-107169) (#107171)
(cherry picked from commit ebe44a5155)

Co-authored-by: Hakan Celik <hakancelikdev@gmail.com>
2023-07-24 12:03:01 +00:00
Miss Islington (bot)
40a337fbaa
[3.12] gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (GH-107062) (#107154)
(cherry picked from commit b447e19e72)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 23:13:23 +02:00
Miss Islington (bot)
95a82dcbe7
[3.12] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107113)
(cherry picked from commit 08a228da05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-23 14:50:21 +03:00
Miss Islington (bot)
332db37835
[3.12] gh-101100: Fix some broken sphinx references (GH-107095) (#107103)
(cherry picked from commit f5147c0cfb)

Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-23 12:00:31 +02:00
Miss Islington (bot)
63ae7edd35
[3.12] gh-54738: Add argparse i18n howto (GH-104562) (#107102)
(cherry picked from commit dcd7acb04a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-07-23 11:36:10 +02:00
Serhiy Storchaka
ac9aa8a369
[3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951)
(cherry picked from commit fcc816dbff)
2023-07-21 14:48:15 +03:00
Miss Islington (bot)
1a3766bb3e
[3.12] Docs: Argument Clinic: Add Background and Tutorial top-level sections (GH-106904) (#106945)
Docs: Argument Clinic: Add Background and Tutorial top-level sections (GH-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.
(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:18:18 +02:00
Miss Islington (bot)
0c106a91e8
[3.12] Docs: Argument Clinic: Group guides about default values (GH-106872) (#106874)
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:19 +02:00
Miss Islington (bot)
b79f3b36c3
[3.12] Docs: Normalise Argument Clinic advanced topics headings (GH-106842) (#106853)
(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:24:44 +02:00
Miss Islington (bot)
30c127fcec
[3.12] Docs: Normalize Argument Clinic How-To section capitalization (GH-106788) (#106791)
(cherry picked from commit 8c17729489)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-15 22:43:46 +00:00
Miss Islington (bot)
2f4a2d6c1b
[3.12] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105520)
* 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:01:51 -07:00
Victor Stinner
82ab13c49a
[3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) (#105371)
* 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

(cherry picked from commit bae415ad02)

* gh-102304: Fix up Simple ABI doc (GH-105351)

(cherry picked from commit 0202aa002e)
2023-06-06 13:11:28 +00:00
Miss Islington (bot)
25b5ce72c9
[3.12] howto/urllib2: remove link to an outdated french translation (GH-104193) (#104758)
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-23 08:57:52 +00:00