Commit graph

108619 commits

Author SHA1 Message Date
Miss Islington (bot)
5fc784e28a
bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092)
(cherry picked from commit 0ee0a740e1)

Co-authored-by: Konstantin-Glukhov <glukhov.k@gmail.com>
2021-07-14 17:17:18 +01:00
Miss Islington (bot)
94adfe6e2c
bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)
if it is called with a sequence or set, but not list or tuple.
(cherry picked from commit f572cbf1fa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-13 22:44:08 -07:00
Miss Islington (bot)
fe73509c5b
bpo-44630: Fix assertion errors in csv module (GH-27127)
Fix incorrect handling of exceptions when interpreting dialect objects in
the csv module. Not clearing exceptions between calls to
PyObject_GetAttrString() causes assertion failures in pydebug mode (or with
assertions enabled).

Add a minimal test that would've caught this (passing None as dialect, or
any object that isn't a csv.Dialect subclass, which the csv module allows
and caters to, even though it is not documented.) In pydebug mode, the test
triggers the assertion failure in the old code.

Contributed-By: T. Wouters [Google]
(cherry picked from commit 0093876328)

Co-authored-by: T. Wouters <thomas@python.org>
2021-07-13 16:20:28 -07:00
Miss Islington (bot)
a3d20bfee3
bpo-43126: Expand docs on io.IOBase.readlines() method (GH-27061) (#27114)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3b5b99da4b)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-13 16:41:31 +02:00
Miss Islington (bot)
105e6cd67c
bpo-44514: Add doctest testcleanup for configparser and bz2 (GH-26909) (#27111)
Add testcleanup section to configparser and bz2 documentation which
removes temporary files created in the filesystem when 'make doctest'
is run.
(cherry picked from commit 48a5aa7f12)

Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
2021-07-13 16:33:50 +02:00
Miss Islington (bot)
c786988b19
bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27098)
(cherry picked from commit da2e673c53)

Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2021-07-12 18:23:25 +02:00
Vladimir Feinberg
489c273583
[3.9] bpo-43048: RecursionError traceback RecursionError bugfix for cpy3.9 (GH-24460) (#24460)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2021-07-12 17:58:47 +02:00
Miss Islington (bot)
47abf24036
bpo-26329: update os.path.normpath documentation (GH-20138) (#27095)
(cherry picked from commit 66c5853406)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2021-07-12 17:22:33 +02:00
Christian Heimes
c92b391dce
[3.9] bpo-38820: Test with OpenSSL 3.0.0-alpha16 (GH-25942) (#25944)
Also use new make target to install FIPS provider..
(cherry picked from commit e8525567dd)

Co-authored-by: Christian Heimes <christian@python.org>
2021-07-12 17:12:38 +02:00
Miss Islington (bot)
779983ed7f
bpo-43207: InspectLoader.is_package is not an abstract method (GH-24517) (#26322)
Making the description of `InspectLoader.is_package` aligned with the current implementation.

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit 8b9310d902)

Co-authored-by: Junnosuke Kuroda <Isa-rentacs@users.noreply.github.com>
2021-07-12 17:11:59 +02:00
Miss Islington (bot)
e7009f4f9a
bpo-43298: Improved error message when building without the Windows SDK installed (GH-26800) (#26803)
(cherry picked from commit 80190b3e53)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-07-12 17:11:33 +02:00
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