Commit graph

12265 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
Erlend Egeberg Aasland
ed91f959b0
[3.10] bpo-45634: Don't combine error checks when adding sqlite3 int constants (GH-29251). (GH-29343) 2021-10-31 20:22:22 +09:00
Łukasz Langa
7e2c0a18b4
[3.10] bpo-45581: Raise MemoryError in sqlite3.connect if SQLite signals memory error (GH-29171) (GH-29323)
(cherry picked from commit e2e62b3808)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-10-29 22:54:07 +02:00
Miss Islington (bot)
19903085c3
bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161)
(cherry picked from commit f6e8b80d20)

Co-authored-by: Christian Heimes <christian@python.org>
2021-10-22 11:22:01 -07:00
Miss Islington (bot)
696a89fef8
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
(cherry picked from commit d2cd5eef0c)

Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
2021-10-20 10:41:35 -07:00
Serhiy Storchaka
4641afef66
[3.10] bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28952)
They support now splitting escape sequences between input chunks.

Add the third parameter "final" in codecs.raw_unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit 39aa98346d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-14 21:23:39 +03:00
Miss Islington (bot)
0bff4ccbfd
[3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28943)
They support now splitting escape sequences between input chunks.

Add the third parameter "final" in codecs.unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit c96d1546b1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-14 20:02:20 +03:00
Dong-hee Na
70b150a366
[3.10] no-issue: Make silence about warning '_POSIX_C_SOURCE redefined' (GH-28948) (GH-28951) 2021-10-15 01:35:53 +09:00
Dong-hee Na
c80f0b7aa1
[3.10] bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832) (GH-28834) 2021-10-10 01:13:21 +09:00
Miss Islington (bot)
8772935765
bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)
(cherry picked from commit 34bbc87b2d)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-09 08:35:33 -07:00
Miss Islington (bot)
6846d6712a
bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796) (GH-28816)
Prevent use-after-free of running loop holder via cache.
(cherry picked from commit 392a898353)

Co-authored-by: Matthias Reichl <github@hias.horus.com>
2021-10-08 10:55:41 +02:00
Miss Islington (bot)
5afc5bb45d
[3.10] Fix typos in the Modules directory (GH-28761) (GH-28781)
(cherry picked from commit dd02a696e5)


Co-authored-by: Christian Clauss <cclauss@me.com>

Automerge-Triggered-By: GH:gpshead
2021-10-07 01:55:18 -07:00
Miss Islington (bot)
d0d29655ff
bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) (GH-28738)
Automerge-Triggered-By: GH:encukou
(cherry picked from commit b9bb74871b)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2021-10-05 18:34:59 +02:00
Serhiy Storchaka
93242d7a2a
[3.10] Remove trailing spaces (GH-28709) 2021-10-03 20:03:49 +03:00
Miss Islington (bot)
22cf6a2f23
bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)
(cherry picked from commit 0742abdc48)

Co-authored-by: TAGAMI Yukihiro <tagami.yukihiro@gmail.com>
2021-10-02 06:21:55 -07:00
Miss Islington (bot)
2221207f44
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
(cherry picked from commit a450398933)

Co-authored-by: AngstyDuck <solsticedante@gmail.com>
2021-10-01 13:30:15 -07:00
Miss Islington (bot)
282992b36f
bpo-45332: Fix broken Decimal test and benchmark (GH-28680)
(cherry picked from commit 9eed75fde2)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-01 07:16:37 -07:00
Miss Islington (bot)
b994feeca7
hashlib: Fix old message about unicode objects. (GH-28653)
(cherry picked from commit 9ce0f48e91)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-01 05:58:37 -07:00
Miss Islington (bot)
80285ecc8d
closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394) (GH-28636)
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit 196998e220)

Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
2021-09-30 01:02:11 +02:00
Miss Islington (bot)
fd52afd192
bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595)
(cherry picked from commit 84975146a7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-28 05:56:52 -07:00
Łukasz Langa
8c1e1da565
[3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8f943ca257)

Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
2021-09-22 01:33:59 +02:00
Miss Islington (bot)
62c74f34e7
bpo-45228: Fix stack buffer overflow in parsing J1939 address (GH-28404)
(cherry picked from commit 773319545b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-17 02:09:29 -07:00
Erlend Egeberg Aasland
aa6dd54d43
[3.10] bpo-45126: Fix ref. leak in sqlite3.Connection.__init__ (GH-28231). (GH-28298) 2021-09-13 12:16:01 +09:00
Miss Islington (bot)
b86437bb15
bpo-45067 - Verify the version of ncurses for extended color support feature usage. (GH-28260)
* issue45067 - Fix _curses compilation in CentOS 7. Verify the version of ncurses
for extended color support feature usage.

The function extended_color_content was introduced in 2017.  The ncurses-devel
package in CentOS 7 had a older version ncurses resulted in compilation error.
For compiling ncurses with extended color support, we verify the version of the
ncurses library.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 794430700d)

Co-authored-by: Senthil Kumaran <senthil@python.org>
2021-09-09 12:38:54 -07:00
Miss Islington (bot)
23c46778d6
bpo-44219: Release the GIL during isatty syscalls (GH-28250) (GH-28255)
Release the GIL while performing isatty() system calls on arbitrary
file descriptors. In particular, this affects os.isatty(),
os.device_encoding() and io.TextIOWrapper. By extension,
io.open() in text mode is also affected.
(cherry picked from commit 06148b1870)

Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
2021-09-09 18:35:43 +02:00
Miss Islington (bot)
a272ffef33
Remove documentation for non-existing socket class attributes (GH-28029)
The functions in question are available on the module-level only.
(cherry picked from commit 34d82ce7cb)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2021-09-07 11:46:34 -07:00
Miss Islington (bot)
e5f259e575
Fix typo in a comment in Modules/_ssl.c: s/validata/validate/ (GH-27993) (GH-27997)
(cherry picked from commit 28db1f61f2)
2021-09-06 17:35:07 -04:00
Serhiy Storchaka
e2b2930413
[3.10] bpo-45060: Get rid of few uses of the equality operators with None (GH-28087). (GH-28092)
(cherry picked from commit 3c65457156)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-03 21:13:00 -04:00
Miss Islington (bot)
41c87c4176
bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries when built on older macOS systems (GH-27251)
Previously, when built on older macOS systems, `find_library` was not able to find macOS system libraries when running on Big Sur due to changes in how system libraries are stored.
(cherry picked from commit 71853a7302)

Co-authored-by: Tobias Bergkvist <tobias@bergkv.ist>
2021-08-30 02:09:34 -07:00
Miss Islington (bot)
270678564c
bpo-44394: Update libexpat copy to 2.4.1 (GH-26945)
Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to get the
fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This copy
is most used on Windows and macOS.

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

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-08-29 07:32:50 -07:00
Erlend Egeberg Aasland
2a80893e5c
[3.10] bpo-27334: roll back transaction if sqlite3 context manager fails to commit (GH-26202) (GH-27943) 2021-08-28 19:26:00 +01:00
Miss Islington (bot)
6ff7fefc91
bpo-44984: Rewrite test_null_strings in _testcapi (GH-27904)
Test also PyObject_Repr(NULL) and PyObject_Bytes(NULL).
(cherry picked from commit 4d68917386)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-23 12:30:21 -07:00
Miss Islington (bot)
2b1e713f87
bpo-44822: Don't truncate strs with embedded NULL chars returned by sqlite3 UDF callbacks (GH-27588)
(cherry picked from commit 8f010dc920)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-08-06 10:59:51 -07:00
Miss Islington (bot)
f7f1c26423
Update URLs in comments and metadata to use HTTPS (GH-27458) (GH-27478)
(cherry picked from commit be42c06bb0)

Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
2021-07-30 16:25:28 +02:00
Erlend Egeberg Aasland
0cb470e622
[3.10] bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431). (GH-27472)
(cherry picked from commit 7e311e496b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-07-30 14:01:22 +02:00
Miss Islington (bot)
bccb7b9509
bpo-40263: Fixes an off-by-one error in _winapi_WaitForMultipleObjects_impl (GH-19501)
(cherry picked from commit 92b5dc780d)

Co-authored-by: Ray Donnelly <mingw.android@gmail.com>
2021-07-28 13:18:01 -07:00
Miss Islington (bot)
6fc1efa454
bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) (GH-27380)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 11749e2dc2)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-27 00:34:32 +02:00
Miss Islington (bot)
5ec275758d
bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271) (GH-27308)
(cherry picked from commit 83d1430ee5)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-23 16:25:54 +01:00
Miss Islington (bot)
632e8a6959
bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306)
* Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG

    The field is always present in the type struct, as explained
    in the added comment.

* Remove Py_TPFLAGS_HAVE_AM_SEND

    The flag is not needed, and since it was added in 3.10 it can be removed now.
(cherry picked from commit a4760cc32d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-07-23 16:56:53 +02:00
Miss Islington (bot)
ff7af2203c
bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)
(cherry picked from commit d59d7374a3)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
2021-07-14 16:15:31 -07:00
Erlend Egeberg Aasland
02e4c0cad3
[3.10] Fix docstring typo in sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147) (GH-27151)
Both `executescript` methods contain the same docstring typo:
_"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-07-15 00:02:01 +01:00
Miss Islington (bot)
7e1d6308a3
bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)
if it is called with a sequence or set, but not list or tuple.
(cherry picked from commit f572cbf1fa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-13 22:40:10 -07:00
Miss Islington (bot)
bb260c2a21
[3.10] bpo-44630: Fix assertion errors in csv module (GH-27127) (GH-27129)
Fix incorrect handling of exceptions when interpreting dialect objects in
the csv module. Not clearing exceptions between calls to
PyObject_GetAttrString() causes assertion failures in pydebug mode (or with
assertions enabled).

Add a minimal test that would've caught this (passing None as dialect, or
any object that isn't a csv.Dialect subclass, which the csv module allows
and caters to, even though it is not documented.) In pydebug mode, the test
triggers the assertion failure in the old code.

Contributed-By: T. Wouters [Google]
(cherry picked from commit 0093876328)


Co-authored-by: T. Wouters <thomas@python.org>

Automerge-Triggered-By: GH:gpshead
2021-07-13 16:18:28 -07:00
Miss Islington (bot)
42da46ed52
bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)
This reverts commit 0d7ad9fb38 as it has a regression.

See https://github.com/python/cpython/pull/19850GH-issuecomment-869410686
(cherry picked from commit e14d5ae544)

Co-authored-by: Filipe Laíns <lains@archlinux.org>
2021-07-11 10:47:06 -07:00
Miss Islington (bot)
08697ac5d1
bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator (GH-27059)
(cherry picked from commit bbf2fb6c7a)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-07-08 09:13:06 -07:00
Miss Islington (bot)
9f431dd0a5
bpo-44558: Match countOf is/== treatment to c (GH-27007)
(cherry picked from commit 6bd3ecfc27)

Co-authored-by: Rupert Tombs <rupert.tombs@gmail.com>
2021-07-07 06:50:41 -07:00
Miss Islington (bot)
645e527298
bpo-44563: Fix error handling in tee.fromiterable() (GH-27020) (GH-27041)
In debug build failed tee.fromiterable() corrupted the linked list of all GC objects.
(cherry picked from commit f64de53ff0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-05 23:34:53 +01:00
Miss Islington (bot)
22bcc0768e
bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)
* zlib uses an UINT32_MAX sliding window for the output buffer

These funtions have an initial output buffer size parameter:
- zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
- zlib.Decompress.flush([length])

If the initial size > UINT32_MAX, use an UINT32_MAX sliding window, instead of clamping to UINT32_MAX.
Speed up when (the initial size == the actual size).

This fixes a memory consumption and copying performance regression in earlier 3.10 beta releases if someone used an output buffer larger than 4GiB with zlib.decompress.

Reviewed-by: Gregory P. Smith
(cherry picked from commit a9a69bb3ea)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2021-07-04 18:32:56 -07:00
Miss Islington (bot)
88970125e7
bpo-43977: Properly update the tp_flags of existing subclasses when their parents are registered (GH-26864)
(cherry picked from commit ca2009d72a)

Co-authored-by: Brandt Bucher <brandt@python.org>
2021-06-25 08:46:23 -07:00
Miss Islington (bot)
88a3342314
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
It defaults to None and is positional only.
(cherry picked from commit d1ae57027f)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-06-23 10:58:20 -04:00