Commit graph

110856 commits

Author SHA1 Message Date
Miss Islington (bot)
abceb66c7e
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:04:29 -08:00
Miss Islington (bot)
f1dd5ed1f3
bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291)
For example, InitVar[list[int]].
(cherry picked from commit 1fd4de5bdd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-05 13:02:47 -08: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)
f6648e229e
bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)
(cherry picked from commit 9f2f7e4226)

Co-authored-by: Zachary Ware <zach@python.org>
2021-12-02 12:45:09 -08:00
Miss Islington (bot)
eac07e5ab0
docs: Improve example for urlparse() (GH-29816) (GH-29888)
(cherry picked from commit 226d22ff2d)

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-12-02 12:25:13 +02:00
Miss Islington (bot)
e99c5e039b
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) (GH-29877)
(cherry picked from commit f27bef3043)

Co-authored-by: Rob <r4226@pm.me>
2021-12-01 17:44:09 +02:00
Miss Islington (bot)
39751420b3
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) (GH-29862)
(cherry picked from commit f97ec09baf)

Co-authored-by: Vishal Pandey <vishalpandeyviptsk@gmail.com>
2021-11-30 11:49:59 +00:00
Miss Islington (bot)
5a6d9ed700
bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (GH-29854)
(cherry picked from commit 734ed35383)

Co-authored-by: David Federman <david.federman@outlook.com>
2021-11-29 15:08:33 -08:00
Miss Islington (bot)
32f1491a97
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

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

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-11-29 10:32:56 -08:00
Miss Islington (bot)
af39cfa6ca
[3.10] bpo-44391: Remove unused argument from a varargs call. (GH-29843) (GH-29849) 2021-11-29 18:00:31 +00:00
Miss Islington (bot)
efe2a2306b
[3.10] [Doc] Add info to logging cookbook about running logging socket listeners i… (GH-29838) (GH-29839) 2021-11-29 13:28:05 +00:00
Miss Islington (bot)
4b11d71185
bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868)
(cherry picked from commit 7431448b81)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-11-29 04:24:08 -08:00
Irit Katriel
4d2cc3ed46
bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29826)
(cherry picked from commit 4dfae6f38e)
2021-11-29 10:07:24 +00:00
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