Commit graph

114208 commits

Author SHA1 Message Date
Miss Islington (bot)
8c517d88fb
[3.11] gh-97837: Change deprecation warning message in unittest (GH-97838) (GH-97887)
(cherry picked from commit c3648f4e4a)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Automerge-Triggered-By: GH:orsenthil
2022-10-04 20:55:06 -07:00
Miss Islington (bot)
9133aabc70
gh-97825: fix AttributeError when calling subprocess.check_output(input=None) with encoding or errors args (GH-97826)
* fix AttributeError, add unit test
(cherry picked from commit db64fb9bbe)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-10-04 20:29:40 -07:00
Miss Islington (bot)
0151375829
Add re.VERBOSE flag documentation example (GH-97678)
The current re.VERBOSE documentation example leaves space for ambiguous
interpretation. One may read that spaces within the `(?:` token are
spaces inside the non-capturing group (such as `(?: )`). This patch
removes the ambiguity by including examples after the statement.
(cherry picked from commit 0ceafa7fa4)

Co-authored-by: Athos Ribeiro <athoscribeiro@gmail.com>
2022-10-04 18:29:54 -07:00
Miss Islington (bot)
d03f45203b
gh-95913: Copyedit/improve Implementation Changes What's New section (GH-97720)
* Add and refine reST/Sphinx syntax for implementation changes section

* Clarify and refine wording in the Implementation Changes section

* Elide unnecessary comma

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 4e731814d7)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-04 18:08:59 -07:00
Miss Islington (bot)
98e250bed1
[3.11] gh-93738: Documentation C syntax (:c:data:view->obj -> :c:expr:view->obj) (GH-97773) (#97867)
:c:data:`view->obj` -> :c:expr:`view->obj`
(cherry picked from commit fa59bda8d3)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:55:17 -07:00
Miss Islington (bot)
76c50d784f
[3.11] gh-93738: Documentation C syntax (:c:type:PyInterpreterState * -> :c:expr:PyInterpreterState *) (GH-97777) (#97865)
:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`
(cherry picked from commit 4ebb025031)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:53:48 -07:00
Miss Islington (bot)
3ec11d92fd
[3.11] gh-93738: Documentation C syntax (:c:type:TYPE -> :c:expr:TYPE) (GH-97770) (#97874)
:c:type:`TYPE` -> :c:expr:`TYPE`
(cherry picked from commit 8b211b4cdb)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:48:24 -07:00
Miss Islington (bot)
1b7da7f088
[3.11] gh-93738: Documentation C syntax (:c:type:FILE -> :c:expr:FILE) (GH-97769) (#97871)
:c:type:`FILE` -> :c:expr:`FILE`
(cherry picked from commit 192d401ba5)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 17:47:02 -07:00
Miss Islington (bot)
a51124729a
[3.11] gh-93738: Documentation C syntax (:c:type:PyTupleObject* -> :c:expr:PyTupleObject*) (GH-97780) (#97863)
:c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*`
(cherry picked from commit 510baa429a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:46:13 -07:00
Miss Islington (bot)
df133f54ef
[3.11] gh-93738: Documentation C syntax (:c:type:PyBytesObject* -> :c:expr:PyBytesObject*) (GH-97782) (#97861)
:c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*`
(cherry picked from commit 9ebc50866b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:40:47 -07:00
Miss Islington (bot)
9749c6029e
[3.11] gh-93738: Documentation C syntax (:c:type:PyUnicodeObject* -> :c:expr:PyUnicodeObject*) (GH-97783) (#97859)
:c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*`
(cherry picked from commit 898834e27b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:38:58 -07:00
Miss Islington (bot)
1657c837f3
[3.11] gh-93738: Documentation C syntax (:c:type:Py_UNICODE* -> :c:expr:Py_UNICODE*) (GH-97784) (#97857)
:c:type:`Py_UNICODE*` -> :c:expr:`Py_UNICODE*`
(cherry picked from commit a081cae2a2)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-04 16:38:24 -07:00
Miss Islington (bot)
a13b4e8ca6
gh-95913: Copyedit/improve Other Language Changes What's New section (GH-97719)
* Add/refine cross references to items in other lang changes section

* Unify context manager exception changes into single non-repetitive item

* More clearly describe the intent and consequences of the -P option

* Apply minor clarifications & copyedits to rest of section

* Tweak the formatting of module references

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit a77d9dedcd)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-04 16:24:50 -07:00
Miss Islington (bot)
a685cc0a5e
gh-95913: Move py.exe to appropriate What's New section & refine text (GH-97718)
* Move Windows py.exe improvements from Typing section to New Features

* Add ref target label and use literal for py.exe

* Be clearer/explict about what legacy version arg components reprisent

* Apply other minor clarity and textual fixes to py.exe launcher text

* Refine phrasing of legacy sentence of py.exe desc

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 985958187d)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-04 15:58:59 -07:00
Miss Islington (bot)
5fdce5d009
[3.11] gh-88355: Fix backslashes in AF_PIPE (GH-96543) (#97854)
gh-88355: Fix backslashes in AF_PIPE (GH-96543)

Fix backslashes in AF_PIPE (GH-88355)

The correct syntax for AF_PIPE addresses is `\\.\pipe\blahblah`, not `\.\pipe{blahblah}`, but the syntax markup messed up the backslashes.
(cherry picked from commit ff28d8926d)

Co-authored-by: cousteau <cousteaulecommandant@users.noreply.github.com>

Co-authored-by: cousteau <cousteaulecommandant@users.noreply.github.com>
2022-10-04 15:55:34 -07:00
Miss Islington (bot)
d45698269e
[3.11] gh-96448: fix documentation for _thread.lock.acquire (GH-96449) (#97851)
gh-96448: fix documentation for _thread.lock.acquire (GH-96449)

* fix documentation for _thread.lock.acquire

* update formatting of _thread.lock.acquire() doc
(cherry picked from commit 7acb93f0d4)

Co-authored-by: Daniel Giger <danielg3432@gmail.com>

Co-authored-by: Daniel Giger <danielg3432@gmail.com>
2022-10-04 15:21:28 -07:00
Miss Islington (bot)
cad4dca7bf
gh-90301: Doc: Add references to PEP 686 (GH-96816)
Doc: Add references to PEP 686.
(cherry picked from commit 87679a6e60)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-10-04 15:14:52 -07:00
Senthil Kumaran
87a9e0f815
[3.11] gh-97731: fix distclean target to clean docs GH-97732 (#97844)
Backport  gh-97731: fix distclean target to clean docs #97732 to 3.11
2022-10-04 14:56:46 -07:00
Miss Islington (bot)
dcec9b70c9
GH-95913: Update what's new in 3.11 for asyncio (GH-97806)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 9fbfa42ece)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-10-04 11:45:02 -07:00
Miss Islington (bot)
0dcfe0f47e
GH-82604: fix docs about configuring selector (GH-97755)
(cherry picked from commit 53503ff60e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-10-04 09:52:28 -07:00
Miss Islington (bot)
3263aaf83f
gh-97754: Update doc for default location of per-user installs on Windows (GH-97756)
(cherry picked from commit a120b9f25d)

Co-authored-by: Ben Faulhaber <111227622+faulhaberben@users.noreply.github.com>
2022-10-04 09:13:37 -07:00
Miss Islington (bot)
bbecca523a
Adjust stable ABI internal documentation (GH-96896)
I was perusing this file, and noticed that this part of the documentation is slightly out of date: the `struct` items in this TOML file currently contain `struct_abi_kind` members, which distinguish between the different types of ABI compatibility described in the comment.

I've updated the comment to reflect this.
(cherry picked from commit 6e53308829)

Co-authored-by: William Woodruff <william@yossarian.net>
2022-10-04 06:15:46 -07:00
Miss Islington (bot)
c62be23f04
gh-97709: Included newline separator in Mandelbrot set (GH-97737)
Included newline separator in Mandelbrot set

Now the Mandelbrot set one-liner example on separates the lines with a '\n' character.
(cherry picked from commit 49802605f8)

Co-authored-by: matheusja <matheusjahnke@hotmail.com>
2022-10-03 22:43:00 -07:00
Miss Islington (bot)
4591dae421
[3.11] GH-97752: Clear the previous member of newly-created generator/coroutine frames (GH-97812)
(cherry picked from commit 93fcc1f413)
2022-10-03 21:03:26 -07:00
Miss Islington (bot)
0e3a046b48
gh-97639: Remove tokenize.NL check from tabnanny (GH-97640)
* gh-97639: Remove `tokenize.NL` check from `tabnanny`

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 06016845dc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-10-03 19:10:00 -07:00
Miss Islington (bot)
e34b00cc3e
gh-93738: Documentation C syntax (:c:data:0 -> `0`) (GH-97771)
:c:data:`0` -> ``0``
(cherry picked from commit 5e997cff3e)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-03 18:55:04 -07:00
Miss Islington (bot)
789d5bc80a
Update http.client.rst (GH-24803)
* Update http.client.rst

* Apply suggestions from code review

Co-authored-by: Éric <merwok@netwok.org>

* Update http.client.rst

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Senthil Kumaran <senthil@python.org>
(cherry picked from commit 0c91a12511)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-10-03 16:35:10 -07:00
Miss Islington (bot)
541265fd7c
Minor grammar changes to http.client docs (GH-96221)
Minor grammar changes
(cherry picked from commit d053c47bfd)

Co-authored-by: Rohan Shah <57906961+rshah713@users.noreply.github.com>
2022-10-03 16:30:07 -07:00
Miss Islington (bot)
ca05666fed
multiprocessing docs: Remove extra option ELLIPSIS from section with code (GH-96625)
(cherry picked from commit d78aa4e11a)

Co-authored-by: Ivan Kapeykin <5349983@gmail.com>
2022-10-03 15:48:00 -07:00
Miss Islington (bot)
d07428607a
Document that MozillaCookieJar works for curl's cookie files (GH-91852)
MozillaCookieJar works for curl's cookies
(cherry picked from commit 0ea8b925d0)

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>
2022-10-03 15:46:23 -07:00
Miss Islington (bot)
4420da0aef
gh-94732: Fix KeyboardInterrupt race in asyncio run_forever() (GH-97765)
Ensure that the event loop's `_thread_id` attribute and the asyncgen hooks set by `sys.set_asyncgen_hooks()` are always restored no matter where a KeyboardInterrupt exception is raised.
(cherry picked from commit 3a49dbb98c)

Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
2022-10-03 14:39:24 -07:00
Miss Islington (bot)
fe99b64bef
gh-94808: Coverage: Check picklablability of calliter (GH-95923)
(cherry picked from commit cfbc7dd910)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2022-10-03 14:25:48 -07:00
Benjamin Peterson
4d4b1e6c0b
[3.11] Fix typos in bltinmodule.c. (GH-97789)
(cherry picked from commit 873a2f2527)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-10-03 13:10:14 -07:00
Miss Islington (bot)
096e39637b
Fix typo in unittest docs (GH-97742)
(cherry picked from commit e6f9ec5c03)

Co-authored-by: annonm <annonm@gmail.com>
2022-10-03 06:43:31 -07:00
Serhiy Storchaka
f07ee41479
[3.11] gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (GH-97729) (GH-97757)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
(cherry picked from commit 0ee9619a4c)
2022-10-03 15:01:54 +03:00
Miss Islington (bot)
3db036888c
gh-95913: Fix PEP number in PEP 678 What's New ref label (GH-97739)
What's New: Fix PEP number in PEP 678 ref target label
(cherry picked from commit e738b5190b)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-02 21:21:46 -07:00
Miss Islington (bot)
2049c9db15
gh-95913: Copyedit/improve New Modules What's New section (GH-97721)
* Link TOML & WSGI in New Modules section, refine text & add ref label

* Further reformat new modules & add PEP link to tomllib
(cherry picked from commit bd00112a99)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-02 21:11:05 -07:00
Miss Islington (bot)
827f77e5f1
gh-97740: Fix bang in Sphinx C domain ref target syntax (GH-97741)
* gh-97740: Fix bang in Sphinx C domain ref target syntax

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

* Add NEWS entry for C domain bang fix

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 9148c0d893)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-02 21:02:46 -07:00
Miss Islington (bot)
f59506780a
gh-96819: multiprocessing.resource_tracker: check if length of pipe write <= 512 (GH-96890)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 19ca114645)

Co-authored-by: Koki Saito <49419225+saito828koki@users.noreply.github.com>
2022-10-02 18:09:58 -07:00
Miss Islington (bot)
b26fb3cdc6
GH-85447: Clarify docs about awaiting future multiple times (GH-97738)
(cherry picked from commit 9151bbefea)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-10-02 15:27:17 -07:00
Miss Islington (bot)
011260bca0
[3.11] [docs] Update logging cookbook with recipe for using a logger like an output… (GH-97730) (GH-97735) 2022-10-02 17:44:42 +01:00
Miss Islington (bot)
8c528ef4a1
gh-97607: Fix content parsing in the impl-detail reST directive (GH-97652)
* Don't parse content as arg in the impl-detail directive

This does not change the (untranslated) output,
but ensures that the doctree node metadata is correct.
which fixes gh-97607 with the text not being translated.
It also simplifies the code and logic
and makes it consistant with the docutils built-in directives.

* Remove unused branch from impl-detail directive handling no-content case

This is not used anywhere in the docs and lacks a clear use case,
and is more likely a mistake which is now flagged at build time.
This simplifies the logic from two code paths to one,
and makes the behavior consistant with similar built-in directives
(e.g. the various admonition types).

* Further simplify impl-detail reST directive code
(cherry picked from commit e8165d47b8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-01 22:28:54 -07:00
Miss Islington (bot)
1fa848ac39
gh-95975: Move except/*/finally ref labels to more precise locations (GH-95976)
* gh-95975: Move except/*/finally ref labels to more precise locations

* Add section headers to fix :keyword: role and aid navigation

* Move see also to the introduction rather than a particular subsection

* Fix other minor Sphinx syntax issues with except

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

* Suppress redundant link to same section for except too

* Don't link try/except/else/finally keywords if in the same section

* Format try/except/finally as keywords in modified sections

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit dcc82331c8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-01 22:20:43 -07:00
Miss Islington (bot)
dbde686a49
gh-97591: In Exception.__setstate__() acquire strong references before calling tp_hash slot (GH-97700)
(cherry picked from commit d639438609)

Co-authored-by: Ofey Chan <ofey206@gmail.com>
2022-10-01 21:19:57 -07:00
Miss Islington (bot)
9189cd6b05
gh-95588: Drop the safety claim from ast.literal_eval docs. (GH-95919)
It was never really safe and this claim conflicts directly with the big warning in the docs about it being able to crash the interpreter.
(cherry picked from commit 8baef8ae36)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-10-01 18:21:15 -07:00
Miss Islington (bot)
35a394c556
Fix capitalization of Unix in documentation (GH-96913)
(cherry picked from commit bd7d0e875e)

Co-authored-by: Will Hawkins <8715530+hawkinsw@users.noreply.github.com>
2022-10-01 16:51:34 -07:00
Miss Islington (bot)
3614bbb8eb
gh-90908: Document asyncio.Task.cancelling() and asyncio.Task.uncancel() (GH-95253)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
(cherry picked from commit f00645d5db)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-01 11:10:04 -07:00
Miss Islington (bot)
95609525de
GH-96827: Don't touch closed loops from executor threads (GH-96837)
* When chaining futures, skip callback if loop closed.
* When shutting down an executor, don't wake a closed loop.
(cherry picked from commit e9d63760fe)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-09-30 13:23:33 -07:00
Miss Islington (bot)
3124618fd5
GH-97592: Fix crash in C remove_done_callback due to evil code (GH-97660)
Evil code could cause fut_callbacks to be cleared when PyObject_RichCompareBool is called.
(cherry picked from commit 63780f4599)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-09-30 13:22:48 -07:00
Miss Islington (bot)
cdc01eaed9
gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685)
This documents the behavior that has always been the case since timeout
support was introduced in Python 3.3.
(cherry picked from commit b05dd79649)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-09-30 10:54:12 -07:00