Commit graph

11900 commits

Author SHA1 Message Date
Miss Islington (bot)
dae09c2b81
[3.9] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (GH-32140) (GH-32156)
Add missing terminated NUL in sockaddr_un's length

- Linux: https://man7.org/linux/man-pages/man7/unix.7.html
- *BSD: SUN_LEN
(cherry picked from commit f6b3a07b7d)

Co-authored-by: ty <zonyitoo@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 5944807b09)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
2022-03-28 13:03:18 -07:00
Miss Islington (bot)
ec3589f59d
bpo-47101: list only activated algorithms in hashlib.algorithms_available (GH-32076)
(cherry picked from commit 48e2010d92)

Co-authored-by: Christian Heimes <christian@python.org>
2022-03-23 13:58:02 -07:00
Miss Islington (bot)
f89949ec67
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
(cherry picked from commit 08eb754d84)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-03-21 04:28:31 -07:00
Gregory P. Smith
58a7e13037
bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013) (GH-32015)
Inputs >= 4GiB to `binascii.crc32(...)` when compiled to use the zlib
crc32 implementation (the norm on POSIX) no longer return the wrong
result.

(cherry picked from commit 4c989e19c8)
2022-03-20 23:34:45 -07:00
Pablo Galindo Salgado
a12ef81231
[3.9] bpo-46968: Check for 'sys/auxv.h' in the configure script (GH-31961). (GH-31975)
(cherry picked from commit 8e3fde728f)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-03-18 13:33:03 +00:00
Jelle Zijlstra
49ff5eddfe
[3.9] sqlite3: normalise pre-acronym determiners (GH-31772) (GH-31807)
For consistency, replace "a SQL" with "an SQL"..
(cherry picked from commit 2d5835a019)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-03-11 17:10:39 -08:00
Victor Stinner
ba2b7956fa
bpo-46968: Fix faulthandler for Sapphire Rapids Xeon (GH-31789) (GH-31831)
In Linux kernel 5.14 one can dynamically request size of altstacksize
based on hardware capabilities with getauxval(AT_MINSIGSTKSZ).

This changes allows for Python extension's request to Linux kernel
to use AMX_TILE instruction set on Sapphire Rapids Xeon processor
to succeed, unblocking use of the ISA in frameworks.

Introduced HAVE_LINUX_AUXVEC_H in configure.ac and pyconfig.h.in
Used cpython_autoconf:269 docker container to generate configure.

(cherry picked from commit 3b128c0548)

Co-authored-by: Oleksandr Pavlyk <oleksandr.pavlyk@intel.com>
2022-03-12 00:37:16 +01:00
Jelle Zijlstra
0c47008f8b
[3.9] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31778)
Replace two instances of "pysqlite" with "sqlite3" in sqlite3
docstrings. Also reword "is a no-op" to "does nothing" for clarity..
(cherry picked from commit b33a1ae703)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-03-09 10:19:53 -08:00
Erlend Egeberg Aasland
653ca6c62b
[3.9] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) (GH-31754)
(cherry picked from commit 4d95fa1ac5)
2022-03-08 07:31:06 -08:00
Miss Islington (bot)
f46a044691
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)
(cherry picked from commit 176835c3d5)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-03-07 14:18:24 -08:00
Miss Islington (bot)
01df048831
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
(cherry picked from commit cedd2473a9)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-03-04 10:34:14 -08:00
Victor Stinner
6a14330318
bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675) (GH-31676)
* bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662)

Disable undefined behavior sanitizer (UBSAN) on
faulthandler_sigfpe().

(cherry picked from commit 4173d677a1)

* bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672)

Disable undefined behavior sanitizer (UBSan) on
faulthandler._read_null().

(cherry picked from commit 65b92ccdec)

* bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673)

If Python is built with UBSan, test_hashlib skips tests on the _sha3
extension which currently has undefined behaviors.

This change allows to run test_hashlib to check for new UBSan regression,
but the known _sha3 undefined behavior must be fixed.

(cherry picked from commit 6d0d7d2b8c)

* bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674)

If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.

(cherry picked from commit ad1b04451d)
(cherry picked from commit 7b5b429ada)
2022-03-04 01:31:54 +01:00
Erlend Egeberg Aasland
3ea2a8f425
[3.9] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030) (GH-31586)
(cherry picked from commit 3eb3b4f270)
2022-03-01 20:46:16 -08:00
Miss Islington (bot)
87cebb1e69
bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487)
(cherry picked from commit 1935e1cc28)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-02-22 18:50:57 -08:00
Miss Islington (bot)
9aca412db8
bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397)
The libexpat 2.4.1 upgrade from  introduced the following new exported symbols:

* `testingAccountingGetCountBytesDirect`
* `testingAccountingGetCountBytesIndirect`
* `unsignedCharToPrintable`
* `XML_SetBillionLaughsAttackProtectionActivationThreshold`
* `XML_SetBillionLaughsAttackProtectionMaximumAmplification`

We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h)

(The newer libexpat upgrade  has no new symbols).

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 6312c1052c)

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
2022-02-18 15:13:16 -08:00
Miss Islington (bot)
e7828904f3
bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31295) 2022-02-18 06:58:26 +09:00
DongGeon Lee
ad47db34be
[3.9] bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293). (GH-31356) 2022-02-15 21:22:01 +09:00
Jacob Walls
cc6d8f8828
[3.9] bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152) (GH-31299)
Both implementations accept target=None now.

(cherry picked from commit 168fd6453b)
2022-02-13 02:16:31 +02:00
Miss Islington (bot)
0892a0e3ec
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
va_end() must be called before returning.
(cherry picked from commit 59e004af63)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-02-07 00:08:10 -08:00
Christian Heimes
04772cd6f1
[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30915)
Co-authored-by: Christian Heimes <christian@python.org>
2022-01-26 12:20:39 +01:00
Kumar Aditya
6ed874f8c5
[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (GH-30785)
Automerge-Triggered-By: GH:asvetlov
2022-01-22 04:52:24 -08:00
Kumar Aditya
3e7d06a1fa
[3.9] bpo-46383: Fix signature of zoneinfo module_free function (GH-3… (GH-30611)
…0607)
2022-01-22 03:05:55 -08:00
Tal Einat
656971e495
[3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)
(cherry picked from commit 27df7566bc)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
2022-01-21 11:37:39 +02:00
Miss Islington (bot)
ae6e255cb3
bpo-46280: Fix tracemalloc_copy_domain() (GH-30591)
Test if tracemalloc_copy_traces() failed to allocated memory in
tracemalloc_copy_domain().
(cherry picked from commit 7c770d3350)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-13 20:35:21 -08:00
Miss Islington (bot)
537f16adfa
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
(cherry picked from commit 276c234ce0)

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-13 13:19:50 -08:00
Victor Stinner
52937c26ad
bpo-46070: _PyGC_Fini() untracks objects (GH-30577) (GH-30580)
Py_EndInterpreter() now explicitly untracks all objects currently
tracked by the GC. Previously, if an object was used later by another
interpreter, calling PyObject_GC_UnTrack() on the object crashed if
the previous or the next object of the PyGC_Head structure became a
dangling pointer.

(cherry picked from commit 1a4d1c1c9b)
2022-01-13 20:12:50 +01:00
Christian Heimes
4ddd5da269
[3.9] bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455) (GH-30574)
Co-authored-by: Christian Heimes <christian@python.org>
2022-01-13 11:20:45 +01:00
Miss Islington (bot)
4d2cfd3549
bpo-46070: Fix asyncio initialisation guard (GH-30423)
If init flag is set, exit successfully immediately.
If not, only set the flag after successful initialization.
(cherry picked from commit b127e70a8a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-01-07 06:36:07 -08:00
Miss Islington (bot)
5f622f1d5c
bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29759)
(cherry picked from commit abfc794bbf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-12-11 01:03:15 +01:00
Miss Islington (bot)
040f9f9c48
bpo-46000: Improve NetBSD curses compatibility (GH-29947) (GH-30023)
(cherry picked from commit 2fb797e93c)

Co-authored-by: Thomas Klausner <tk@giga.or.at>
2021-12-10 13:21:19 +02:00
Miss Islington (bot)
5ae4265b8c
bpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997)
(cherry picked from commit 3363e1cb05)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-12-09 10:55:53 -08:00
Miss Islington (bot)
52a9a71fe6
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
Getting an attribute via attrib.get() simultaneously with replacing
the attrib dict can lead to access to deallocated dict.
(cherry picked from commit d15cdb2f32)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-05 11:04:59 -08:00
Ma Lin
86c1265cdc
[3.9] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29588)
* Fix thread lock in zlib.Decompress.flush() may go wrong
Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.

backport of https://github.com/python/cpython/pull/29587 to 3.9/3.8.
2021-11-26 16:21:22 -08:00
Christian Heimes
71b414750e
[3.9] bpo-41498: Fix build on platforms without sigset_t (GH-29770) (GH-29774)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-25 13:02:54 +01:00
Pablo Galindo Salgado
0ef308a289
bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) (GH-29585)
(cherry picked from commit da20d7401d)
2021-11-18 00:18:16 +01:00
Miss Islington (bot)
6b0ea06ea8
remove the repeat 'the' (GH-29455)
(cherry picked from commit 122ca4d73f)

Co-authored-by: 180909 <734461790@qq.com>
2021-11-08 00:45:06 -08:00
Łukasz Langa
ed807bf333
[3.9] bpo-45581: Raise MemoryError in sqlite3.connect if SQLite signals memory error (GH-29171) (GH-29324)
(cherry picked from commit e2e62b3808)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-10-29 23:02:19 +02:00
Miss Islington (bot)
269bf56e3d
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:29:52 -07:00
Miss Islington (bot)
1249ce7c6c
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:45:06 -07:00
Serhiy Storchaka
6848602806
bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28953)
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)
2021-10-14 21:23:52 +03:00
Serhiy Storchaka
7c722e32bf
[3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28945)
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:03:29 +03:00
Miss Islington (bot)
38fadbc5b9
no-issue: Make silence about warning '_POSIX_C_SOURCE redefined' (GH-28948)
(cherry picked from commit d413c50363)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-14 09:36:19 -07:00
Dong-hee Na
e4fcb6fd3d
[3.9] bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832) (GH-28835) 2021-10-10 01:13:44 +09:00
Miss Islington (bot)
6f3bc5eee6
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:30:54 -07:00
Miss Islington (bot)
87f0156a22
bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796)
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-07 16:14:04 -07:00
Christian Clauss
8f762349a2
[3.9] Fix typos in the Modules directory (GH-28761). (GH-28791)
(cherry picked from commit dd02a696e5)

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

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 06:17:05 -07:00
Łukasz Langa
52d9d3b754
[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) (GH-28741)
(cherry picked from commit b9bb74871b)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2021-10-05 22:30:25 +02:00
Serhiy Storchaka
e9ce081ec7
[3.9] Remove trailing spaces (GH-28710) 2021-10-03 20:04:38 +03:00
Miss Islington (bot)
6035d650a3
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
Co-authored-by: AngstyDuck <solsticedante@gmail.com>
2021-10-01 21:46:25 +01:00
Miss Islington (bot)
8822526caa
[3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679)
(cherry picked from commit 9ce0f48e91)


Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-01 06:28:19 -07:00