Commit graph

110843 commits

Author SHA1 Message Date
Miss Islington (bot)
305236e03a
bpo-37658: Actually return result in race condition (GH-29202)
(cherry picked from commit 934a826237)

Co-authored-by: Sam Bull <aa6bs0@sambull.org>
2021-11-29 00:37:34 -08:00
Pablo Galindo Salgado
8d1a580064
[3.10] bpo-42268: Fail the configure step if the selected compiler doesn't support memory sanitizer (GH-29806) (GH-29815)
(cherry picked from commit e71c12efcd)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-28 21:23:39 +00:00
Miss Islington (bot)
2c398a5acf
[3.10] bpo-19460: Add test for MIMENonMultipart (GH-29817) (GH-29818)
Co-authored-by: 180909 <wjh180909@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-11-28 12:57:10 +02:00
Christian Heimes
545aebd2ec
[3.10] bpo-45881: Use CC from env first for cross building (GH-29752). (GH-29753)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-27 21:14:05 +01: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)
3dcbe01dc5
bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
(cherry picked from commit 4841e694ee)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-11-26 15:30:39 -08:00
Miss Islington (bot)
fc16ea9c8b
bpo-45866: Fix typo in the NEWS entry (GH-29798)
(cherry picked from commit 9a7611a7c4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-11-26 14:18:54 -08:00
Victor Stinner
b6defde2af
bpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792)
"make regen-all" now produces the same output when run from a
directory other than the source tree: when building Python out of the
source tree.

(cherry picked from commit 253b7a0a9f)
2021-11-26 16:38:50 +01:00
Miss Islington (bot)
3f024e27c2
bpo-44353: Correct docstring for NewType (GH-29785)
The docstring for `typing.NewType` is no longer strictly accurate, now that `NewType` is a class, rather than a function
(cherry picked from commit 93c65df83c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-26 06:58:13 -08:00
Miss Islington (bot)
7842aed7a7
bpo-45619: documentation of execution model: clarify and update binding summary (GH-29232)
This does two changes that are quite related.

0. it add that variable binding can occur in pattern matching, an update of 3.10
which seems to have been omitted from the list of bindings
1. Given how long the sentence already was, with even subcases in the middle of
the sentence, the commit breaks the sentence into an actual list.
(cherry picked from commit cd876c8493)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2021-11-25 21:36:37 -08:00
Christian Heimes
3f565f8edf
[3.10] bpo-33393: Update config.guess and config.sub (GH-29781) (GH-29782)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-25 22:52:02 +01:00
Andrew Svetlov
52d10f6485
[3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779)
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit 4dd82194f4)

Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>

Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>
2021-11-25 19:20:17 +02:00
Victor Stinner
ce5a6460ae
bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29732)
Fix Python.h to build C extensions with Xcode: remove a relative
include from Include/cpython/pystate.h.

(cherry picked from commit 4ae26b9c1d)
2021-11-25 13:35:22 +01: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
c72311d917
[3.10] bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if inside parentheses. (GH-29767)
Backport of GH-29757

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2021-11-25 01:01:40 +00:00
Miss Islington (bot)
cd85d91bc6
bpo-45893: Add missing extern C to initconfig.h (GH-29761)
Co-authored-by: Steve Dower <steve.dower@python.org>
(cherry picked from commit f4afc53bf6)

Co-authored-by: Christian Heimes <christian@python.org>
2021-11-24 13:57:41 -08:00
Miss Islington (bot)
8cabcde8d6
bpo-45693: Document port parameter to loop.create_server (GH-29760) (GH-29762)
Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit d71c7bc733)

Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>

Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>
2021-11-24 15:39:51 -05:00
Miss Islington (bot)
ae065f8362
bpo-45616: Let py.exe distinguish between v3.1 and v3.10 (GH-29731)
(cherry picked from commit f9de97aae5)

Co-authored-by: Zachary Ware <zach@python.org>
2021-11-23 21:02:32 -08:00
Miss Islington (bot)
327c764fa2
bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138)
(cherry picked from commit 457e6a6e96)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2021-11-23 02:32:31 -08:00
Brett Cannon
99aad31b7a
[3.10] bpo-45250: fix docs regarding __iter__ and iterators being inconsistently required by CPython (GH-29170) (GH-29650)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
(cherry picked from commit be36e06340)

Co-authored-by: Brett Cannon <brett@python.org>
2021-11-22 15:09:15 -08:00
Miss Islington (bot)
56b5cd52ab
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29708)
(cherry picked from commit 4fad314246)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2021-11-22 09:05:54 -06:00
Miss Islington (bot)
10343bd983
bpo-44649: Fix dataclasses(slots=True) with a field with a default, but init=False (GH-29692)
Special handling is needed, because for non-slots dataclasses the instance attributes are not set: reading from a field just references the class's attribute of the same name, which contains the default value. But this doesn't work for classes using __slots__: they don't read the class's attribute. So in that case (and that case only), initialize the instance attribute. Handle this for both normal defaults, and for fields using default_factory.
(cherry picked from commit d3062f672c)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2021-11-22 05:47:41 -08:00
Miss Islington (bot)
9e7a2e4920
Fix out-of-tree build support for multissltest (GH-29694)
(cherry picked from commit 512dbf6f56)

Co-authored-by: Christian Heimes <christian@python.org>
2021-11-22 02:14:28 -08:00
Pablo Galindo Salgado
07cf66fd03
[3.10] Ensure the str member of the tokenizer is always initialised (GH-29681). (GH-29683)
(cherry picked from commit 4f006a789a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-21 04:15:22 +00:00
Miss Islington (bot)
9841ac2da5
bpo-45852: Fix the Counter/iter test for statistics.mode() (GH-29667) (GH-29671)
Suggested by Stefan Pochmann.
(cherry picked from commit 48744db70e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-11-20 18:27:44 -06:00
Miss Islington (bot)
cf8c8788c9
Added kw_only parameter to make_dataclasses. (GH-29679)
(cherry picked from commit f7638dd0f9)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2021-11-20 15:46:56 -08:00
Miss Islington (bot)
3528df1258
[3.10] bpo-45845: Change link for pyserial (GH-29675)
(cherry picked from commit 123a3527dd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-11-20 15:51:24 -05:00
Miss Islington (bot)
edabf39046
bpo-45845: Remove unresponsive web link (GH-29651) (GH-29674)
Threading notes by Aahz from OSCON 2001.

(cherry picked from commit 9852339145)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-11-20 13:50:24 -05:00
Miss Islington (bot)
a427eb862f
bpo-45494: Fix error location in EOF tokenizer errors (GH-29108)
(cherry picked from commit 79ff0d1687)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-20 09:59:34 -08:00
Pablo Galindo Salgado
511ee1c0fa
[3.10] bpo-45727: Make the syntax error for missing comma more consistent (GH-29427) (GH-29647)
(cherry picked from commit 546cefcda7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-20 17:39:17 +00:00
Miss Islington (bot)
82f1a6edfb
bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) (GH-29656)
(cherry picked from commit bc2bc0dbdb)

Co-authored-by: JMcB <joel.mcbride1@live.com>
2021-11-20 16:57:16 +01:00
Łukasz Langa
904af3de2b
[3.10] bpo-45848: Allow the parser to get error lines from encoded files (GH-29646) (GH-29661)
(cherry picked from commit fdcc46d955)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-20 16:34:56 +01:00
Miss Islington (bot)
bbe3c57c86
bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634) (GH-29643)
staticmethod() also became callable in Python 3.10.

See: b83861f02.
(cherry picked from commit e34809e1c2)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-11-19 20:12:16 +01:00
Hugo van Kemenade
9501e8d3a3
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29629) 2021-11-19 19:55:40 +01:00
Miss Islington (bot)
2a630e716e
[3.10] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606)
... To the Installation paths section of the sysconfig doc.
(cherry picked from commit 4575c01b75)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-11-18 16:46:06 -05:00
Miss Islington (bot)
fde9f61e70
[3.10] [doc] bpo-45680: Disambiguate `__getitem__ and __class_getitem__` in the data model (GH-29389) (GH-29620)
The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from GH-29335.
(cherry picked from commit 31b3a70edb)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-18 18:34:08 +01:00
Miss Islington (bot)
252d83cbf1
bpo-45640: [docs] Tokens are now clickable (GH-29260) (GH-29621)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 32959108f9)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2021-11-18 17:28:39 +01:00
Miss Islington (bot)
02531f1d7e
[doc] Expand on soft keywords in the docs for keyword.py (GH-29139) (GH-29195)
Add link at the top and fix the existing links to point to the "[soft keywords](https://docs.python.org/3.10/reference/lexical_analysis.htmlGH-soft-keywords)" section created in the Python 3.10 docs.

(cherry picked from commit 9e05da6224)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2021-11-18 17:23:03 +01:00
Miss Islington (bot)
6d66de97f8
bpo-44959: Add fallback to extension modules with '.sl' suffix on HP-UX (GH-27857) (GH-29152)
(cherry picked from commit 2396fa6537)

Co-authored-by: Florin Spătar <florin.spatar@gmail.com>
2021-11-18 17:19:19 +01:00
Miss Islington (bot)
0df5d31ac7
bpo-45701: Improve documentation for *typed* parameter (GH-29498) (GH-29509)
(cherry picked from commit 912a4ccc3a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-11-18 17:12:07 +01:00
Miss Islington (bot)
5cf05c71d1
bpo-45835: Fix race condition in test_queue (GH-29601) (GH-29612)
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 17:05:40 +01:00
Ethan Furman
65c089751b
[3.10] [Enum] update member.member removal (GH-29608)
Accessing one enum member from another originally raised an `AttributeError`, but became possible due to a performance boost implementation detail.  In 3.11 it will again raise an `AttributeError`.
2021-11-17 23:38:56 -08:00
Łukasz Langa
8eabe60108
[3.10] bpo-45826: Fix a crash in suggestions.c by checking for traceback is None (GH-29590) (GH-29602)
(cherry picked from commit 5d90c467c0)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-11-18 01:28:04 +01:00
Miss Islington (bot)
563e45875a
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571) (GH-29603)
(cherry picked from commit abc0d754c3)

Co-authored-by: ch33zer <ch33zer@gmail.com>
2021-11-18 01:25:54 +01:00
Miss Islington (bot)
b455df59a8
bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580)
(cherry picked from commit df4ae55e66)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-17 15:43:14 -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
Miss Islington (bot)
4ffde90dcc
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) (GH-29598)
If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d8105c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-11-17 22:59:19 +01:00
Miss Islington (bot)
1079b3e3cb
bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564)
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 13:16:01 -08:00
Pablo Galindo Salgado
5618c81e13
[3.10] bpo-45716: Improve the error message when using True/False/None as keywords in a call (GH-29413). (GH-29428)
(cherry picked from commit e2d65630f3)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-11-16 22:31:16 +00:00
Miss Islington (bot)
7bac598819
Save a reference for ensure_future and create_task (GH-29163)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
(cherry picked from commit c750adbe69)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2021-11-16 03:51:19 -08:00