Commit Graph

111979 Commits

Author SHA1 Message Date
Łukasz Langa 537c93ea3b
[3.10] gh-93738: Disallow pre-v3 syntax in the C domain (GH-97962) (#97977)
Also, disable using invalid sphinx-lint 0.6.2.
(cherry picked from commit f612565bd3)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-06 11:56:52 -07:00
Miss Islington (bot) e2591e4f5e
[3.10] gh-95691: Doc BufferedWriter and BufferedReader (GH-95703) (#97948)
gh-95691: Doc BufferedWriter and BufferedReader (GH-95703)
(cherry picked from commit 0d68879104)

Co-authored-by: 180909 <734461790@qq.com>

Co-authored-by: 180909 <734461790@qq.com>
2022-10-05 17:22:42 -07:00
Miss Islington (bot) c80c282d11
GH-88968: Add notes about socket ownership transfers (GH-97936)
(cherry picked from commit 74ea204634)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-10-05 16:54:46 -07:00
Miss Islington (bot) 6f23472345
[3.10] Fix type annotation of `pstats.FunctionProfile.ncalls` (GH-96741) (#96836)
This change aligns the type annotation of `pstats.FunctionProfile.ncalls` with its runtime type.
(cherry picked from commit 8e9a37dde4)

Co-authored-by: Ruan Comelli <ruancomelli@gmail.com>
2022-10-05 14:57:26 -07:00
Miss Islington (bot) 9f1c9b1a7a
[3.10] gh-97654: Add auto exception chaining example to tutorial (GH-97703) (#97884)
Add auto exception chaining example to tutorial
(cherry picked from commit 395b66a0ae)

Co-authored-by: Shahriar Heidrich <smheidrich@weltenfunktion.de>
2022-10-05 14:51:10 -07:00
Łukasz Langa 3b0f2a7ff0
[3.10] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (GH-97768) (#97925)
:c:type:`<C type>` -> :c:expr:`<C type>`

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0031e62973)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 14:10:55 -07:00
Miss Islington (bot) ac2427eeff
gh-91539: improve performance of get_proxies_environment (GH-91566)
* improve performance of get_proxies_environment when there are many environment variables

* 📜🤖 Added by blurb_it.

* fix case of short env name

* fix formatting

* fix whitespace

* whitespace

* Update Lib/urllib/request.py

Co-authored-by: Carl Meyer <carl@oddbird.net>

* Update Lib/urllib/request.py

Co-authored-by: Carl Meyer <carl@oddbird.net>

* Update Lib/urllib/request.py

Co-authored-by: Carl Meyer <carl@oddbird.net>

* Update Lib/urllib/request.py

Co-authored-by: Carl Meyer <carl@oddbird.net>

* whitespace

* Update Misc/NEWS.d/next/Library/2022-04-15-11-29-38.gh-issue-91539.7WgVuA.rst

Co-authored-by: Carl Meyer <carl@oddbird.net>

* Update Lib/urllib/request.py

Co-authored-by: Carl Meyer <carl@oddbird.net>

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
(cherry picked from commit aeb28f5130)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2022-10-05 11:39:24 -07:00
Miss Islington (bot) b39182e4b0
[3.10] gh-93738: Documentation C syntax (Function glob patterns -> literal markup) (GH-97774) (#97911)
(cherry picked from commit 0e72606dd4)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-05 11:00:50 -07:00
Miss Islington (bot) de0a656d5b
[3.10] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeObject*`) (GH-97778) (#97890)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit c70c8b6976)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:21:18 -07:00
Łukasz Langa 9aed6bdb20
[3.10] gh-93738: Documentation C syntax (Use `c:struct`) (GH-97772) (#97893)
Use `c:struct`
(cherry picked from commit a0f5599aac)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:20:46 -07:00
Łukasz Langa d99ea4c7a2
[3.10] gh-93738: Documentation C syntax (:c:type: to :c:expr:, misc. cases) (GH-97775) (#97891)
(cherry picked from commit 6b3d4db02e)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:19:38 -07:00
Miss Islington (bot) 4245764fae
[3.10] gh-93738: Documentation C syntax (:c:type:`PyObject` -> :c:expr:`PyObject`) (GH-97776) (#97888)
:c:type:`PyObject` -> :c:expr:`PyObject`
(cherry picked from commit 0bf6a617ed)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 08:17:46 -07:00
Miss Islington (bot) d108eeb678
gh-95196: Disable incorrect pickling of the C implemented classmethod descriptors (GH-96383)
(cherry picked from commit 77f0249308)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-10-05 04:53:38 -07:00
Miss Islington (bot) 3c09debaa7
gh-97661: Improve accuracy of sqlite3.Cursor.fetchone docs (GH-97662)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 4b83cd0b22)

Co-authored-by: Jia Junjie <62194633+jiajunjie@users.noreply.github.com>
2022-10-05 01:56:47 -07:00
Miss Islington (bot) ece5f7e046
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:35:53 -07:00
Miss Islington (bot) 24908f1f20
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:37:01 -07:00
Miss Islington (bot) 09e5029aca
[3.10] gh-93738: Documentation C syntax (:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`) (GH-97777) (#97877)
: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:56:46 -07:00
Miss Islington (bot) 95289bf983
[3.10] gh-93738: Documentation C syntax (:c:data:`view->obj` -> :c:expr:`view->obj`) (GH-97773) (#97868)
: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:31 -07:00
Miss Islington (bot) 994eaa3a6f
[3.10] gh-93738: Documentation C syntax (:c:type:`TYPE` -> :c:expr:`TYPE`) (GH-97770) (#97870)
: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:47:56 -07:00
Miss Islington (bot) 5eedf1d863
[3.10] gh-93738: Documentation C syntax (:c:type:`FILE` -> :c:expr:`FILE`) (GH-97769) (#97872)
: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:20 -07:00
Miss Islington (bot) 9c755d7d6b
[3.10] gh-93738: Documentation C syntax (:c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*`) (GH-97780) (#97864)
: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:30 -07:00
Miss Islington (bot) 5aa108b9e0
[3.10] gh-93738: Documentation C syntax (:c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*`) (GH-97782) (#97862)
: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:41:05 -07:00
Miss Islington (bot) 20ddf1c17a
[3.10] gh-93738: Documentation C syntax (:c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*`) (GH-97783) (#97860)
: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:39:57 -07:00
Miss Islington (bot) f879297b86
[3.10] gh-93738: Documentation C syntax (:c:type:`Py_UNICODE*` -> :c:expr:`Py_UNICODE*`) (GH-97784) (#97858)
: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:39 -07:00
Miss Islington (bot) a980dafd2c
[3.10] gh-88355: Fix backslashes in AF_PIPE (GH-96543) (#97855)
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:39 -07:00
Miss Islington (bot) f9b49b6bfa
[3.10] gh-96448: fix documentation for _thread.lock.acquire (GH-96449) (#97852)
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:38 -07:00
Senthil Kumaran 989bdbcfae
[3.10] gh-97731: fix distclean target to clean docs GH-97732 (#97846)
Backport  gh-97731: fix distclean target to clean docs #97732 to 3.10
2022-10-04 14:56:55 -07:00
Miss Islington (bot) 19ed29ed3c
[3.10] gh-97709: Included newline separator in Mandelbrot set (GH-97737) (#97823)
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-04 12:01:07 -07:00
Miss Islington (bot) f4e2686b78
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:35 -07:00
Miss Islington (bot) 2911521026
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:14:42 -07:00
Miss Islington (bot) 40e56f3191
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:07:10 -07:00
Miss Islington (bot) 82ce586f10
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:08 -07:00
Miss Islington (bot) 656983741f
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:17 -07:00
Miss Islington (bot) 280bf3fb16
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:14 -07:00
Miss Islington (bot) f8a3c4cb83
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 16:00:40 -07:00
Miss Islington (bot) 17b49be003
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:49:16 -07:00
Miss Islington (bot) a7e281150e
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:44 -07:00
Serhiy Storchaka 769b9dccd2
[3.10] gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (GH-97729) (GH-97760)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
(cherry picked from commit 0ee9619a4c)
2022-10-03 16:59:21 +03:00
Miss Islington (bot) e1cbb6f62f
Fix typo in unittest docs (GH-97742)
(cherry picked from commit e6f9ec5c03)

Co-authored-by: annonm <annonm@gmail.com>
2022-10-03 06:42:42 -07:00
Jason R. Coombs bead571e6a
[3.10] gh-96845: Fix docs around importlib.abc.Traversable (GH-97515)
* [3.10] gh-96845: Correct reference to Traversable* classes.

* [3.10] gh-96845: Add a note about the pending move of resources.abcs.
2022-10-03 09:11:06 -04:00
Miss Islington (bot) a1711ef030
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 20:59:46 -07:00
Miss Islington (bot) c2d3f73da7
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:11:17 -07:00
Miss Islington (bot) 72d445a22e
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:24:29 -07:00
Miss Islington (bot) 5ee8344aa2
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:27:56 -07:00
Miss Islington (bot) c6fcbb4928
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:18:38 -07:00
Miss Islington (bot) a4fbb94965
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:24:55 -07:00
Miss Islington (bot) 748b2b780d
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:42 -07:00
Miss Islington (bot) 54bbb5e336
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:28:27 -07:00
Miss Islington (bot) a5c503f296
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:25:06 -07:00
Miss Islington (bot) 6d7dbcc0b3
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:53:07 -07:00