Commit graph

110798 commits

Author SHA1 Message Date
Pablo Galindo Salgado
e3aa9fd77b
[3.10] bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) (GH-29586)
(cherry picked from commit da20d7401d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-18 00:17:18 +01:00
Miss Islington (bot)
4ffde90dcc
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) (GH-29598)
If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d8105c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-11-17 22:59:19 +01:00
Miss Islington (bot)
1079b3e3cb
bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564)
Unlike the other locks reinitialized by _PyRuntimeState_ReInitThreads,
the "interpreters.main->id_mutex" is not freed by _PyRuntimeState_Fini
and should not force the default raw allocator.
(cherry picked from commit 736684b1bb)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2021-11-17 13:16:01 -08:00
Pablo Galindo Salgado
5618c81e13
[3.10] bpo-45716: Improve the error message when using True/False/None as keywords in a call (GH-29413). (GH-29428)
(cherry picked from commit e2d65630f3)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-16 22:31:16 +00:00
Miss Islington (bot)
7bac598819
Save a reference for ensure_future and create_task (GH-29163)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
(cherry picked from commit c750adbe69)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2021-11-16 03:51:19 -08:00
Anthony Sottile
7c99e434a9
ensure deprecation warning from assertDictContainsSubset points at actual test code (#26497) 2021-11-15 21:11:02 -06:00
Miss Islington (bot)
94dad5e41e
bpo-45677: Reword first section of sqlite3 docs (GH-29326) (GH-29566)
* bpo-45677: Avoid addressing the reader as 'you' in sqlite3 docs

* Adjust wording

* Adjust wording again

* Typo

* Update Doc/library/sqlite3.rst

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

* Address review: adjust wording

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Apply Alex' suggestion, and apply 80 char limit to PR

* Minor adjustment

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 6c5a312fb6)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-15 15:31:38 -08:00
Miss Islington (bot)
0320cf1a25
bpo-25381: Update explanation of exceptions in C. (GH-26838) (GH-29568)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

(cherry picked from commit ad43dc0b54)
2021-11-15 18:06:45 -05:00
Miss Islington (bot)
55d24edaad
bpo-45752: Remove "array" from list of things that cannot be copied in copy module docstring (GH-29555)
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit c2c4fdf5ea)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-14 05:18:31 -08:00
M. Mostafa Farzan
2081f9fe75
[3.10] bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) (GH-29556)
(cherry picked from commit b7360ae395)

Co-authored-by: M. Mostafa Farzan <m2_farzan@yahoo.com>

Automerge-Triggered-By: GH:asvetlov
2021-11-14 04:54:42 -08:00
Miss Islington (bot)
bf26a6da7a
bpo-45738: Fix computation of error location for invalid continuation (GH-29550)
characters in the parser
(cherry picked from commit 25835c518a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-13 17:30:03 -08:00
Miss Islington (bot)
28326ac5f8
bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)
I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit f8da00ef04)

Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
2021-11-13 12:36:44 -08:00
Miss Islington (bot)
ed55426acd
[bpo-45765] Fix distribution discovery on empty path. (GH-29487) (GH-29510)
(cherry picked from commit 6ec0dec7b7)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-11-13 15:08:28 -05:00
Miss Islington (bot)
3f15792d60
[3.10] bpo-45772: socket.socket should be a class instead of a function (GH-23960) (GH-29542)
* [bpo-45772](): socket.socket should be a class instead of a function

Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.
(cherry picked from commit 4c792f39e6)


Co-authored-by: Hong Xu <hong@topbug.net>

Automerge-Triggered-By: GH:asvetlov
2021-11-12 22:23:23 -08:00
Miss Islington (bot)
e4c5a5eaba
bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525) (GH-29530) 2021-11-12 12:44:55 -06:00
Miss Islington (bot)
628667ac9a
bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29535)
Since `.. module:: contextvars` sets the module using `.. class:: contextvars.Token`, intersphinx records it as `contextvars.contextvars.Token`.
(cherry picked from commit e501d70b34)

Co-authored-by: Hynek Schlawack <hs@ox.cx>

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2021-11-12 12:19:52 +02:00
Brandt Bucher
a89bbde83f
[3.10] bpo-45773: Stop "optimizing" certain jump patterns (GH-29526) 2021-11-11 13:52:43 -08:00
Irit Katriel
c5bfb88eb6
[3.10] bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before a no-arg opcode (GH-29480) (GH-29506) 2021-11-09 22:05:30 +00:00
Miss Islington (bot)
d29f591dd6
bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501)
(cherry picked from commit a56fbad85e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-11-09 12:43:12 -08:00
Steve Dower
340ecafdf3
bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477) 2021-11-09 17:48:49 +00:00
Miss Islington (bot)
2c4792264f
Closes bpo-45712: Add missing word in control flow tutorial (GH-29460)
(cherry picked from commit 7484a5c82a)

Co-authored-by: 180909 <734461790@qq.com>
2021-11-08 09:13:02 -08:00
Miss Islington (bot)
69b3de65ad
bpo-40170: Update What's New in Python 3.9 (GH-29470)
The PyType_HasFeature() change has been reverted: the static inline
function access directly the PyTypeObject.tp_flags member.
(cherry picked from commit 99c7e9853f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-11-08 09:05:15 -08:00
Miss Islington (bot)
77afb76942
bpo-45741: docs: fix plural (GH-29461) (GH-29463)
"entry points provides" -> "entry points provide"

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 19b107e9b5)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2021-11-08 01:32:23 -05:00
Miss Islington (bot)
045f205ba4
bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29452)
(cherry picked from commit 9127520729)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-11-06 21:21:04 +01:00
Miss Islington (bot)
8fdf6c64d3
bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29450)
(cherry picked from commit cc1cbcbb2d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-11-06 20:23:00 +01:00
Miss Islington (bot)
e53cb9811f
bpo-39452: [doc] Change "must" to "can" on relative import style in __main__ (GH-29379) (GH-29449)
(cherry picked from commit 57457a1e5c)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-11-06 19:50:00 +01:00
Miss Islington (bot)
494f8da741
[doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29447)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 77a2c77c84)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-06 19:21:36 +01:00
Miss Islington (bot)
6603f6b5bd
bpo-45644: Make json.tool read infile before writing to outfile (GH-29273) (GH-29445)
so that

$ python -m json.tool foo.json foo.json

doesn't result in an empty foo.json.

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

Co-authored-by: Chris Wesseling <chris.wesseling@protonmail.com>
2021-11-06 19:01:17 +01:00
Steve Dower
804ea41211
bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417) 2021-11-06 00:25:29 +00:00
Miss Islington (bot)
279a7a0c94
bpo-45762: Improve docs for `@singledispatch/@singledispatchmethod` (GH-29426) (GH-29431)
(cherry picked from commit 71e8a3e76a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-05 17:49:40 +01:00
Miss Islington (bot)
bcb236c19e
bpo-45678: Add more `singledispatchmethod` tests (GH-29412) (GH-29424)
In order to fix a bug in the 3.9 branch in GH-29394, more tests were added to
``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly
wrapped a target method, even if the target method had already been wrapped by
 multiple other decorators. This PR brings the new tests into the 3.11 and 3.10
branches as well.
(cherry picked from commit 32f55d1a5d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-05 16:27:22 +01:00
Miss Islington (bot)
099a94fba3
bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) (GH-29421)
(cherry picked from commit 54d1e3f72e)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-05 11:00:18 +01:00
Miss Islington (bot)
363ecb36da
bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) (GH-29422)
(cherry picked from commit e52f9bee80)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-05 10:59:34 +01:00
Pablo Galindo Salgado
0e34a5918c
[3.10] bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393) (GH-29395)
Co-authored-by: Wim Glenn <wglenn@jumptrading.com>.
(cherry picked from commit 762173c670)

Co-authored-by: wim glenn <wim.glenn@gmail.com>
2021-11-05 00:19:27 +01:00
Miss Islington (bot)
1f3ae5c1ca
bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258)
* Don't stackoveflow on debug builds

* Also catch the pickletester case
(cherry picked from commit d56375a0dd)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-11-04 13:45:05 -07:00
Miss Islington (bot)
c0f3281d6c
bpo-45220: Remove invalid include from resource definition files on Windows (GH-29396) (GH-29406)
(cherry picked from commit fd0c84dc28)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-11-04 21:17:08 +01:00
Miss Islington (bot)
d729c80979
Add generated artifacts in Mac/ to .gitignore; update copyright (GH-29408) (GH-29409)
(cherry picked from commit 3167df1621)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-04 20:32:03 +01:00
Steve Dower
6340ba7f2c
bpo-43652: Actually update to Tcl/Tk 8.6.11 on Windows (GH-29397) 2021-11-04 17:27:57 +00:00
Miss Islington (bot)
75ed2ce9e8
Remove reference to `Tuple at top of typing` docs (GH-29401)
``typing.Tuple`` has been deprecated since Python 3.9, so it makes no sense to mention it so prominently in the documentation for the ``typing`` module.
(cherry picked from commit 87032cfa3d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-04 05:11:14 -07:00
Miss Islington (bot)
c10896696f
bpo-45680: `typing docs: improve links to docs on GenericAlias/__class_getitem__` (GH-29387)
(cherry picked from commit e03e50377d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-03 21:27:47 -07:00
Miss Islington (bot)
f1918385cc
bpo-45678: Add `functools.singledispatchmethod` tests (GH-29328) (GH-29390)
(cherry picked from commit 5a14929a6e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-03 17:45:20 +01:00
Łukasz Langa
fd6b70d6b7
[3.10] bpo-45578: add tests for dis.distb (GH-29332) (GH-29385)
(cherry picked from commit e346f19681)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-11-03 16:53:36 +01:00
Miss Islington (bot)
0624706179
bpo-45633: Fix newtypes doc typo (GH-29318) (GH-29364)
(cherry picked from commit 454cdb99ab)

Co-authored-by: Dmitry Smirnov <dmitrysmirnov931@gmail.com>
2021-11-03 17:30:02 +08:00
Miss Islington (bot)
cfdd7d26a7
bpo-45406: make inspect.getmodule() return None when getabsfile() raises FileNotFoundError (GH-28824)
(cherry picked from commit a459a81530)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-11-02 15:23:43 -07:00
Miss Islington (bot)
8af3090cb7
[doc] Link to section File input (GH-28941) (GH-29375)
(cherry picked from commit 48824fa1e2)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-11-02 22:54:53 +01:00
Miss Islington (bot)
71f602b54c
bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29373)
Specify that SSLContext.set_default_verify_paths is called on ALL systems.

The code of SSLContext.load_default_certs was changed in bpo-22449 to do this,
this fix corrects the documentation to match that change.
(cherry picked from commit 3551bf16ee)

Co-authored-by: LincolnPuzey <lincoln@puzey.dev>
2021-11-02 22:47:50 +01:00
Ned Deily
6681a77c52
bpo-44828: Avoid leaving a zombie Save panel. (GH-29369)
Patch by Marc Culler of the Tk project.
2021-11-02 17:02:58 -04:00
Miss Islington (bot)
8d609b29c0
makefile: remove unused SGI_ABI variable (GH-29325) (GH-29368)
SGI_ABI support was removed in [1] but this variable was never removed
from the makefile. Currently, it is just a bad variable that does not
get replaced by the configure script.

[1] https://github.com/python/cpython/pull/3294

Signed-off-by: Filipe Laíns <lains@riseup.net>
(cherry picked from commit 38982ab136)

Co-authored-by: Filipe Laíns <lains@riseup.net>
2021-11-02 22:00:46 +01:00
Miss Islington (bot)
b71bc05245
[3.10] bpo-43158: Use configure values for building _uuid extension (GH-29353) (GH-29362)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-02 12:49:17 +01:00
Miss Islington (bot)
b2ae631619
[3.10] bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358) (GH-29361)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-02 12:32:36 +01:00