Commit graph

108881 commits

Author SHA1 Message Date
Łukasz Langa
52d9d3b754
[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) (GH-28741)
(cherry picked from commit b9bb74871b)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2021-10-05 22:30:25 +02:00
Miss Islington (bot)
950b324973
[doc] Fix gethostbyname_ex description (GH-28700) (GH-28743)
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't.
(cherry picked from commit 4103280b83)

Co-authored-by: Andre Delfino <adelfino@gmail.com>

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-10-05 19:22:14 +02:00
Ned Deily
f4a7ce70f9
Update macOS installer ReadMe for 3.9.8. (GH-28701)
The universal2 installer variant is now the default download from
python.org and the legacy Intel-64 variant is now deprecated.
2021-10-05 18:42:02 +02:00
Miss Islington (bot)
63c9a6cc8b
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
(cherry picked from commit de4052fe06)

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
2021-10-05 05:39:18 -07:00
Miss Islington (bot)
3ce5e07e9a
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ef6196028f)

Co-authored-by: Christian Heimes <christian@python.org>
2021-10-05 03:09:21 -07:00
John Belmonte
7c2a040a10
[3.9] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) (GH-28731)
Make enter_context(foo()) / enter_async_context(foo()) equivalent to
`[async] with foo()` regarding __context__ when an exception is raised.

Previously exceptions would be caught and re-raised with the wrong
context when explicitly overriding __context__ with None..
(cherry picked from commit e6d1aa1ac6)

Co-authored-by: John Belmonte <john@neggie.net>

Automerge-Triggered-By: GH:njsmith
2021-10-04 23:37:24 -07:00
Serhiy Storchaka
e9ce081ec7
[3.9] Remove trailing spaces (GH-28710) 2021-10-03 20:04:38 +03:00
Miss Islington (bot)
d211e87307
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687) (GH-28689)
pypi.org "  The Python Package Index (PyPI) ...
(cherry picked from commit 0be338199f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-10-02 10:15:45 -04:00
Miss Islington (bot)
6035d650a3
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
Co-authored-by: AngstyDuck <solsticedante@gmail.com>
2021-10-01 21:46:25 +01:00
Miss Islington (bot)
0e1aeab5d7
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671) (GH-28683)
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.

configure now checks if the sem_clockwait() function is available.
(cherry picked from commit 6df8c32753)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-10-01 18:51:15 +02:00
Miss Islington (bot)
8822526caa
[3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679)
(cherry picked from commit 9ce0f48e91)


Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-01 06:28:19 -07:00
Serhiy Storchaka
4d5d161d2a
[3.9] bpo-45310: Fix parrallel shared memory tests (GH-28661) (GH-28670)
Add a PID to names of POSIX shared memory objects to allow
running multiprocessing tests (test_multiprocessing_fork,
test_multiprocessing_spawn, etc) in parallel.
(cherry picked from commit eb4495e8e2)
2021-10-01 12:38:23 +03:00
Serhiy Storchaka
e9d5cdda1f
Revert "Revert "bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)" (GH-28660)" (GH-28666)
This reverts commit 2cf76cf4cc.
2021-10-01 10:58:59 +03:00
Łukasz Langa
2cf76cf4cc
Revert "bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)" (GH-28660)
This reverts commit 993a130d3a.
2021-09-30 22:23:32 +02:00
Serhiy Storchaka
993a130d3a
[3.9] bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)
(cherry picked from commit d441437ee7)
2021-09-30 19:58:34 +03:00
Serhiy Storchaka
f7e99c9813
[3.9] bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654) (GH-28658)
* Work correctly if an additional fresh module imports other
  additional fresh module which imports a blocked module.
* Raises ImportError if the specified module cannot be imported
  while all additional fresh modules are successfully imported.
* Support blocking packages.
* Always restore the import state of fresh and blocked modules
  and their submodules.
* Fix test_decimal and test_xml_etree which depended on an undesired
  side effect of import_fresh_module().
(cherry picked from commit ec4d917a6a)
2021-09-30 19:57:46 +03:00
Miss Islington (bot)
9626ac8b74
closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394)
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit 196998e220)

Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
2021-09-29 13:47:58 -07:00
Miss Islington (bot)
87ecdb227f
[typo] Fix threading.Barrier comment that used confusing punctuation (GH-28623) (GH-28626)
Removed extra comma in comment that indicates state of a `Barrier` as it was confusing and breaking the flow while reading.

Co-authored-by: Priyank <5903604+cpriyank@users.noreply.github.com>
(cherry picked from commit f1ca5d7f61)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-29 17:20:49 +02:00
Miss Islington (bot)
1e97145d2f
[typo] s/libexpact/libexpat/ in setup.py (GH-28624) (GH-28627)
(cherry picked from commit bf5d1684a7)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-29 17:19:47 +02:00
Miss Islington (bot)
fafa213870
bpo-44394: Ensure libexpat is linked against libm (GH-28617)
(cherry picked from commit 6c1154b9de)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-29 06:47:56 -07:00
Łukasz Langa
7bff4d396f
[3.9] bpo-39039: tarfile raises descriptive exception from zlib.error (GH-27766) (GH-28614)
* during tarfile parsing, a zlib error indicates invalid data
* tarfile.open now raises a descriptive exception from the zlib error
* this makes it clear to the user that they may be trying to open a
  corrupted tar file.
(cherry picked from commit b6fe857250)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-09-29 12:56:14 +02:00
Miss Islington (bot)
c6b5ceae34
bpo-45269: test wrong markers type to c_make_encoder (GH-28540) (GH-28610)
(cherry picked from commit e046aabbe3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-28 23:51:57 +02:00
Łukasz Langa
68223cd12f
[3.9] [docs] Improve the markup of powers (GH-28598) (GH-28608)
(cherry picked from commit 4f05f15d7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-28 23:13:16 +02:00
Miss Islington (bot)
cd00fee8dd
bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595) (GH-28604)
(cherry picked from commit 84975146a7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-28 22:19:02 +02:00
Miss Islington (bot)
fe7746c61a
[doc] fix minor typo for argparse (GH-28451)
"A JSONDecodeError" instead of "An JSONDecodeError".
(cherry picked from commit db0133f98d)

Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
2021-09-28 07:07:20 -07:00
Miss Islington (bot)
813fbba4ca
bpo-45296: Fix exit/quit message on Windows (GH-28577) (GH-28601)
IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
(cherry picked from commit e649e0658f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-28 14:35:04 +02:00
Victor Stinner
94d19f606f
bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) (GH-28589)
Fix the threading._shutdown() function when the threading module was
imported first from a thread different than the main thread: no
longer log an error at Python exit.

(cherry picked from commit 95d3137082)
2021-09-27 23:40:22 +02:00
Miss Islington (bot)
1ecb641b88
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)
Fix a race condition in the Thread.join() method of the threading
module. If the function is interrupted by a signal and the signal
handler raises an exception, make sure that the thread remains in a
consistent state to prevent a deadlock.
(cherry picked from commit a22be4943c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-27 05:49:30 -07:00
Miss Islington (bot)
08e387ab82
bpo-45280: Add test for empty NamedTuple in test_typing (GH-28559) (GH-28570)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
(cherry picked from commit f56268a2cd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-26 19:09:29 +02:00
Łukasz Langa
1f08d16c90
[3.9] bpo-45166: fixes get_type_hints failure on Final (GH-28279) (GH-28561)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>.
(cherry picked from commit 784905dbef)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-25 11:30:20 +02:00
Miss Islington (bot)
2a7d985bb3
bpo-45277: Fix typo in codecs doc (GH-28555)
encoding => encode
(cherry picked from commit 4c0fc65cd8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-24 19:22:54 -07:00
Miss Islington (bot)
91a5ba1bcb
bpo-30951: Correct co_names docstring in inspect module (GH-2743) (GH-28544)
(cherry picked from commit 3f8b23f8dd)

Co-authored-by: Alex Vig <jalexvig@gmail.com>
2021-09-24 12:38:39 +02:00
Miss Islington (bot)
d672dd34f0
bpo-38623: Add note about site module (site-packages) (GH-16974) (GH-28537)
(cherry picked from commit 55b45bf707)

Co-authored-by: Peter Bittner <django@bittner.it>
2021-09-24 00:48:26 +02:00
Miss Islington (bot)
b97f1f82a3
[docs] Update documentation for multiprocessing.get_start_method (GH-18170) (GH-28534)
(cherry picked from commit af90b5498b)

Co-authored-by: Sam Sneddon <me@gsnedders.com>
2021-09-23 23:39:08 +02:00
Miss Islington (bot)
7fa76ece30
[3.9] Fix legacy logging module URL (GH-28528) (GH-28531)
Co-authored-by: Sean Leavey <SeanDS@users.noreply.github.com>
2021-09-23 16:42:31 +01:00
Miss Islington (bot)
f1d5cdef57
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28524)
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.

Co-authored-by: Patrick Reader <_@pxeger.com>
(cherry picked from commit 36122e1814)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-23 13:25:57 +03:00
Łukasz Langa
e06b0fddf6
[3.9] bpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449) (GH-28522)
It runs now asynchronous methods and callbacks.

If it fails, doCleanups() can be called for cleaning up..
(cherry picked from commit ecb6922ff2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-22 18:48:17 +02:00
Łukasz Langa
5482db5800
[3.9] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28512)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 8f943ca257)

Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
2021-09-22 17:32:04 +02:00
Miss Islington (bot)
09390c837a
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28507)
This was a regression from fixing BPO-43219.
(cherry picked from commit b7eac52b46)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-09-22 00:21:10 +02:00
Miss Islington (bot)
df1006b561
bpo-45216: Remove extraneous method docs from difflib (GH-28445) (GH-28506)
(cherry picked from commit 06e1773c8d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-21 23:57:49 +02:00
Miss Islington (bot)
65268ab849
bpo-45209: fix UserWarning: resource_tracker in test_multiprocessing (GH-28377) (GH-28500)
(cherry picked from commit f604cf1c37)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-21 20:37:04 +02:00
Miss Islington (bot)
aea92de990
bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494)
(cherry picked from commit 9a0dcc5b2e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-21 10:53:26 -07:00
Miss Islington (bot)
b06c3b3647
[3.9] bpo-45021: Fix a hang in forked children (GH-28007) (GH-28481)
_global_shutdown_lock should be reinitialized in forked children
(cherry picked from commit 0bfa1106ac)


Co-authored-by: nullptr <3621629+0x0L@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
2021-09-20 11:54:24 -07:00
Miss Islington (bot)
04dea46dde
bpo-45229: Make pickle tests discoverable (GH-28467) (GH-28479)
(cherry picked from commit e6ba992288)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-20 18:19:49 +02:00
Miss Islington (bot)
29e431419a
bpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466) (GH-28471)
Calling Py_InitializeFromConfig()+Py_RunMain() multiple times must
not crash.

Cleanup also test_get_argc_argv().
(cherry picked from commit 5e2c32e08e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-20 17:51:32 +02:00
Miss Islington (bot)
50c0551f97
bpo-45055: Add retry when downloading externals on Windows (GH-28399)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit ef9e22b253)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-09-20 07:59:15 -07:00
Serhiy Storchaka
5822ab672a
[3.9] bpo-45229: Remove test_main in many tests (GH-28405) (GH-28456)
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests..
(cherry picked from commit 40348acc18)
2021-09-20 09:34:52 +03:00
Miss Islington (bot)
41e2a31c13
bpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH-28459)
(cherry picked from commit e6d05a4092)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-19 16:13:56 -07:00
Miss Islington (bot)
7e465a6b82
bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)
unittest.TestCase.debug() raises now a SkipTest if the class or
the test method are decorated with the skipping decorator.

Previously it only raised a SkipTest if the test method was decorated
with other decorator in addition to the skipping decorator, or
if SkipTest was explicitly raised in the test or setup methods.
(cherry picked from commit dea59cf88a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-18 06:22:40 -07:00
Miss Islington (bot)
a18d52269a
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420) (GH-28443) 2021-09-18 01:47:41 -05:00