Commit graph

113661 commits

Author SHA1 Message Date
Miss Islington (bot)
442dd8ffa5
gh-94192: Fix error for dictionary literals with invalid expression as value. (GH-94304)
* Fix error for dictionary literals with invalid expression as value.

* Remove trailing whitespace
(cherry picked from commit 8c237a7a71)

Co-authored-by: wookie184 <wookie1840@gmail.com>
2022-06-26 12:07:02 -07:00
Serhiy Storchaka
1b27ec5ac6
[3.11] gh-93820: Pickle enum.Flag by name (GH-93891). (GH-94288)
(cherry picked from commit 536985814a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-26 14:24:04 +03:00
Miss Islington (bot)
5ce819f3c5
GH-94254: Make _struct module types immutable (GH-94269)
(cherry picked from commit 17ed560fcd)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-06-26 03:42:41 -07:00
Irit Katriel
ad23df97ed
[3.11] [doc] fix typo in reference to tp_descr_get and tp_descr_set (GH-94140) (GH-94293)
(cherry picked from commit 32d595fdcd)

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
2022-06-26 11:11:19 +01:00
Miss Islington (bot)
f0f3a424af
Run Tools/scripts/reindent.py (GH-94225)
Reindent files which were not properly formatted (PEP 8: 4 spaces).

Remove also some trailing spaces.
(cherry picked from commit e87ada48a9)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-06-26 01:56:55 -07:00
Miss Islington (bot)
68112c3f70
gh-83499: Fix closing file descriptors in tempfile (GH-93874)
(cherry picked from commit d4792ce916)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-26 01:38:06 -07:00
Miss Islington (bot)
4ec1f8d643
gh-70474: [doc] fix wording of GET_ANEXT doc (GH-94048)
(cherry picked from commit 9af6b75298)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-25 15:51:19 -07:00
Miss Islington (bot)
8b77681469
bpo-39971: Change examples to be runnable (GH-32172)
(cherry picked from commit c57a1c76d7)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-06-25 13:59:43 -07:00
Erlend Egeberg Aasland
0a1517dc41
[3.11] gh-90016: Reword sqlite3 adapter/converter docs (GH-93095) (#94272)
Also add adapters and converter recipes.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com.
(cherry picked from commit bd3c1c187e)
2022-06-25 22:55:17 +02:00
Miss Islington (bot)
125146771c
gh-94245: Test pickling and copying of typing.Tuple[()] (GH-94259)
(cherry picked from commit 75cb3abc3b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-25 09:10:08 -07:00
Miss Islington (bot)
4bc5f9fe8c
gh-94207: Fix struct module leak (GH-94239) (GH-94265)
Make _struct.Struct a GC type

This fixes a memory leak in the _struct module, where as soon
as a Struct object is stored in the cache, there's a cycle from
the _struct module to the cache to Struct objects to the Struct
type back to the module. If _struct.Struct is not gc-tracked, that
cycle is never collected.

This PR makes _struct.Struct GC-tracked, and adds a regression test.
(cherry picked from commit 6b865349aa)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2022-06-25 15:40:14 +01:00
Miss Islington (bot)
89ba660717
gh-94217: Skip import tests when _testcapi is a builtin (GH-94218)
(cherry picked from commit 0a40025b80)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 11:54:47 -07:00
Miss Islington (bot)
b140e5a4ac
IDLE: replace if statement with expression (GH-94228)
(cherry picked from commit 91f9947f23)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-06-24 10:30:32 -07:00
Miss Islington (bot)
251193e7fb
Docs: Remove Provides [...] from multiprocessing.shared_memory description (GH-92761)
(cherry picked from commit a91ffcf3fa)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-06-24 10:15:25 -07:00
Miss Islington (bot)
c966e0816e
gh-84461: Build Emscripten with WASM BigInt support (GH-94219)
(cherry picked from commit e69306f08b)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 08:30:46 -07:00
Miss Islington (bot)
41e4b426ce
gh-94205: Ensures all required DLLs are copied on Windows for underpth tests (GH-94206)
(cherry picked from commit 51fd4de101)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-06-24 04:20:16 -07:00
Miss Islington (bot)
4d2c972ff7
gh-84461: Fix ctypes and test_ctypes on Emscripten (GH-94142)
- c_longlong and c_longdouble need experimental WASM bigint.
- Skip tests that need threading
- Define ``CTYPES_MAX_ARGCOUNT`` for Emscripten. libffi-emscripten 2022-06-23 supports up to 1000 args.
(cherry picked from commit 8625802d85)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 04:17:21 -07:00
Miss Islington (bot)
e4d72d1863
gh-93692: remove "build finished successfully" message from setup.py (GH-93693)
The message was only emitted when the build succeeded _and_ there were
missing modules.
(cherry picked from commit ab077d1e17)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-24 04:02:14 -07:00
Miss Islington (bot)
fbf31454e9
[Enum] Remove automatic docstring generation (GH-94188)
(cherry picked from commit 28a2ccfff2)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2022-06-23 14:18:20 -07:00
Pablo Galindo Salgado
65ed8b47ee
[3.11] gh-92858: Improve error message for some suites with syntax error before ':' (GH-92894) (#94180)
(cherry picked from commit 2fc83ac3af)

Co-authored-by: wookie184 <wookie1840@gmail.com>

Co-authored-by: wookie184 <wookie1840@gmail.com>
2022-06-23 18:38:06 +01:00
Miss Islington (bot)
ee82f0f314
gh-93771: Clarify how deepfreeze.py is run (GH-94150)
(cherry picked from commit 4e796f5646)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-06-23 09:57:29 -07:00
Miss Islington (bot)
1f00e8c55e
[3.11] GH-91742: Fix pdb crash after jump (GH-94171) (#94176)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-06-23 17:36:00 +01:00
Ken Jin
852b4d4bcd
[3.11] gh-93382: Cache result of PyCode_GetCode in codeobject (GH-93383) (#93493)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-06-23 17:24:49 +01:00
Miss Islington (bot)
96a76141d5
[Enum] fix typo (GH-94158)
(cherry picked from commit b4e0d6124a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-06-23 08:14:45 -07:00
Christian Heimes
cf3f8d4728
[3.11] gh-84461: Fix test_sqlite for Emscripten/WASI (GH-94125) (GH-94157)
(cherry picked from commit 15bfabd1aa)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-23 03:11:35 -07:00
Julien Palard
5a692ca5d2
[3.11] gh-86404: [doc] Fix missing backtick and double target name. (GH-94120) (GH-94159)
(cherry picked from commit 11e865c74b)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-06-23 11:13:11 +02:00
Miss Islington (bot)
321acd4138
gh-91456: [Enum] Deprecate default auto() behavior with mixed value types (GH-91457)
When used with plain Enum, auto() returns the last numeric value assigned, skipping any incompatible member values (such as strings); starting in 3.13 the default auto() for plain Enums will require all the values to be of compatible types, and will return a new value that is 1 higher than any existing value.

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

Co-authored-by: Oscar R <89599049+oscar-LT@users.noreply.github.com>
2022-06-22 23:46:33 -07:00
Miss Islington (bot)
00a25f87f3
Closes gh-94152: Update pyvideo.org URL (GH-94075)
The URL is now https://pyvideo.org, which uses HTTPS and avoids a redirect.
(cherry picked from commit 7c439dca13)

Co-authored-by: partev <petrosyan@gmail.com>
2022-06-22 20:43:02 -07:00
Miss Islington (bot)
a562d2dc8b
gh-84623: Remove unused imports in idlelib (GH-94143)
Remove commented code in test_debugger_r.py.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 576dd90117)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-06-22 15:36:47 -07:00
Miss Islington (bot)
5bca4bba98
gh-94114: Remove obsolete reference to python.org mirrors (GH-94115)
* gh-94114
(cherry picked from commit 8661c5053f)

Co-authored-by: partev <petrosyan@gmail.com>
2022-06-22 10:05:04 -07:00
Pablo Galindo Salgado
0dadb2249a
[3.11] Add an error message to the ABI-dump file check (#94129) 2022-06-22 17:59:54 +01:00
Mark Shannon
3ece6e6feb
[3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing (GH-94127)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2022-06-22 16:32:02 +01:00
Miss Islington (bot)
8c2af49071
gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885) (GH-94121)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit d36954b7ea)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2022-06-22 15:57:56 +02:00
Miss Islington (bot)
e631d986a8
gh-93951: In test_bdb.StateTestCase.test_skip, avoid including auxiliary importers. (GH-93962) (GH-94118)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit c029b552f3)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2022-06-22 14:32:30 +02:00
Miss Islington (bot)
6c18bd5da0
Fix typo in _io.TextIOWrapper Clinic input (GH-94037) (GH-94116)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit ca308c13da)

Co-authored-by: fikotta <81991278+fikotta@users.noreply.github.com>
2022-06-22 14:29:09 +02:00
Miss Islington (bot)
58d6a86bad
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Fixes GH-94101

Automerge-Triggered-By: GH:tiran
(cherry picked from commit dc8e1d0390)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
2022-06-22 03:52:35 -07:00
Miss Islington (bot)
c1bfff4f6b
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160) (GH-94105)
It is no longer changed when create a zip or tar archive.

It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit fda4b2f063)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-06-22 11:18:15 +02:00
Miss Islington (bot)
3a119d277a
DOC: correct bytesarray -> bytearray in comments (GH-92410) (GH-94089)
(cherry picked from commit 0709586744)

Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
2022-06-22 10:47:52 +02:00
Miss Islington (bot)
331e24455a
bpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098) (GH-94099)
Co-authored-by: Windson yang <wiwindson@outlook.com>
(cherry picked from commit 6575841266)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-06-21 23:04:51 +01:00
Miss Islington (bot)
41964de01b
gh-92611: Add details on replacements for cgi utility funcs (GH-92792) (GH-93967)
Per [suggestions on a Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in GH-92611 and as a followup to PR GH-92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

(cherry picked from commit 71354adff0)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-21 14:51:27 -07:00
Miss Islington (bot)
e2e8847bf5
gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879)
Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target.  Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).

Test and comments authored by Gregory P. Smith [Google].
(cherry picked from commit 4abab6b603)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-06-21 14:29:03 -07:00
Miss Islington (bot)
a1565a80ef
gh-93021: Fix __text_signature__ for __get__ (GH-93023) (GH-94085)
Because of the way wrap_descr_get is written, the second argument
to __get__ methods implemented through the wrapper is always
optional.
(cherry picked from commit 4e08fbcfdf)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-06-21 22:31:57 +02:00
Miss Islington (bot)
736f545cd3
Tutorial: specify match cases don't fall through (GH-93615) (GH-94083)
(cherry picked from commit dd5cf84f24)

Co-authored-by: max <36980911+pr2502@users.noreply.github.com>
2022-06-21 21:52:47 +02:00
Łukasz Langa
c76e6f745c
[3.11] gh-93240: clarify wording in IO tutorial (GH-93276) (GH-94082)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 51d673176a)

Co-authored-by: paulreece <96156234+paulreece@users.noreply.github.com>
2022-06-21 21:51:15 +02:00
Christian Heimes
b1b0656805
[3.11] gh-91387: Fix tarfile test on WASI (GH-93984) (#94074)
Co-authored-by: Christian Heimes <christian@python.org>
2022-06-21 21:25:39 +02:00
Łukasz Langa
49687b0054
[3.11] gh-93675: Fix typos in Doc/ (GH-93676) (GH-94079)
Closes GH-93675
(cherry picked from commit 830513754d)

Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
2022-06-21 21:22:27 +02:00
Miss Islington (bot)
63e127f33d
gh-93851: Fix all broken links in Doc/ (GH-93853) (GH-94076)
(cherry picked from commit f62ff97f31)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-06-21 21:06:05 +02:00
Miss Islington (bot)
f6d777ce38
gh-91387: Strip trailing slash from tarfile longname directories (GH-32423)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit c1e19421c2)

Co-authored-by: Chris Fernald <chrisf671@gmail.com>
2022-06-21 11:09:07 -07:00
Miss Islington (bot)
cc42716275
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
(cherry picked from commit 0efe3a1636)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-21 10:50:47 -07:00
Miss Islington (bot)
1347607db1
gh-94052: Don't re-run failed tests with --python option (GH-94054)
(cherry picked from commit 0ff7b996f5)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-21 06:07:26 -07:00