Commit graph

108608 commits

Author SHA1 Message Date
Miss Islington (bot)
6fb4248cd9
bpo-44472: Fix ltrace functionality when exceptions are raised (GH-26822) (#26831)
(cherry picked from commit 06cda808f1)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-07-12 17:11:10 +02:00
Miss Islington (bot)
c89f0b2587
[3.9] bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049) (GH-27082)
Fixes the misleading IsADirectoryError to be FileNotFoundError.
(cherry picked from commit 248173cc04)


Co-authored-by: andrei kulakov <andrei.avk@gmail.com>

Automerge-Triggered-By: GH:gpshead
2021-07-09 21:13:59 -07:00
Miss Islington (bot)
302df02789
docs: add the word 'official' (GH-26849)
(cherry picked from commit af4a2dcc40)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2021-07-08 08:21:55 -07:00
Dong-hee Na
9761abf306
[3.9] bpo-44558: Match countOf is/== treatment to c (GH-27007). (GH-27055) 2021-07-07 23:55:22 +09:00
Miss Islington (bot)
324b93295f
bpo-44563: Fix error handling in tee.fromiterable() (GH-27020) (GH-27042)
In debug build failed tee.fromiterable() corrupted the linked list of all GC objects.
(cherry picked from commit f64de53ff0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-05 23:34:01 +01:00
Ken Jin
51a29c42f1
[3.9] bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016) (GH-27028) 2021-07-05 17:22:43 +01:00
Miss Islington (bot)
9f47d872db
bpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)
(cherry picked from commit 09302405d2)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-07-05 02:52:04 -07:00
Pablo Galindo
fe847a6285
Revert "bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016) (GH-27018)" (GH-27022)
This reverts commit 4684a34c8d.
2021-07-04 20:26:34 +01:00
Miss Islington (bot)
4684a34c8d
bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016) (GH-27018)
(cherry picked from commit d33943a6c3)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-07-04 18:55:43 +01:00
Miss Islington (bot)
21be6cb030
bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) (GH-27005)
(cherry picked from commit d968a638fc)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-07-03 17:05:33 +01:00
Miss Islington (bot)
91db097358
bpo-30256: [doc] Fix formatting error in news (GH-26994) (GH-26996)
(cherry picked from commit 2560c612c8)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-07-02 18:38:04 +01:00
Miss Islington (bot)
8aa45de6c6
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (GH-26989)
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
(cherry picked from commit 85b920498b)

Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
2021-07-01 21:35:31 -07:00
Miss Islington (bot)
67e394562d
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
(cherry picked from commit d3a95c1b6e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-06-30 12:31:04 -07:00
Steve Dower
863e3d5c7e
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26971) 2021-06-30 18:52:39 +01:00
Miss Islington (bot)
f790bc8084
bpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950) (GH-26960)
(cherry picked from commit e2fea101fd)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-30 00:19:32 +01:00
Miss Islington (bot)
02859df105
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26957)
(cherry picked from commit 12803c59d5)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-06-29 18:53:07 +01:00
Miss Islington (bot)
3ba65cdcef
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834) (GH-26952)
(cherry picked from commit 0d7f7975d5)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-06-29 15:19:05 +01:00
Łukasz Langa
0787a1b9d0
Post 3.9.6 2021-06-28 11:48:44 +02:00
Łukasz Langa
db3ff76da1
Python 3.9.6 2021-06-28 10:26:18 +02:00
Jason R. Coombs
17b916737b
[3.9] bpo-37741: make importlib.metadata docs discoverable through a module directive. (GH-25415) (GH-26500)
Automerge-Triggered-By: GH:jaraco.
(cherry picked from commit 23acadcc1c)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-06-27 18:05:27 -04:00
Miss Islington (bot)
1acd1e6385
bpo-40620: Clarify tutorial controlflow.rst `range` examples (GH-26919) (GH-26928)
(cherry picked from commit 2f49c9debc)

Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
2021-06-27 20:52:32 +01:00
Miss Islington (bot)
b2a5dcd8a0
Clarify the order of a stacked abstractmethod (GH-26892)
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit 74d60eab55)

Co-authored-by: Ram Rachum <ram@rachum.com>
2021-06-27 11:50:45 -07:00
Serhiy Storchaka
4861fdaf25
[3.9] bpo-44482: Fix very unlikely resource leak in glob in non-CPython implementations (GH-26843). (GH-26916)
(cherry picked from commit 5c7940257e)
2021-06-27 14:28:24 +03:00
Stéphane Bidoul
fe272b7a3a
[3.9] Update vendored pip to 21.1.3 (GH-26912). (GH-26915) 2021-06-26 18:59:57 +01:00
Miss Islington (bot)
0796e21fea
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
(cherry picked from commit b5a52eef67)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-24 05:25:41 -07:00
Victor Stinner
5ed7827b16
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26878)
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.

(cherry picked from commit 489699ca05)
2021-06-23 17:47:33 +02:00
Miss Islington (bot)
fcde2c6a8c
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
(cherry picked from commit 5a3108044d)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-06-23 03:03:00 -07:00
Miss Islington (bot)
ef89b2bf42
[doc] Improve punctuation atexit doc (GH-25629) (GH-26857)
(cherry picked from commit a6b47de07a)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2021-06-22 18:10:50 +01:00
Miss Islington (bot)
a65df3f9fc
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
It defaults to None and is positional only.
(cherry picked from commit d1ae57027f)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-06-22 07:42:41 -07:00
Ma Lin
8bc26d8c9d
bpo-44439: BZ2File.write()/LZMAFile.write() handle length correctly (GH-26846)
No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong.

Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com>
2021-06-22 16:57:41 +03:00
Miss Islington (bot)
0ff487b8ab
bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb3214d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-21 17:29:13 -07:00
Miss Islington (bot)
d881002fbd
bpo-13814: Explain why generators are not context managers (GH-26835)
Put entry in Design FAQ after a question about a context manager for assignment.
Original patch by Aidan Lowe.
(cherry picked from commit 51f45d085d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-21 18:03:06 -04:00
Miss Islington (bot)
67b3a99953
bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)
(cherry picked from commit 30f7a77f35)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-06-21 07:27:42 -07:00
Victor Stinner
83ad40efc3
bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26825)
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.

On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:

"libgcc_s.so.1 must be installed for pthread_cancel to work"

pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.

The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.

Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.

(cherry picked from commit 45a78f906d)
2021-06-21 14:22:56 +02:00
Miss Islington (bot)
175e264d36
bpo-44469: Fix tests for "async with" with bad object (GH-26817)
Test for execution of the body was null. It would pass
even if the code which should be skipped was executed.
(cherry picked from commit 5d2b3a0d68)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-21 00:54:04 -07:00
Miss Islington (bot)
533bff4e9f
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26805)
(cherry picked from commit 291848195f)
2021-06-19 16:16:38 +01:00
Miss Islington (bot)
686c6f303a
bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it to 'num'. (GH-26744) (GH-26761)
(cherry picked from commit 7247f6f433)
2021-06-16 20:13:53 +01:00
Ken Jin
c7e95715ec
[3.9] bpo-44392: Add Py_GenericAlias to C API docs (GH-26724) (GH-26757)
(cherry picked from commit 6773c3eaa7)
2021-06-16 08:34:52 -07:00
Miss Islington (bot)
8fe57aacc7
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) (GH-26738)
The threading.enumerate() function now uses a reentrant lock to
prevent a hang on reentrant call.
(cherry picked from commit 243fd01047)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-15 18:30:26 +02:00
Pablo Galindo
0d0a9eaa82
[3.9] bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712). (GH-26723)
(cherry picked from commit 507ed6fa1d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-14 18:07:51 +01:00
Miss Islington (bot)
7f021952b2
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683cfb)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-06-14 08:07:05 -07:00
Miss Islington (bot)
9ee8752162
Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)
(cherry picked from commit 5924243199)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-06-13 08:42:43 +01:00
Miss Islington (bot)
a9e20cf7bb
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
In particular, when running with tk8.6.8, as in PSF 3.9.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 3ec3ee7d2e)

Co-authored-by: Kaustubh J <kaustubhkj@gmail.com>
2021-06-11 19:24:40 -04:00
Miss Islington (bot)
57b3ca7f0a
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568)
(cherry picked from commit 449e6f0ef3)

Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
2021-06-11 15:03:10 -07:00
Miss Islington (bot)
9580d3894a
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
(cherry picked from commit 5af56c6f2a)
2021-06-11 22:16:50 +01:00
Miss Islington (bot)
6df926f1c4
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646) (GH-26675)
(cherry picked from commit 4cb6ba1432)

Co-authored-by: huzhaojie <hu.zj@foxmail.com>
2021-06-11 17:18:49 +01:00
Ethan Furman
e9726314df
[Enum] improve pickle support (#26666)
search all bases for a __reduce__ style method; if a __new__ method is
found first the enum will be made unpicklable
2021-06-11 01:26:32 -07:00
Lysandros Nikolaou
3ce35bfbbe
[3.9] bpo-44385: Remove unused grammar rules (GH-26655) (GH-26659)
(cherry picked from commit e7b4644607)
2021-06-10 15:52:49 -07:00
Miss Islington (bot)
304ec53b53
bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26652)
This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:

    class Str1Enum(str, Enum):
        GH- some behavior here

    class Str2Enum(str, Enum):
        GH- some more behavior here

    class FinalStrEnum(Str1Enum, Str2Enum):
        GH- this now works
(cherry picked from commit 8a4f0850d7)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-10 15:03:29 -07:00
Miss Islington (bot)
175ebc60d5
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26651)
(cherry picked from commit 6544b2532d)

Co-authored-by: Daniel Hahler <git@thequod.de>
2021-06-10 22:24:03 +01:00