Commit graph

110571 commits

Author SHA1 Message Date
Miss Islington (bot)
fc3511f18e
bpo-45125: Improves pickling docs and tests for shared_memory (GH-28294)
(cherry picked from commit 746d648d47)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-10-01 06:09:15 -07:00
Miss Islington (bot)
b994feeca7
hashlib: Fix old message about unicode objects. (GH-28653)
(cherry picked from commit 9ce0f48e91)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-10-01 05:58:37 -07:00
Miss Islington (bot)
4e6681d0cf
bpo-45310: Fix parrallel shared memory tests (GH-28661)
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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-01 02:41:20 -07:00
Miss Islington (bot)
ef7c7294e8
bpo-45229: Make datetime tests discoverable (GH-28615)
(cherry picked from commit d441437ee7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-01 00:36:17 -07:00
Serhiy Storchaka
7873884d47
[3.10] bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654) (GH-28657)
* 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:56:41 +03:00
Miss Islington (bot)
80285ecc8d
closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394) (GH-28636)
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit 196998e220)

Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
2021-09-30 01:02:11 +02:00
Miss Islington (bot)
017a791ae4
[typo] Fix threading.Barrier comment that used confusing punctuation (GH-28623) (GH-28625)
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:21:55 +02:00
Miss Islington (bot)
412ae8ab10
[3.10] bpo-44394: Ensure libexpat is linked against libm (GH-28617) (GH-28621)
* bpo-44394: Ensure libexpat is linked against libm (GH-28617)
(cherry picked from commit 6c1154b9de)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-29 16:13:41 +02:00
Mark Shannon
2be4c370c6
Move predispatch logic from DISPATCH macro to juts before switch. Reduces size of each opocde in interpreter. (GH-28475) 2021-09-29 13:16:13 +01:00
Miss Islington (bot)
02fdd73a19
bpo-45291: Explicitly set --libdir=lib when configure OpenSSL (GH-28566) (GH-28616)
(cherry picked from commit bc4cde4033)

Co-authored-by: zhanpon <pon.zhan@gmail.com>
2021-09-29 13:41:27 +02:00
Łukasz Langa
d6b69f21d8
[3.10] bpo-39039: tarfile raises descriptive exception from zlib.error (GH-27766) (GH-28613)
* 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:19:37 +02:00
Miss Islington (bot)
1cb17be3e6
bpo-45269: test wrong markers type to c_make_encoder (GH-28540) (GH-28609)
(cherry picked from commit e046aabbe3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-28 23:56:52 +02:00
Serhiy Storchaka
ec4e2ec241
[3.10] bpo-45307: Restore private C API function _PyImport_FindExtensionObject() (GH-28594)
py2exe and PyOxidizer rely on this API.
It will be removed in Python 3.11.

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-28 23:12:50 +02:00
Łukasz Langa
8f9d398b46
[3.10] [docs] Improve the markup of powers (GH-28598) (GH-28607)
(cherry picked from commit 4f05f15d7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-28 23:09:58 +02:00
Miss Islington (bot)
6d60449456
[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:13 -07:00
Miss Islington (bot)
fd52afd192
bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595)
(cherry picked from commit 84975146a7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-28 05:56:52 -07:00
Miss Islington (bot)
acd46feff3
bpo-45296: Fix exit/quit message on Windows (GH-28577) (GH-28600)
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:23 +02:00
Miss Islington (bot)
38c67738c6
bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549)
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)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-27 14:39:35 -07:00
Miss Islington (bot)
c7fdd6879b
bpo-45249: Ensure the traceback module prints correctly syntax errors with ranges (GH-28575)
(cherry picked from commit 20f439b6b9)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-27 14:26:39 -07:00
Miss Islington (bot)
9e209d48ca
bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator expression in function calls (GH-28576)
(cherry picked from commit e5f13ce5b4)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-27 07:05:20 -07:00
Miss Islington (bot)
fae2694bea
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532) (GH-28580)
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 14:53:31 +02:00
Miss Islington (bot)
d452b2963b
bpo-45280: Add test for empty NamedTuple in test_typing (GH-28559) (GH-28571)
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:50 +02:00
Łukasz Langa
c523022ba8
[3.10] bpo-43914: What's New 3.10: add new SyntaxError attributes (GH-28558) (GH-28562)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 71f8ff45c6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-25 11:32:26 +02:00
Miss Islington (bot)
d312b8516e
bpo-45166: fixes get_type_hints failure on Final (GH-28279) (GH-28560)
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:21:13 +02:00
Miss Islington (bot)
371ca3b54d
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:16:48 -07:00
Miss Islington (bot)
402d5f3d77
bpo-30951: Correct co_names docstring in inspect module (GH-2743) (GH-28543)
(cherry picked from commit 3f8b23f8dd)

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

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

Co-authored-by: Sam Sneddon <me@gsnedders.com>
2021-09-23 23:38:44 +02:00
Miss Islington (bot)
55576893b3
bpo-43760: Document PyThreadState.use_tracing removal (GH-28527) (GH-28529)
(cherry picked from commit f4ccb79d52)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-23 22:40:15 +02:00
Miss Islington (bot)
2df68270d9
Fix legacy logging module URL (GH-28528)
The URL listed in the `logging` docs for the original `logging` module leads to a 404. I managed to find the new location for the page and updated the URL.

Automerge-Triggered-By: GH:vsajip
(cherry picked from commit 8492b729ae)

Co-authored-by: Sean Leavey <SeanDS@users.noreply.github.com>
2021-09-23 08:07:40 -07:00
Miss Islington (bot)
1493e1a40d
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523)
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:31 +03:00
Łukasz Langa
44396aaba9
[3.10] bpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449) (GH-28521)
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:42:15 +02:00
Łukasz Langa
8c1e1da565
[3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)
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 01:33:59 +02:00
Miss Islington (bot)
c800e39094
[tests] Add missing assert against expected tracebacks in test_exceptions.py (GH-28484) (GH-28510)
(cherry picked from commit a007347100)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-09-22 00:38:59 +02:00
Miss Islington (bot)
41d48bc038
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508)
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:14:40 +02:00
Miss Islington (bot)
e6b6c1d23b
bpo-45216: Remove extraneous method docs from difflib (GH-28445) (GH-28505)
(cherry picked from commit 06e1773c8d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-21 23:53:47 +02:00
Łukasz Langa
0d41bf1570
[3.10] bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494) (GH-28502)
(cherry picked from commit 9a0dcc5b2e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-21 22:32:09 +02:00
Miss Islington (bot)
09e5016f8b
bpo-45209: fix UserWarning: resource_tracker in test_multiprocessing (GH-28377)
(cherry picked from commit f604cf1c37)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-21 11:19:48 -07:00
Miss Islington (bot)
d0d83a9431
[3.10] bpo-45021: Fix a hang in forked children (GH-28007) (GH-28480)
_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:52:23 -07:00
Miss Islington (bot)
74c6acc76f
bpo-45229: Make pickle tests discoverable (GH-28467) (GH-28478)
(cherry picked from commit e6ba992288)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-20 18:19:31 +02:00
Miss Islington (bot)
ee41d01326
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:58:29 -07:00
Miss Islington (bot)
3d16fc90ce
bpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466)
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 01:47:58 -07:00
Miss Islington (bot)
697b6650ed
Docs: Clarify the before_and_after() example (GH-28458) (#28464)
(cherry picked from commit fcbf9b176b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-19 20:53:37 -05:00
Miss Islington (bot)
0e96086805
bpo-45128: fixes test_multiprocessing_fork mysterious crash (GH-28387)
(cherry picked from commit 1d42408495)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-19 16:13:04 -07:00
Miss Islington (bot)
f17c979d90
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:07:16 -07:00
Serhiy Storchaka
bedce3538c
[3.10] bpo-45229: Remove test_main in many tests (GH-28405) (GH-28455)
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-19 22:36:03 +03:00
Miss Islington (bot)
9c23a1ebad
bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages (GH-27144) (GH-28436)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit f4813388b4)

Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>

Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
2021-09-19 20:11:41 +01:00
Miss Islington (bot)
753f7af22e
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:31 -07:00
Miss Islington (bot)
7ab114bf1f
bpo-45198: __set_name__ documentation not clear about its usage with non-descriptor classes (GH-28439)
(cherry picked from commit 94b462686b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-18 00:10:00 -07:00
Miss Islington (bot)
6e4101add5
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420) (GH-28442) 2021-09-18 01:47:16 -05:00