Commit graph

109045 commits

Author SHA1 Message Date
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)
257eea5586
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-04 00:28:30 -05:00
Miss Islington (bot)
0003d57e22
docs: Improve example for urlparse() (GH-29816) (GH-29889)
(cherry picked from commit 226d22ff2d)

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

Co-authored-by: Rob <r4226@pm.me>

Co-authored-by: Rob <r4226@pm.me>
2021-12-01 17:40:50 +02: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
Miss Islington (bot)
031e2bb332
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) (GH-29863)
(cherry picked from commit f97ec09baf)

Co-authored-by: Vishal Pandey <vishalpandeyviptsk@gmail.com>
2021-11-30 11:50:28 +00:00
Miss Islington (bot)
b91805ec02
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:53 -08:00
Miss Islington (bot)
376b24e4f6
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:30:38 -08:00
Miss Islington (bot)
40a57532a5
[3.9] bpo-44391: Remove unused argument from a varargs call. (GH-29843) (GH-29850) 2021-11-29 17:53:37 +00:00
Miss Islington (bot)
da3e9ddde7
[3.9] [Doc] Add info to logging cookbook about running logging socket listeners i… (GH-29838) (GH-29840) 2021-11-29 13:49:20 +00:00
Miss Islington (bot)
3b9d886567
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:28:46 -08: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
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
Miss Islington (bot)
133fb267f4
bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799) 2021-11-26 23:43:12 +00:00
Miss Islington (bot)
b3f14dacfe
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:20:14 -08:00
Victor Stinner
93a540d74c
bpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792) (GH-29797)
"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)
(cherry picked from commit b6defde2af)
2021-11-26 17:23:41 +01:00
Victor Stinner
92631a4144
bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29776)
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-26 10:59:31 +01:00
Christian Heimes
b524934984
[3.9] bpo-33393: Update config.guess and config.sub (GH-29781) (GH-29783)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-25 22:51:52 +01:00
Christian Heimes
cd6d2577fa
[3.9] bpo-45881: Use CC from env first for cross building (GH-29752) (GH-29754)
Co-authored-by: Christian Heimes <christian@python.org>.
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-25 20:53:14 +01: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
Miss Islington (bot)
151c9bf649
bpo-45693: Document port parameter to loop.create_server (GH-29760) (GH-29763)
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:40:09 -05: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
Miss Islington (bot)
e81e1d7f81
[3.9] 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:52:07 -05:00
Miss Islington (bot)
d1855ed752
bpo-44844: Remove unresponsive web link (GH-29651)
Threading notes by Aahz from OSCON 2001.
(cherry picked from commit 9852339145)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-11-20 10:44:04 -08:00
Miss Islington (bot)
e88f9787ab
bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) (GH-29657)
(cherry picked from commit bc2bc0dbdb)

Co-authored-by: JMcB <joel.mcbride1@live.com>
2021-11-20 16:57:37 +01:00
Hugo van Kemenade
e8d41eea7a
bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29630) 2021-11-19 19:55:15 +01: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)
c06c7c489a
[3.9] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) (GH-29632)
... 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:45:15 -05:00
Miss Islington (bot)
591bf41609
[3.9] [doc] bpo-45680: Disambiguate `__getitem__ and __class_getitem__` in the data model (GH-29389) (GH-29619)
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:41:09 +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
Miss Islington (bot)
71d842b9c1
bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-29605)
unittest.TestCase.assertWarns no longer raises a RuntimeException
when accessing a module's ``__warningregistry__`` causes importation of a new
module, or when a new module is imported in another thread.

Patch by Kernc.
(cherry picked from commit 46398fba4d)

Co-authored-by: kernc <kerncece@gmail.com>
2021-11-18 17:09:41 +01:00
Ethan Furman
feccea6a7e
[3.9] [Enum] update member.member removal (GH-29611)
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-18 00:50:42 -08:00
Ethan Furman
d754073927
Revert "[3.9] [Enum] update member.member removal to 3.11 (GH-29607)" (GH-29609)
This reverts commit 41365f7dc4.
2021-11-17 23:40:08 -08:00
Ethan Furman
41365f7dc4
[3.9] [Enum] update member.member removal to 3.11 (GH-29607)
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:36:01 -08:00
Miss Islington (bot)
17f5c5cad3
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571) (GH-29604)
(cherry picked from commit abc0d754c3)

Co-authored-by: ch33zer <ch33zer@gmail.com>
2021-11-18 01:26:12 +01:00
Miss Islington (bot)
00ee14e814
[3.9] bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580) (GH-29584)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-18 01:24:43 +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
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
Miss Islington (bot)
ac89f8cab7
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) (GH-29597)
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:42 +01:00
Miss Islington (bot)
fd206b6807
[3.9] Save a reference for ensure_future and create_task (GH-29163) (GH-29573)
Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
(cherry picked from commit c750adbe69)


Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>

Automerge-Triggered-By: GH:asvetlov
2021-11-16 03:47:02 -08:00
Miss Islington (bot)
a40d066e8e
bpo-45677: Reword first section of sqlite3 docs (GH-29326) (GH-29567)
* bpo-45677: Avoid addressing the reader as 'you' in sqlite3 docs

* Adjust wording

* Adjust wording again

* Typo

* Update Doc/library/sqlite3.rst

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

* Address review: adjust wording

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Apply Alex' suggestion, and apply 80 char limit to PR

* Minor adjustment

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 6c5a312fb6)

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

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-15 15:32:31 -08:00
Miss Islington (bot)
b0bdc093c2
bpo-25381: Update explanation of exceptions in C. (GH-26838) (GH-29569)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

(cherry picked from commit ad43dc0b54)
2021-11-15 18:07:58 -05:00
Łukasz Langa
3bb2566ce8
Post 3.9.9 2021-11-15 22:41:03 +01:00
Łukasz Langa
ccb0e6a345
Python 3.9.9 2021-11-15 18:43:00 +01:00
Miss Islington (bot)
32d14b262d
bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501)
(cherry picked from commit a56fbad85e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-11-15 17:40:08 +00:00
Miss Islington (bot)
9f9a3028e3
bpo-45752: Remove "array" from list of things that cannot be copied in copy module docstring (GH-29555)
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit c2c4fdf5ea)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-11-14 05:21:32 -08:00
Miss Islington (bot)
6073920fcd
bpo-45752: Fix no-support examples in 'copy' docs (GH-29548)
(cherry picked from commit b7360ae395)

Co-authored-by: M. Mostafa Farzan <m2_farzan@yahoo.com>
2021-11-14 01:58:01 -08:00