Commit graph

110539 commits

Author SHA1 Message Date
Ł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
Miss Islington (bot)
5683902e06
[3.10] Fix minor typo in Doc/c-api/type.rst (GH-28432) (GH-28440)
retreived-> retrieved
(cherry picked from commit af08f1ba40)


Co-authored-by: Konstantin Popov <konst.hardy@gmail.com>

Automerge-Triggered-By: GH:Fidget-Spinner
2021-09-17 19:11:51 -07:00
Brett Cannon
e1bdecb6dc
[3.10] bpo-45183: don't raise an exception when calling zipimport.zipimporter.find_spec() when the zip file is missing and the internal cache has been reset (GH-28435) (#28438)
This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path).
(cherry picked from commit 209b7035f7)

Co-authored-by: Brett Cannon <brett@python.org>
2021-09-17 17:46:22 -07:00
Miss Islington (bot)
397dad4001
[doc] Clarify exception in multiprocessing.cpu_count (GH-23660) (GH-28433)
Previous wording didn't explain the slightly unintuitive behavior.

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 24dbe30f8d)

Co-authored-by: Emmanuel Arias <eamanu@yaerobi.com>
2021-09-18 01:19:00 +02:00
Miss Islington (bot)
8a5f14e5ba
Fix missing space with help for -m compileall -o (GH-27591) (GH-28430)
(cherry picked from commit 74cc2453ae)

Co-authored-by: Daniel Hahler <git@thequod.de>
2021-09-18 01:02:32 +02:00
Miss Islington (bot)
bba2332303
bpo-42038: fix description of returned list of lines (GH-27529) (GH-28428)
(cherry picked from commit aca0e08c5d)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-09-18 00:55:57 +02:00
Miss Islington (bot)
c4be7ca087
[doc] Add a missing apostrophe in a code example in venv.rst (GH-28391) (GH-28425)
(cherry picked from commit d22a700091)

Co-authored-by: Arkaprabha Chakraborty <chakrabortyarkaprabha998@gmail.com>
2021-09-18 00:18:03 +02:00
Miss Islington (bot)
21711d5341
bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422)
(cherry picked from commit 51ebb7f4f5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-17 12:16:03 -07:00
Miss Islington (bot)
a10726d314
bpo-45217: adds note that allow_no_value in configparser is optional (GH-28396) (GH-28418)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit cb07838ab7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-17 15:10:28 +02:00
Miss Islington (bot)
5a5684a14b
bpo-45187: Collect test_socket tests using unittest (GH-28317)
Previously, test classes ISOTPTest, J1939Test, BasicUDPLITETest and
UDPLITETimeoutTest were not included in the list of tests and
were not run by regrtest.
(cherry picked from commit 0361335b80)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-17 03:34:46 -07:00
Serhiy Storchaka
ce59ac9362
[3.10] bpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361) (GH-28409)
tearDown() is not called if setUp() raises an exception
(including SkipTest). addCleanup() should be used for guaranteed
execution of the cleanup code.
(cherry picked from commit 7dacb70485)
2021-09-17 13:11:28 +03:00
Miss Islington (bot)
62c74f34e7
bpo-45228: Fix stack buffer overflow in parsing J1939 address (GH-28404)
(cherry picked from commit 773319545b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-17 02:09:29 -07:00
Miss Islington (bot)
ed28b92e92
Fix typo and add a module prefix (GH-28401)
(cherry picked from commit 80d9ff1648)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-16 22:12:37 -07:00
Miss Islington (bot)
f798cef8aa
bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building (GH-28393) (GH-28394)
(cherry picked from commit f4b94b1f57)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-09-16 22:47:09 +03:00
Miss Islington (bot)
e2856859f6
docs: correct references to __isub__ etc (GH-28297)
(cherry picked from commit 800bd01b6d)

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-09-16 03:10:10 -07:00
Miss Islington (bot)
de4c9c0bdc
bpo-45167: Fix deepcopying of GenericAlias (GH-28324) (GH-28367)
(cherry picked from commit 5dce51a887)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-15 21:35:16 +02:00
Miss Islington (bot)
17000b5a80
bpo-45205: Make test_compileall quiet (GH-28356) (GH-28370)
Make test_compileall quiet: test_year_2038_mtime_compilation() and
test_larger_than_32_bit_times() of test_compileall no longer log
"Compiling ..." messages to stdout.
(cherry picked from commit cc057ff522)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-15 21:31:59 +02:00
Miss Islington (bot)
bbaf5c27e6
bpo-45207: Make test_gdb.test_pycfunction() quiet (GH-28355) (GH-28365)
test_gdb.test_pycfunction() now ignores gdb stderr, it no longer logs
messages like:

    Function "meth_varargs" not defined.
(cherry picked from commit 84a6061e29)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-15 21:10:33 +02:00
Miss Islington (bot)
87f0ac8c1d
bpo-45089: Improve sqlite3 trace callback docs (GH-28238) (GH-28371)
- Add link to str object and sqlite3 transaction control
- Mention that exceptions are not propagated
(cherry picked from commit 51056b40e7)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-09-15 21:00:02 +02:00
Miss Islington (bot)
0e4f913da8
bpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354) (GH-28363)
test_pdb.test_checkline_is_not_executable() no longer writes output
to stdout.

Remove also unused variables 'f'.
(cherry picked from commit e08e491a6c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-15 20:56:32 +02:00
Miss Islington (bot)
a5bc0ffc52
bpo-45193: News for IDLE PR_28343 (GH-28348)
(cherry picked from commit 9d76d28867)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-15 11:46:48 -07:00
Łukasz Langa
2563dd2d0a
[3.10] bpo-34602: Quadruple stack size on macOS when compiling with UBSAN (GH-27309) (GH-28280)
(cherry picked from commit be9de8721d)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-15 20:34:57 +02:00
Miss Islington (bot)
89966f59c2
bpo-44786: Fix a warning in RE in c-analyzer (GH-28351) (GH-28353)
(cherry picked from commit 1a9ef57985)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-15 19:43:25 +03:00
Miss Islington (bot)
ececa53b7f
bpo-45195: Fix test_readline.test_nonascii() (GH-28329) (GH-28333)
Fix test_readline.test_nonascii(): sometimes, the newline character
is not written at the end, so don't expect it in the output.
(cherry picked from commit 797c8eb9ef)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-15 14:38:49 +02:00
Miss Islington (bot)
0c64569ac7
bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
The line that should not have been needed on macOS tk 8.6.8 but was,
should not be a problem on Ubuntu, but is.  It is not needed on macOS
tk 8.6.11, installed with 3.10.  Disable it but leave it for
now in case some system needs it.
(cherry picked from commit 1afc7b3219)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-15 00:37:35 -07:00
Miss Islington (bot)
8a9396cf1d
bpo-45020: Don't test IDLE with frozen module. (GH-28344)
Otherwise, test would need special import.
(cherry picked from commit 369bf949cc)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-15 00:33:32 -07:00
Miss Islington (bot)
dda5ff2d09
bpo-4356: Mention the new key arguments for the bisect module APIs in the 3.10 What's new (GH-28339) (GH-28340)
(cherry picked from commit 1aaa859497)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-09-14 21:02:18 +01:00
Miss Islington (bot)
be200c3c6e
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
(cherry picked from commit b668cdfa09)

Co-authored-by: junyixie <xiejunyi.arch@bytedance.com>
2021-09-14 11:58:19 -07:00
Miss Islington (bot)
fd74d2680e
bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300) (GH-28326)
Fixes infinite loop on unittest.mock.seal() of mocks created by
unittest.create_autospec().

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
(cherry picked from commit 7f60c9e1c6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-09-14 13:00:16 +02:00
Miss Islington (bot)
a390bb6d66
bpo-42135 Correct version slated for importlib.find_loader removal (GH-28312) (GH-28321)
importlib.find_loader should also be slated for 3.12 like the others in GH-25169 and as documented in https://docs.python.org/3.11/whatsnew/3.10.htmlGH-deprecated.
(cherry picked from commit 9f93018b69)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-09-13 16:33:05 -07:00
Miss Islington (bot)
06c26f4d29
bpo-35474: Fix mimetypes.guess_all_extensions() potentially mutating list (GH-28286) (GH-28289)
* Calling guess_all_extensions() with strict=False potentially
  mutated types_map_inv.
* Mutating the result of guess_all_extensions() mutated types_map_inv.
(cherry picked from commit 97ea18eced)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-13 19:24:29 +02:00
Miss Islington (bot)
2f1d9bca14
bpo-45182: Fix incorrect use of requires_zlib in test_bdist_rpm (GH-28305)
It is a decorator factory and should be always followed by "()".
(cherry picked from commit 9260e67398)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-13 04:34:58 -07:00
Erlend Egeberg Aasland
aa6dd54d43
[3.10] bpo-45126: Fix ref. leak in sqlite3.Connection.__init__ (GH-28231). (GH-28298) 2021-09-13 12:16:01 +09:00