Commit graph

12309 commits

Author SHA1 Message Date
Serhiy Storchaka
62ddbbcfaf
[3.10] gh-91583: AC: Fix regression for functions with defining_class (GH-91739) (GH-92079)
Argument Clinic now generates the same efficient code as before
adding the defining_class parameter.
(cherry picked from commit a055dac0b4)
2022-05-03 11:53:46 +03:00
Erlend Egeberg Aasland
178d79ae67
[3.10] gh-89301: Fix regression with bound values in traced SQLite statements (#92147)
(cherry picked from commit 721aa96540)
2022-05-02 10:21:13 -06:00
Gregory P. Smith
ea1eba03e7
[3.10] gh-91401: Conservative backport of subprocess._USE_VFORK (#91932)
This does not alter the `_posixsubprocess.fork_exec()` private API to
avoid issues for anyone relying on that (bad idea) or for anyone who's
`subprocess.py` and `_posixsubprocess.so` upgrades may not become
visible to existing Python 3.10 processes at the same time.

Backports the concept of cd5726fe67.

Provides a fail-safe way to disable vfork for #91401.

I didn't backport the documentation as I don't actually expect this to be used and `.. versionadded: 3.10.5` always looks weird in docs. It's being done more to have a fail-safe in place for people just in case.
2022-05-01 16:09:50 -07:00
Miss Islington (bot)
923ef87c77
gh-91734: Fix ossaudio support on Solaris (GH-91735)
(cherry picked from commit 4420faf273)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2022-04-20 04:06:29 -07:00
Oleg Iarygin
e7e8a9fa4f
[3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a573cb2fec)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-04-19 13:01:09 -07:00
Miss Islington (bot)
9ed179b07d
bpo-47151: Fallback to fork when vfork fails in subprocess. (GH-32186)
bpo-47151: Fallback to fork when vfork fails in subprocess. An OS kernel can specifically decide to disallow vfork() in a process. No need for that to prevent us from launching subprocesses.
(cherry picked from commit 4a08c4c469)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-03-31 14:09:50 -07:00
Miss Islington (bot)
5944807b09
[3.10] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (GH-32140)
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
2022-03-28 11:26:49 -07:00
Christian Heimes
1b6acaad9a
[3.10] bpo-47101: list only activated algorithms in hashlib.algorithms_available (GH-32076) (GH-32085)
Co-authored-by: Christian Heimes <christian@python.org>
2022-03-23 22:15:25 +01:00
Miss Islington (bot)
1b21b55ee0
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:30:58 -07:00
Gregory P. Smith
4c989e19c8
[3.10] bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013)
Inputs >= 4GiB to `binascii.crc32(...)` when compiled to use the zlib
crc32 implementation (the norm on POSIX) no longer return the wrong
result.
2022-03-20 14:46:52 -07:00
Pablo Galindo Salgado
6fd9737373
[3.10] bpo-46968: Check for 'sys/auxv.h' in the configure script (GH-31961). (GH-31974)
(cherry picked from commit 8e3fde728f)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-03-18 13:33:11 +00:00
Jelle Zijlstra
d8ba5c102c
[3.10] sqlite3: normalise pre-acronym determiners (GH-31772) (GH-31806)
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:55 -08:00
Victor Stinner
393e2bf6bc
bpo-46968: Fix faulthandler for Sapphire Rapids Xeon (GH-31789) (GH-31830)
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:04:14 +01:00
Jelle Zijlstra
5dfe981791
[3.10] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31777)
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:27 -08:00
Miss Islington (bot)
95b001fe67
bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)
(cherry picked from commit c8a47e76a3)

Co-authored-by: Christian Heimes <christian@python.org>
2022-03-08 10:53:24 -08:00
Erlend Egeberg Aasland
f3d3b2d5c5
[3.10] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) (GH-31753)
(cherry picked from commit 4d95fa1ac5)
2022-03-08 07:30:14 -08:00
Miss Islington (bot)
1e52e782f9
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:17:29 -08:00
Miss Islington (bot)
bdce188036
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:33:57 -08:00
Victor Stinner
7b5b429ada
[3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675)
* 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)
2022-03-04 01:12:06 +01:00
Miss Islington (bot)
4955a9ed14
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:38 -08:00
Miss Islington (bot)
633d0f90f9
bpo-46232: Fix parsing of certs with bit string in DN (GH-30351)
(cherry picked from commit be095f6c32)

Co-authored-by: Christian Heimes <christian@python.org>
2022-02-21 01:37:26 -08:00
Erlend Egeberg Aasland
ba457fe6f8
[3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)
* [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642).
(cherry picked from commit 3eb3b4f270)

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

* Fix test_func_return_too_large_int

GH-27613 (bpo 44839) was not backported, so exceptions differ between
main (3.11) and older versions.
2022-02-20 16:13:04 -08:00
Gregory P. Smith
e05e3d20d3
[3.10] bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397) (GH-31420)
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>

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
2022-02-18 16:53:49 -08:00
Dong-hee Na
cb7551d566
bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31296)
Co-authored-by: Cyril Jouve <jv.cyril@gmail.com>
2022-02-18 06:58:02 +09:00
DongGeon Lee
ac55cea3cb
[3.10] bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293) (GH-31350) 2022-02-15 19:24:04 +09:00
Miss Islington (bot)
b7a65c939c
bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152)
Both implementations accept target=None now.
(cherry picked from commit 168fd6453b)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2022-02-12 00:50:11 -08:00
Petr Viktorin
8b8673fe94
[3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) (GH-31262)
(cherry picked from commit 0ef0853012)
2022-02-11 12:25:25 +01:00
Miss Islington (bot)
3ceff9968b
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:05:29 -08:00
Christian Heimes
4371fbd432
[3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30914)
Co-authored-by: Christian Heimes <christian@python.org>
2022-01-26 12:20:31 +01:00
Miss Islington (bot)
90e2998db7
[3.10] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (#30784)
* bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777)

* bpo-46469: Make asyncio generic classes return GenericAlias

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Library/2022-01-22-05-05-08.bpo-46469.plUab5.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ea5b96842e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>

* Fix tests

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-01-22 14:28:51 +02:00
Tal Einat
f6e5972fa9
[3.10] 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:02:25 +02:00
Miss Islington (bot)
7a822c9278
bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) (GH-30610)
(cherry picked from commit cfbde65df3)

Co-authored-by: Christian Heimes <christian@python.org>

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-17 14:47:51 +01:00
Miss Islington (bot)
86d18019e9
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:32:40 -08:00
Miss Islington (bot)
47422a852d
[3.10] bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584) (GH-30585)
(cherry picked from commit 276c234ce0)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
2022-01-13 13:08:47 -08:00
Miss Islington (bot)
e6bb17fe29
bpo-46070: _PyGC_Fini() untracks objects (GH-30577)
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)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-13 10:50:09 -08:00
Miss Islington (bot)
3ce6945f5f
Define Py_BUILD_CORE_MODULE 2022-01-13 01:42:47 -08:00
Miss Islington (bot)
9d18045804
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:35:15 -08:00
Miss Islington (bot)
e1e3f648ad
bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29758)
(cherry picked from commit abfc794bbf)

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

Co-authored-by: Thomas Klausner <tk@giga.or.at>
2021-12-10 02:29:23 -08:00
Miss Islington (bot)
ca08655b80
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 11:37:06 -08:00
Miss Islington (bot)
934a24c641
bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) (GH-30005)
(cherry picked from commit f0d290d25c)

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

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-12-09 15:16:09 +00:00
Miss Islington (bot)
beb834292d
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:52 -08:00
Miss Islington (bot)
57100c86ba
[3.10] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29587) (GH-29811)
* Fix thread lock in zlib.Decompress.flush() may go wrong

Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.
(cherry picked from commit 7edb6270a7)


Co-authored-by: Ma Lin <animalize@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
2021-11-26 16:42:00 -08:00
Miss Islington (bot)
632d589afc
[3.10] bpo-41498: Fix build on platforms without sigset_t (GH-29770) (GH-29773)
(cherry picked from commit dc19e86983)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
2021-11-25 03:53:07 -08:00
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