Commit graph

26974 commits

Author SHA1 Message Date
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)
d9101c4e49
bpo-46345: Add a test case for implicit Optional class attribute (GH-30535)
(cherry picked from commit 1de60155d5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-12 17:46:35 -08:00
Miss Islington (bot)
690ed889c5
bpo-46205: exit if no workers are alive in runtest_mp (GH-30470)
(cherry picked from commit e13cdca0f5)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2022-01-10 19:32:15 -08:00
Miss Islington (bot)
566d70a8d1
bpo-46299: improve test_descr.py with stricter error handling (GH-30471)
(cherry picked from commit e63066cfed)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-07 21:26:11 -08:00
Miss Islington (bot)
b98730c516
bpo-46263: Fix second location that needs MALLOC_CONF on FreeBSD (GH-30440)
Automerge-Triggered-By: GH:tiran
(cherry picked from commit c9137d4b63)

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-06 12:15:55 -08:00
Miss Islington (bot)
b259015c10
[3.9] bpo-46263: FreeBSD 14.0 jemalloc workaround for junk bytes of freed memory (GH-30434) (GH-30437)
Co-authored-by: Christian Heimes <christian@python.org>
2022-01-06 16:52:21 +01:00
Miss Islington (bot)
9a9061d1ca
bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)
* bpo-20369: concurrent.futures.wait() now deduplicates futures given as arg.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 7d7817cf0f)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-01-04 06:27:26 -08:00
Miss Islington (bot)
25a12aac4d
[3.9] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) (GH-30255)
The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).

(cherry picked from commit 078abb676c)
(cherry picked from commit 03c7449fbc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-26 14:23:23 +02:00
Miss Islington (bot)
07229054a1
[3.9] bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) (GH-30265)
(cherry picked from commit a23ab7b6d8)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-12-26 13:54:18 +02:00
Miss Islington (bot)
d718764f38
bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240)
Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
(cherry picked from commit b8de8b7039)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-12-24 00:32:27 -08:00
Miss Islington (bot)
97a015b7b0
Allow test_pathlib to pass on systems where fakeuser exists. (GH-30244)
(cherry picked from commit d8880677a7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-12-24 00:07:41 -08:00
Pablo Galindo Salgado
e5cf31d3c2
[3.9] bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177) (#30215)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf153)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-12-20 17:18:13 +00:00
Andrew Svetlov
2352644377
Fix test error about deprecation warning (#30205) 2021-12-19 20:12:24 +02:00
Andrew Svetlov
f8fce5e4e4
[3.9] bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase (GH-30198) (GH-30204)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd8951)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-12-19 18:59:37 +02:00
Miss Islington (bot)
a328ad7f9a
bpo-46099: Fix pthread_getcpuclockid test on Solaris (GH-30140) (#30184)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 427a490c49)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-12-18 17:51:34 +02:00
Christian Heimes
a9b3edb66f
[3.9] bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) (GH-30173)
Co-authored-by: Christian Heimes <christian@python.org>
2021-12-17 17:02:38 +01:00
Miss Islington (bot)
212014d8c4
Fix a typo in the message from make_ssl_certs. (GH-30152)
The file is utils.py not util.py.

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 69ef1b5998)

Co-authored-by: Yilei "Dolee" Yang <yileiyang9@gmail.com>
2021-12-16 21:49:37 -08:00
Jason R. Coombs
864ec170e1
[3.9] bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151). (GH-30157)
(cherry picked from commit 109d966021)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-12-16 19:58:19 -05:00
Miss Islington (bot)
f0b274d2e2
bpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099) (GH-30115)
(cherry picked from commit 86de99588d)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-12-15 12:24:48 +00:00
Miss Islington (bot)
17260e44b5
[3.9] bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) (GH-30105) 2021-12-14 17:27:22 +00:00
Miss Islington (bot)
94234228ab
[3.9] bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093) (GH-30095) 2021-12-14 01:19:50 +00:00
Miss Islington (bot)
80f98b1614
[3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080)
Functions signal(), getsignal(), pthread_sigmask(), sigpending(),
sigwait() and valid_signals() were omitted.

If __all__ is not defined all non-builtin functions should have
correct __module__.
(cherry picked from commit e08c0d8eec)
(cherry picked from commit e55deaabd8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-13 02:43:13 -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)
fb8aad1640
[3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) (GH-29924)
For example, InitVar[list[int]].
(cherry picked from commit 1fd4de5bdd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-10 11:42:49 +02:00
Miss Islington (bot)
bffce2cbb5
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) (GH-29928)
(cherry picked from commit 2b318ce1c9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-07 14:00:06 +02:00
Miss Islington (bot)
19050711f5
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294)
(cherry picked from commit 446be16686)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-05 13:25:43 -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
Miss Islington (bot)
99a9b34331
bpo-37658: Actually return result in race condition (GH-29202) (GH-29832)
(cherry picked from commit 934a826237)

Co-authored-by: Sam Bull <aa6bs0@sambull.org>

Co-authored-by: Sam Bull <aa6bs0@sambull.org>
2021-11-30 15:39:13 +02:00
Irit Katriel
5b6aa6ce20
bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29827)
(cherry picked from commit 4dfae6f38e)
2021-11-29 10:11:48 +00:00
Miss Islington (bot)
209cec8a2a
[3.9] bpo-19460: Add test for MIMENonMultipart (GH-29817) (#29819)
* bpo-19460: Add test for MIMENonMultipart (GH-29817)
(cherry picked from commit 46c8d91571)

Co-authored-by: 180909 <wjh180909@gmail.com>

* Update 2021-11-28-15-25-02.bpo-19460.lr0aWs.rst

Co-authored-by: 180909 <wjh180909@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-11-28 16:33:50 +02:00
Miss Islington (bot)
455ed45d7c
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29709) 2021-11-22 10:36:28 -06:00
Sam Gross
2a32dbf110
[3.9] bpo-45838: Fix incorrect line numbers in Tools/gdb/libpython.py (GH-29628)
The line number calculation in libpython.py did not properly handle
negative (signed) line table deltas.
2021-11-19 19:53:46 +01:00
Mark Shannon
4296396db0
[3.9] bpo-45806: Fix recovery from stack overflow for 3.9. Again. (GH-29640)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-19 19:51:50 +01:00
Miss Islington (bot)
9450c751cc
bpo-45835: Fix race condition in test_queue (GH-29601)
Some of the tests in test_queue had a race condition in which a
non-sentinel value could be enqueued after the final sentinel value
leading to not all the inputs being processed (and test failures).

This changes feed() to enqueue a sentinel once the inputs are exhausted,
which guarantees that the final queued object is a sentinel. This
requires the number of feeder threads to match the number of consumer
threads, but that's already the case in the relevant tests.
(cherry picked from commit df3e53d86b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2021-11-18 08:16:06 -08: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
Sam Gross
87787c8774
[3.9] bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) (GH-29600)
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 23:53:33 +01:00
Pablo Galindo Salgado
142fcb40b6
bpo-45738: Fix computation of error location for invalid continuation characters in the parser (GH-29550) (GH-29552)
(cherry picked from commit 25835c518a)
2021-11-14 01:47:27 +00:00
Miss Islington (bot)
587ff7f50b
bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525) (GH-29531) 2021-11-12 12:44:25 -06:00
Miss Islington (bot)
a932631890
bpo-45644: Make json.tool read infile before writing to outfile (GH-29273) (GH-29446)
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:44 +01:00
Łukasz Langa
f701237db2
[3.9] bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258) (GH-29415)
(cherry picked from commit d56375a0dd)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-11-04 21:52:26 +01:00
Miss Islington (bot)
1e29dce113
bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048) (GH-29178)
* Use Py_EnterRecursiveCall() in issubclass()

Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
(cherry picked from commit 423fa1c181)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-11-04 21:20:21 +01:00
Alex Waygood
effb72fa0f
[3.9] bpo-45678: Fix singledispatchmethod classmethod/staticmethod bug (GH-29394)
This PR fixes a bug in the 3.9 branch where
``functools.singledispatchmethod`` did not properly wrap attributes such as
``__name__``, ``__doc__`` and ``__module__`` of the target method. It also
backports tests already merged into the 3.11 and 3.10 branches in #29328 and
#29390.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-04 20:34:14 +01:00
Łukasz Langa
8198617bcc
[3.9] bpo-45578: add tests for dis.distb (GH-29332) (#29386)
(cherry picked from commit e346f19681)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-11-03 17:47:04 +01:00
Serhiy Storchaka
bbcf06bf95
[3.9] bpo-45679: Fix caching of multi-value typing.Literal (GH-29334) (GH-29342)
Literal[True, 2] is no longer equal to Literal[1, 2]..
(cherry picked from commit 634984d7db)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-11-03 17:28:55 +08:00
Miss Islington (bot)
5f527caf15
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:26:40 -07:00
Serhiy Storchaka
a043706f90
[3.9] [3.10] bpo-45502: Fix test_shelve (GH-29003) (GH-29305) (GH-29306)
Run test_shelve with all underlying dbm implementations and pickle protocols.
Also make test_shelve discoverable.
(cherry picked from commit b781cc3bfc).
(cherry picked from commit 6b867022d9)
2021-10-29 13:18:34 +03:00
Miss Islington (bot)
dd674ca96f
bpo-45577: test all pickle protocols in test_zoneinfo (GH-29167) (GH-29295)
(cherry picked from commit 66e6b3dcd3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-10-29 00:00:34 +02:00
Miss Islington (bot)
67a1abb6aa
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233) (GH-29292)
the current test depended on integer sets being iterated on in a certain
fixed order. That order is different on PyPy (insertion based) and could
change in CPython in the future in theory. Make the test robust against
a different iteration order by sorting.
(cherry picked from commit 7401694807)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2021-10-28 23:14:37 +02:00
Alex Waygood
97388c204b
[3.9] bpo-39679: Fix singledispatchmethod classmethod/staticmethod bug (GH-29087)
This commit fixes a bug in the 3.9 branch where stacking
`@functools.singledispatchmethod` on top of `@classmethod` or `@staticmethod`
caused an exception to be raised if the method was registered using
type-annotations rather than `@method.register(int)`. Tests for this scenario
were added to the 3.11 and 3.10 branches in #29034 and #29072; this commit
also backports those tests to the 3.9 branch.

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-28 18:02:04 +02:00
Miss Islington (bot)
8365a5b5ab
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.htmlGH-class-methods.)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit b1302abcc8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-10-28 01:13:45 -07:00