]> granicus.if.org Git - python/log
python
5 years agobpo-36670: regrtest bug fixes (GH-16537)
Miss Islington (bot) [Wed, 2 Oct 2019 11:54:18 +0000 (04:54 -0700)]
bpo-36670: regrtest bug fixes (GH-16537)

* Fix TestWorkerProcess.__repr__(): start_time is only valid
  if _popen is not None.
* Fix _kill(): don't set _killed to True if _popen is None.
* _run_process(): only set _killed to False after calling
  run_test_in_subprocess().
(cherry picked from commit 2ea71a07d0a720707094ee55f78fd232c40724bc)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-38343: Fixes version handling for nuget packages (GH-16527)
Miss Islington (bot) [Wed, 2 Oct 2019 00:00:49 +0000 (17:00 -0700)]
bpo-38343: Fixes version handling for nuget packages (GH-16527)

(cherry picked from commit b9a8b8296cd7be22f8b5bf92af686a788c47c7bf)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoCorrect typos in the codecs module documentation (GH-15135)
Miss Islington (bot) [Tue, 1 Oct 2019 21:02:29 +0000 (14:02 -0700)]
Correct typos in the codecs module documentation (GH-15135)

(cherry picked from commit 891e9e3b44c99d643dc309a4e63082451271b136)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
5 years agoPost v3.8.0rc1
Łukasz Langa [Tue, 1 Oct 2019 20:49:40 +0000 (22:49 +0200)]
Post v3.8.0rc1

5 years agov3.8.0rc1 v3.8.0rc1
Łukasz Langa [Tue, 1 Oct 2019 12:58:26 +0000 (14:58 +0200)]
v3.8.0rc1

5 years ago[3.8] bpo-3832: Fix compiler warnings (GH-16518)
Victor Stinner [Tue, 1 Oct 2019 11:52:00 +0000 (13:52 +0200)]
[3.8] bpo-3832: Fix compiler warnings (GH-16518)

* bpo-38321: Fix _asynciomodule.c compiler warning (GH-16493)

bpo-38248, bpo-38321: Fix warning:

    modules\_asynciomodule.c(2667):
    warning C4102: 'set_exception': unreferenced label

The related goto has been removed by
commit edad4d89e357c92f70c0324b937845d652b20afd.

(cherry picked from commit efe74b6369a8d08f27c69703fcc1686966e51068)

* bpo-38321: Fix PyCStructUnionType_update_stgdict() warning (GH-16492)

bpo-22273, bpo-38321: Fix following warning:

    modules\_ctypes\stgdict.c(704):
    warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data

(cherry picked from commit c9a413ede47171a224c72dd34122005170caaad4)

5 years agobpo-36670: Multiple regrtest bugfixes (GH-16511)
Miss Islington (bot) [Tue, 1 Oct 2019 10:47:52 +0000 (03:47 -0700)]
bpo-36670: Multiple regrtest bugfixes (GH-16511)

* Windows: Fix counter name in WindowsLoadTracker. Counter names are
  localized: use the registry to get the counter name. Original
  change written by Lorenz Mende.
* Regrtest.main() now ensures that the Windows load tracker is also
  killed if an exception is raised
* TestWorkerProcess now ensures that worker processes are no longer
  running before exiting: kill also worker processes when an
  exception is raised.
* Enhance regrtest messages and warnings: include test name,
  duration, add a worker identifier, etc.
* Rename MultiprocessRunner to TestWorkerProcess
* Use print_warning() to display warnings.

Co-Authored-By: Lorenz Mende <Lorenz.mende@gmail.com>
(cherry picked from commit 982bfa4da07b2e5749a0f4e68f99e972bcc3a549)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)
Miss Islington (bot) [Tue, 1 Oct 2019 10:26:04 +0000 (03:26 -0700)]
bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)

PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no
longer return PyStatus: they cannot fail anymore.
(cherry picked from commit 8462a4936b3a551dc546a6adea04a70b0a07ca67)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size (GH-16491...
Miss Islington (bot) [Tue, 1 Oct 2019 07:55:02 +0000 (00:55 -0700)]
bpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size (GH-16491) (#16506)

(cherry picked from commit 94e165096fd65e8237e60de570fb609604ab94c9)

Co-authored-by: Giampaolo Rodola <g.rodola@gmail.com>
5 years agoRestore tp_clear for function object. (#16502)
Neil Schemenauer [Tue, 1 Oct 2019 07:49:36 +0000 (00:49 -0700)]
Restore tp_clear for function object. (#16502)

This is a revert of the revert (GH-15826).  Having a tp_clear for
functions should be safe (and helpful) now that bpo-38006 has been
fixed.

5 years agoFix and improve `asyncio.run()` docs (GH-16403) (GH-16504)
Miss Islington (bot) [Tue, 1 Oct 2019 01:46:43 +0000 (18:46 -0700)]
Fix and improve `asyncio.run()` docs (GH-16403) (GH-16504)

(cherry picked from commit e407013089259e4c0b271703e1975bbcd578a2d5)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-38304: Remove PyConfig.struct_size (GH-16500)
Victor Stinner [Mon, 30 Sep 2019 22:46:42 +0000 (00:46 +0200)]
bpo-38304: Remove PyConfig.struct_size (GH-16500)

For now, we'll rely on the fact that the config structures aren't covered by the stable ABI.

We may revisit this in the future if we further explore the idea of offering a stable embedding API.

5 years agoClear weakrefs in garbage found by the GC (GH-16495) (#16499)
Miss Islington (bot) [Mon, 30 Sep 2019 17:27:46 +0000 (10:27 -0700)]
Clear weakrefs in garbage found by the GC (GH-16495) (#16499)

Fix a bug due to the interaction of weakrefs and the cyclic garbage
collector. We must clear any weakrefs in garbage in order to prevent
their callbacks from executing and causing a crash.
(cherry picked from commit bcda460baf25062ab68622b3f043f52b9db4d21d)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
5 years agobpo-38322: Fix gotlandmark() of PC/getpathp.c (GH-16490)
Victor Stinner [Mon, 30 Sep 2019 12:49:42 +0000 (14:49 +0200)]
bpo-38322: Fix gotlandmark() of PC/getpathp.c (GH-16490)

Write the filename into a temporary buffer instead of reusing prefix.
The problem is that join() modifies prefix inplace. If prefix is not
normalized, join() can make prefix shorter and so gotlandmark()
does modify prefix instead of returning it unmodified.

5 years agobpo-38304: Fix PyConfig usage in python_uwp.cpp (GH-16488)
Victor Stinner [Mon, 30 Sep 2019 10:53:17 +0000 (12:53 +0200)]
bpo-38304: Fix PyConfig usage in python_uwp.cpp (GH-16488)

* Set PyPreConfig.struct_size and PyConfig.struct_size as required by
  the API.
* PyPreConfig_InitPythonConfig() can now fail: check PyStatus result.

5 years ago[3.8] bpo-38270: More fixes for strict crypto policy (GH-16418) (#16437)
Christian Heimes [Mon, 30 Sep 2019 07:10:38 +0000 (09:10 +0200)]
[3.8] bpo-38270: More fixes for strict crypto policy (GH-16418) (#16437)

test_hmac and test_hashlib test built-in hashing implementations and
OpenSSL-based hashing implementations. Add more checks to skip OpenSSL
implementations when a strict crypto policy is active.

Use EVP_DigestInit_ex() instead of EVP_DigestInit() to initialize the
EVP context. The EVP_DigestInit() function clears alls flags and breaks
usedforsecurity flag again.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38270.
(cherry picked from commit 90558158093c0ad893102158fd3c2dd9f864e82e)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389...
Miss Islington (bot) [Mon, 30 Sep 2019 07:06:28 +0000 (00:06 -0700)]
bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389) (#16465)

(cherry picked from commit c5a7e0ce194c0eafe82eb3e431881012398e7d46)

Co-authored-by: Pascal Chambon <pythoniks@gmail.com>
5 years agobpo-30773: Fix ag_running; prohibit running athrow/asend/aclose in parallel (GH-7468...
Miss Islington (bot) [Mon, 30 Sep 2019 06:19:02 +0000 (23:19 -0700)]
bpo-30773: Fix ag_running; prohibit running athrow/asend/aclose in parallel (GH-7468) (#16486)

(cherry picked from commit fc4a044a3c54ce21e9ed150f7d769fb479d34c49)

Co-authored-by: Yury Selivanov <yury@magic.io>
5 years agobpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) (#16485)
Yury Selivanov [Mon, 30 Sep 2019 05:30:17 +0000 (22:30 -0700)]
bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) (#16485)

See https://bugs.python.org/issue38242 for more details

5 years ago[3.8] bpo-38163: Child mocks detect their type as sync or async (GH-16471) (GH-16484)
Lisa Roach [Mon, 30 Sep 2019 05:22:44 +0000 (22:22 -0700)]
[3.8] bpo-38163: Child mocks detect their type as sync or async (GH-16471) (GH-16484)

5 years agobpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443) (GH-16481)
Miss Islington (bot) [Mon, 30 Sep 2019 04:23:33 +0000 (21:23 -0700)]
bpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443) (GH-16481)

5 years agobpo-38108: Makes mock objects inherit from Base (GH-16060) (GH-16470)
Miss Islington (bot) [Mon, 30 Sep 2019 04:02:46 +0000 (21:02 -0700)]
bpo-38108: Makes mock objects inherit from Base (GH-16060) (GH-16470)

5 years agobpo-38317: Fix PyConfig.warnoptions priority (GH-16478)
Miss Islington (bot) [Sun, 29 Sep 2019 23:58:57 +0000 (16:58 -0700)]
bpo-38317: Fix PyConfig.warnoptions priority (GH-16478)

Fix warnings options priority: PyConfig.warnoptions has the highest
priority, as stated in the PEP 587.

* Document options order in PyConfig.warnoptions documentation.
* Make PyWideStringList_INIT macro private: replace "Py" prefix
  with "_Py".
* test_embed: add test_init_warnoptions().
(cherry picked from commit fb4ae152a9930f0e00cae8b2807f534058cf341a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe (GH...
Miss Islington (bot) [Sun, 29 Sep 2019 12:20:15 +0000 (05:20 -0700)]
bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe (GH-16472)

(cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) (GH-16464)
Gregory P. Smith [Sat, 28 Sep 2019 15:22:00 +0000 (08:22 -0700)]
bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) (GH-16464)

Document that lnotab can contain invalid bytecode offsets (because of
terrible reasons that are difficult to fix). Make dis.findlinestarts()
ignore invalid offsets in lnotab. All other uses of lnotab in CPython
(various reimplementations of addr2line or line2addr in Python, C and gdb)
already ignore this, because they take an address to look for, instead.

Add tests for the result of dis.findlinestarts() on wacky constructs in
test_peepholer.py, because it's the easiest place to add them.

(cherry picked from commit c8165036f374cd2ee64d4314eeb2514f7acb5026)

5 years agobpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding...
Miss Islington (bot) [Sat, 28 Sep 2019 14:23:34 +0000 (07:23 -0700)]
bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)

* bpo-38216: Allow bypassing input validation

* bpo-36274: Also allow the URL encoding to be overridden.

* bpo-38216, bpo-36274: Add tests demonstrating a hook for overriding validation, test demonstrating override encoding, and a test to capture expectation of the interface for the URL.

* Call with skip_host to avoid tripping on the host checking in the URL.

* Remove obsolete comment.

* Make _prepare_path_encoding its own attr.

This makes overriding just that simpler.

Also, don't use the := operator to make backporting easier.

* Add a news entry.

* _prepare_path_encoding -> _encode_prepared_path()

* Once again separate the path validation and request encoding, drastically simplifying the behavior. Drop the guarantee that all processing happens in _prepare_path.
(cherry picked from commit 7774d7831e8809795c64ce27f7df52674581d298)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-38304: Add PyConfig.struct_size (GH-16451) (GH-16453)
Victor Stinner [Sat, 28 Sep 2019 02:50:43 +0000 (04:50 +0200)]
bpo-38304: Add PyConfig.struct_size (GH-16451) (GH-16453)

Add a new struct_size field to PyPreConfig and PyConfig structures to
allow to modify these structures in the future without breaking the
backward compatibility.

* Replace private _config_version field with public struct_size field
  in PyPreConfig and PyConfig.
* Public PyPreConfig_InitIsolatedConfig() and
  PyPreConfig_InitPythonConfig()
  return type becomes PyStatus, instead of void.
* Internal _PyConfig_InitCompatConfig(),
  _PyPreConfig_InitCompatConfig(), _PyPreConfig_InitFromConfig(),
  _PyPreConfig_InitFromPreConfig() return type becomes PyStatus,
  instead of void.
* Remove _Py_CONFIG_VERSION
* Update the Initialization Configuration documentation.

(cherry picked from commit 441b10cf2855955c86565f8d59e72c2efc0f0a57)

5 years agobpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (...
Miss Islington (bot) [Sat, 28 Sep 2019 02:20:31 +0000 (19:20 -0700)]
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (#16449)

(cherry picked from commit 52d1b86bde2b772a76919c76991c326384954bf1)

Co-authored-by: Jesús Cea <jcea@jcea.es>
5 years ago[3.8] bpo-38136: Updates await_count and call_count to be different things (GH-16192...
Lisa Roach [Fri, 27 Sep 2019 22:44:34 +0000 (15:44 -0700)]
[3.8] bpo-38136: Updates await_count and call_count to be different things (GH-16192) (GH-16431)

5 years agobpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
Miss Islington (bot) [Fri, 27 Sep 2019 20:19:41 +0000 (13:19 -0700)]
bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)

Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agobpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)
Miss Islington (bot) [Fri, 27 Sep 2019 11:18:24 +0000 (04:18 -0700)]
bpo-38206: Clarify tp_dealloc requirements for heap allocated types. (GH-16248)

As mentioned in the bpo ticket, this mistake came up on two reviews:
- https://github.com/python/cpython/pull/16127GH-pullrequestreview-288312751
- https://github.com/python/cpython/pull/16071GH-pullrequestreview-287819525

Would be nice to have it documented in a more permanent place than 3.8's whatsnew entry.

https://bugs.python.org/issue38206

Automerge-Triggered-By: @encukou
(cherry picked from commit 5faff977adbe089e1f91a5916ccb2160a22dd292)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
5 years agocleanup ababstractproperty in typing.py (GH-16432)
Miss Islington (bot) [Fri, 27 Sep 2019 08:13:38 +0000 (01:13 -0700)]
cleanup ababstractproperty in typing.py (GH-16432)

(cherry picked from commit 6ce03ec627680ce0829a5b3067fab7faed21b533)

Co-authored-by: HongWeipeng <961365124@qq.com>
5 years ago[3.8] bpo-38275: Skip ssl tests for disabled versions (GH-16386) (GH-16425)
Christian Heimes [Thu, 26 Sep 2019 20:53:09 +0000 (22:53 +0200)]
[3.8] bpo-38275: Skip ssl tests for disabled versions (GH-16386) (GH-16425)

test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto
policy and run-time settings are recognized and tests for disabled versions
are skipped.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38275
(cherry picked from commit df6ac7e2b82d921a6e9ff5571b40c6dbcf635581)

5 years agobpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422)
Miss Islington (bot) [Thu, 26 Sep 2019 15:13:39 +0000 (08:13 -0700)]
bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422)

(cherry picked from commit 64b4a3a2deabcd4103fac2759a311fe94159b4d1)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years ago[3.8] bpo-38234: Backport init path config changes from master (GH-16423)
Victor Stinner [Thu, 26 Sep 2019 14:17:34 +0000 (16:17 +0200)]
[3.8] bpo-38234: Backport init path config changes from master (GH-16423)

* bpo-38234: Py_SetPath() uses the program full path (GH-16357)

Py_SetPath() now sets sys.executable to the program full path
(Py_GetProgramFullPath()), rather than to the program name
(Py_GetProgramName()).

Fix also memory leaks in pathconfig_set_from_config().

(cherry picked from commit 1ce152a42eaa917d7763bce93f1e1ca72530d7ca)

* bpo-38234: Add tests for Python init path config (GH-16358)

(cherry picked from commit bb6bf7d342b4503a6227fd209fac934905b6a1aa)

* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)

Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed
to test pyvenv.cfg and pybuilddir.txt configuration files.

Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8
encoding, not ASCII.

(cherry picked from commit 52ad33abbfb6637d74932617c7013bae0ccf6e32)

* bpo-38234: Cleanup getpath.c (GH-16367)

* search_for_prefix() directly calls reduce() if found is greater
  than 0.
* Add calculate_pybuilddir() subfunction.
* search_for_prefix(): add path string buffer for readability.
* Fix some error handling code paths: release resources on error.
* calculate_read_pyenv(): rename tmpbuffer to filename.
* test.pythoninfo now also logs windows.dll_path

(cherry picked from commit 221fd84703c545408bbb4a6e0b58459651331f5c)

* bpo-38234: Fix test_embed pathconfig tests (GH-16390)

bpo-38234: On macOS and FreeBSD, the temporary directory can be
symbolic link. For example, /tmp can be a symbolic link to /var/tmp.
Call realpath() to resolve all symbolic links.

(cherry picked from commit 00508a7407d7d300b487532e2271534b20e378a7)

* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)

* Add test_embed.test_init_setpath_config(): test Py_SetPath()
  with PyConfig.
* test_init_setpath() and test_init_setpythonhome() no longer call
  Py_SetProgramName(), but use the default program name.
* _PyPathConfig: isolated, site_import  and base_executable
  fields are now only available on Windows.
* If executable is set explicitly in the configuration, ignore
  calculated base_executable: _PyConfig_InitPathConfig() copies
  executable to base_executable.
* Complete path config documentation.

(cherry picked from commit 8bf39b606ef7b02c0279a80789f3c4824b0da5e9)

* bpo-38234: Complete init config documentation (GH-16404)

(cherry picked from commit 88feaecd46a8f427e30ef7ad8cfcddfe392a2402)

* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)

Explicitly preinitializes with a Python preconfiguration to avoid
Py_SetPath() implicit preinitialization with a compat
preconfiguration.

Fix also test_init_setpath() and test_init_setpythonhome() on macOS:
use self.test_exe as the executable (and base_executable), rather
than shutil.which('python3').

(cherry picked from commit 49d99f01e6e51acec5ca57a02e857f0796bc418b)

* bpo-38234: Py_Initialize() sets global path configuration (GH-16421)

* Py_InitializeFromConfig() now writes PyConfig path configuration to
  the global path configuration (_Py_path_config).
* Add test_embed.test_get_pathconfig().
* Fix typo in _PyWideStringList_Join().

(cherry picked from commit 12f2f177fc483723406d7917194e7f655a20631b)

5 years agobpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH...
Miss Islington (bot) [Thu, 26 Sep 2019 09:16:38 +0000 (02:16 -0700)]
bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16415)

Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
(cherry picked from commit 1ad7be2f16cc9955f271f57a5089602bb41eee85)

Co-authored-by: Mohammad Dehghan <md.unicorn@gmail.com>
5 years agoDoc: Use the `with` statement in the first example of the ftplib doc. (GH-16271)...
Miss Islington (bot) [Thu, 26 Sep 2019 07:12:39 +0000 (00:12 -0700)]
Doc: Use the `with` statement in the first example of the ftplib doc. (GH-16271) (GH-16412)

(cherry picked from commit 5d326abf2cb4891b78d9319a81bffb3974b5b745)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
5 years ago[3.8] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16409)
Benjamin Peterson [Thu, 26 Sep 2019 04:57:14 +0000 (21:57 -0700)]
[3.8] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16409)

Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes.
(cherry picked from commit 52b940803860e37bcc3f6096b2d24e7c20a0e807)

5 years ago[3.8] bpo-22273: Changed conditions for ctypes array-in-struct handling. (GH-16381...
Vinay Sajip [Wed, 25 Sep 2019 21:41:02 +0000 (22:41 +0100)]
[3.8] bpo-22273: Changed conditions for ctypes array-in-struct handling. (GH-16381) (GH-16401)

(cherry picked from commit c64af8fad3c4f5751af624647fbb0ce023f525dc)

5 years agobpo-38271: encrypt private key test files with AES256 (GH-16385)
Miss Islington (bot) [Wed, 25 Sep 2019 16:13:54 +0000 (09:13 -0700)]
bpo-38271: encrypt private key test files with AES256 (GH-16385)

The private keys for test_ssl were encrypted with 3DES in traditional
PKCSGH-5 format. 3DES and the digest algorithm of PKCSGH-5 are blocked by
some strict crypto policies. Use PKCSGH-8 format with AES256 encryption
instead.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38271

Automerge-Triggered-By: @tiran
(cherry picked from commit bfd0c963d88f3df69489ee250655e2b8f3d235bd)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-38005: Remove support of string argument in InterpreterID(). (GH-16227)
Miss Islington (bot) [Wed, 25 Sep 2019 15:56:05 +0000 (08:56 -0700)]
bpo-38005: Remove support of string argument in InterpreterID(). (GH-16227)

Make negative interpreter id to raise ValueError instead of RuntimeError.
(cherry picked from commit 543a3951a1c96bae0ea839eacec71d3b1a563a10)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years ago[3.8] bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382) (GH-16393)
Miss Islington (bot) [Wed, 25 Sep 2019 15:50:31 +0000 (08:50 -0700)]
[3.8] bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382) (GH-16393)

Make it easier to run and test Python on systems with restrict crypto policies:

* add requires_hashdigest to test.support to check if a hash digest algorithm is available and working
* avoid MD5 in test_hmac
* replace MD5 with SHA256 in test_tarfile
* mark network tests that require MD5 for MD5-based digest auth or CRAM-MD5

https://bugs.python.org/issue38270
(cherry picked from commit c64a1a61e6fc542cada40eb069a239317e1af36e)

Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38270

Automerge-Triggered-By: @tiran
5 years agobpo-38255: super() can search attributes as well as methods (GH-16368) (GH-16391)
Miss Islington (bot) [Wed, 25 Sep 2019 15:24:12 +0000 (08:24 -0700)]
bpo-38255: super() can search attributes as well as methods (GH-16368) (GH-16391)

Improvement suggested by Géry Ogam.
(cherry picked from commit 15ccc4fac09b866d61b069c6c136aabfe4bac09c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-36210: correct logic in setup.py for optional extensions for AIX (GH-12202) ...
Michael Felt [Wed, 25 Sep 2019 14:14:09 +0000 (15:14 +0100)]
bpo-36210: correct logic in setup.py for optional extensions for AIX (GH-12202) (GH-16376)

5 years agobpo-37064: Skip test_tools.test_pathfix if installed (GH-15705) (GH-16389)
Victor Stinner [Wed, 25 Sep 2019 14:12:32 +0000 (16:12 +0200)]
bpo-37064: Skip test_tools.test_pathfix if installed (GH-15705) (GH-16389)

If Python is installed, skip test_tools.test_pathfix test because
Tools/scripts/pathfix.py script is not installed.

(cherry picked from commit 3f43ceff186da09978d0aff257bb18b8ac7611f7)

5 years agobpo-37064: Add -k and -a options to pathfix.py tool (GH-16387)
Victor Stinner [Wed, 25 Sep 2019 13:22:40 +0000 (15:22 +0200)]
bpo-37064: Add -k and -a options to pathfix.py tool (GH-16387)

* bpo-37064: Add option -k to Tools/scripts/pathfix.py (GH-15548)

Add flag -k to pathscript.py script: preserve shebang flags.

(cherry picked from commit 50254ac4c179cb412e90682098c97db786143929)

* bpo-37064: Add option -a to pathfix.py tool (GH-15717)

Add option -a to Tools/Scripts/pathfix.py script: add flags.

(cherry picked from commit 1dc1acbd73f05f14c974b7ce1041787d7abef31e)

5 years agobpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) (GH-16383)
Miss Islington (bot) [Wed, 25 Sep 2019 11:48:52 +0000 (04:48 -0700)]
bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) (GH-16383)

(cherry picked from commit edad4d89e357c92f70c0324b937845d652b20afd)

Co-authored-by: Yury Selivanov <yury@edgedb.com>
5 years agobpo-38260: Add Docs on asyncio.run (GH-16337)
Miss Islington (bot) [Wed, 25 Sep 2019 09:12:47 +0000 (02:12 -0700)]
bpo-38260: Add Docs on asyncio.run (GH-16337)

Add docs about return and raise exception on asyncio.run

https://bugs.python.org/issue38260

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 17deb16883fa574a86e42551cc37f044182347ad)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
5 years agobpo-22273: Update ctypes to correctly handle arrays in small structur… (GH-15839...
Miss Islington (bot) [Wed, 25 Sep 2019 04:10:20 +0000 (21:10 -0700)]
bpo-22273: Update ctypes to correctly handle arrays in small structur… (GH-15839) (GH-16370)

(cherry picked from commit 12f209eccb1587e8c98057d9c5f865c21f4a16c1)

5 years ago[3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) (GH-16364)
Miss Islington (bot) [Wed, 25 Sep 2019 00:29:17 +0000 (17:29 -0700)]
[3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) (GH-16364)

The fix in PR 13261 handled the underlying issue about the spec for specific methods not being applied correctly, but it didn't fix the issue that was causing the misleading error message.

The code currently grabs a list of responses from _call_matcher (which may include exceptions). But it doesn't reach inside the list when checking if the result is an exception. This results in a misleading error message when one of the provided calls does not match the spec.

https://bugs.python.org/issue36871

Automerge-Triggered-By: @gpshead
(cherry picked from commit b5a7a4f0c20717a4c92c371583b5521b83f40f32)

Co-authored-by: Samuel Freilich <sfreilich@google.com>
https://bugs.python.org/issue36871

Automerge-Triggered-By: @gpshead
5 years agobpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
Miss Islington (bot) [Tue, 24 Sep 2019 12:39:47 +0000 (05:39 -0700)]
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)

Multiprocessing test test_mymanager() now also expects -SIGTERM, not
only exitcode 0.

bpo-30356: BaseManager._finalize_manager() sends SIGTERM to the
manager process if it takes longer than 1 second to stop, which
happens on slow buildbots.
(cherry picked from commit b0e1ae5f5430433766e023c1a6936aeba0f2b84e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348)
Miss Islington (bot) [Tue, 24 Sep 2019 11:07:28 +0000 (04:07 -0700)]
bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348)

Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc()
timeout from 1 to 60 seconds.
(cherry picked from commit 99799c722065d0524f3ab0bc455e1938bb8dc60f)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agocloses bpo-16637: libpython: construct integer object directly from gdbvalue (GH...
Miss Islington (bot) [Tue, 24 Sep 2019 03:52:50 +0000 (20:52 -0700)]
closes bpo-16637: libpython: construct integer object directly from gdbvalue (GH-15232)

This fixes the exception '`ValueError: invalid literal for int() with base 10`
if `str(gdbval)` returns a hexadecimal value (e.g. '0xa0'). This is the case if
the output-radix is set to 16 in gdb. See
https://sourceware.org/gdb/onlinedocs/gdb/Numbers.html for more information.
(cherry picked from commit 6f53d34fb0f944a8c0ee530334c353559ac40f72)

Co-authored-by: Marc Hartmayer <marc1006@users.noreply.github.com>
5 years agocloses bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230)
Miss Islington (bot) [Tue, 24 Sep 2019 02:41:06 +0000 (19:41 -0700)]
closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230)

(cherry picked from commit 4346bad3321699d49a45e3446270b57726ab5c8f)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agobpo-38234: read_pth_file() now returns PyStatus (GH-16338)
Miss Islington (bot) [Mon, 23 Sep 2019 23:16:53 +0000 (16:16 -0700)]
bpo-38234: read_pth_file() now returns PyStatus (GH-16338)

Refactor path configuration code:

* read_pth_file() now returns PyStatus to report errors, rather than
  calling Py_FatalError().
* Move argv0_path and zip_path buffers out of PyCalculatePath
  structures.
* On Windows, _PyPathConfig.home is now preferred over PyConfig.home.
(cherry picked from commit 85ce0a7178801b538160cbb5cf9ef50a713c45bf)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-38234: Fix _PyConfig_InitPathConfig() (GH-16335) (GH-16336)
Victor Stinner [Mon, 23 Sep 2019 17:50:27 +0000 (19:50 +0200)]
bpo-38234: Fix _PyConfig_InitPathConfig() (GH-16335) (GH-16336)

* _PyConfig_InitPathConfig() now starts by copying the global path
  configuration, and then override values set in PyConfig.
* _PyPathConfig_Calculate() implementations no longer override
  _PyPathConfig fields which are already computed. For example,
  if _PyPathConfig.prefix is not NULL, leave it unchanged.
* If Py_SetPath() has been called, _PyConfig_InitPathConfig() doesn't
  call _PyPathConfig_Calculate() anymore.
* _PyPathConfig_Calculate() no longer uses PyConfig,
  except to initialize PyCalculatePath structure.
* pathconfig_calculate(): remove useless temporary
  "_PyPathConfig new_config" variable.
* calculate_module_search_path(): remove hack to workaround memory
  allocation failure, call Py_FatalError() instead.
* Fix get_program_full_path(): handle memory allocation failure.

(cherry picked from commit 9c42f8cda552694f3b47d6388d4ae84d61731872)

5 years agobpo-38236: Dump path config at first import error (GH-16300) (GH-16332)
Victor Stinner [Mon, 23 Sep 2019 13:59:00 +0000 (15:59 +0200)]
bpo-38236: Dump path config at first import error (GH-16300) (GH-16332)

Python now dumps path configuration if it fails to import the Python
codecs of the filesystem and stdio encodings.

(cherry picked from commit fcdb027234566c4d506d6d753c7d5638490fb088)

5 years agoUpdated incorrect level-setting code to use setLevel(). (GH-16325) (GH-16327)
Miss Islington (bot) [Sun, 22 Sep 2019 03:26:37 +0000 (20:26 -0700)]
Updated incorrect level-setting code to use setLevel(). (GH-16325) (GH-16327)

(cherry picked from commit 1d094af716e8ce5e5710e1dfbce7832ba333be55)

5 years agobpo-38237: Shorter docstring (GH-16322) (GH-16323)
Miss Islington (bot) [Sat, 21 Sep 2019 20:32:07 +0000 (13:32 -0700)]
bpo-38237: Shorter docstring (GH-16322) (GH-16323)

(cherry picked from commit b104ecbbafc14f9ca0c8371963c45dca893f6b75)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-38237: Let pow() support keyword arguments (GH-16302) (GH-16320)
Miss Islington (bot) [Sat, 21 Sep 2019 08:22:29 +0000 (01:22 -0700)]
bpo-38237: Let pow() support keyword arguments (GH-16302) (GH-16320)

Backported with release manager approval

5 years ago[3.8] bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) (GH...
Lisa Roach [Sat, 21 Sep 2019 06:00:04 +0000 (23:00 -0700)]
[3.8] bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) (GH-16299)

(cherry picked from commit 8b03f943c37e07fb2394acdcfacd066647f9b1fd)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
5 years agoDoc: Fix spelling errors of 'initial' in enum.py (GH-16314)
Miss Islington (bot) [Sat, 21 Sep 2019 05:41:35 +0000 (22:41 -0700)]
Doc: Fix spelling errors of 'initial' in enum.py (GH-16314)

(cherry picked from commit bb16fb2cb8dca1fa1d67621c3175793eda7dbdc2)

Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
5 years agoDoc: Remove provisional note for asyncio.run() (GH-16310) (GH-16311)
Miss Islington (bot) [Sat, 21 Sep 2019 05:29:09 +0000 (22:29 -0700)]
Doc: Remove provisional note for asyncio.run() (GH-16310) (GH-16311)

Based on a comment from @asvetlov https://github.com/python/cpython/pull/15735GH-discussion_r323619076, this removes the provisional note for ``asyncio.run()`` in the documentation.

Automerge-Triggered-By: @1st1
(cherry picked from commit 77af2290e594479002aa7d8f914d1f38b14a4854)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agoMinor code and comment cleanup (GH-16315) (GH-16316)
Miss Islington (bot) [Sat, 21 Sep 2019 05:18:10 +0000 (22:18 -0700)]
Minor code and comment cleanup (GH-16315) (GH-16316)

(cherry picked from commit 7ce4bfa8cfcc78d03e164f2de64a2caad1d919af)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years ago[3.8] bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298) (GH...
Victor Stinner [Sat, 21 Sep 2019 00:13:14 +0000 (02:13 +0200)]
[3.8] bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298) (GH-16313)

* bpo-38234: Remove _PyPathConfig.dll_path (GH-16307)

The DLL path is not computed from any user configuration and cannot
be configured by PyConfig. Instead, add a new _Py_dll_path global variable.

Remove _PyConfig_SetPathConfig(): replaced with _PyPathConfig_Init().

Py_Initialize() now longer sets the "global path configuration",
but only initialize _Py_dll_path.

(cherry picked from commit c422167749f92d4170203e996a2c619c818335ea)

* bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298)

* If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
  uses its value.
* Py_Initialize() now longer copies path configuration from PyConfig
  to the global path configuration (_Py_path_config).

(cherry picked from commit e267793aa4101b2771ed0e66aaff5743d23f59af)

5 years agobpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) (GH-16306)
Victor Stinner [Fri, 20 Sep 2019 21:36:32 +0000 (23:36 +0200)]
bpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) (GH-16306)

(cherry picked from commit b1542583bee204130934c2b90684041e29378250)

5 years agobpo-33694: Remove test_asyncio ProactorDatagramTransportTests (GH-16288)
Miss Islington (bot) [Fri, 20 Sep 2019 21:27:28 +0000 (14:27 -0700)]
bpo-33694: Remove test_asyncio ProactorDatagramTransportTests (GH-16288)

ProactorDatagramTransportTests tests are too close to the
implementation.
(cherry picked from commit bc2256ea177a653bcab15b06b5f5725b10c1fff3)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439)
Miss Islington (bot) [Fri, 20 Sep 2019 15:26:27 +0000 (08:26 -0700)]
bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439)

Mention frame.f_trace in sys.settrace docs, as well as the fact you still
need to call `sys.settrace` to enable the tracing machinery before setting
`frame.f_trace` will have any effect.
(cherry picked from commit 9c2682efc69568e1b42a0c1759489d6f2e3b30ea)

Co-authored-by: Ram Rachum <ram@rachum.com>
5 years agobpo-37353: Updated parser note about source code compatibility(GH-14277)
Miss Islington (bot) [Fri, 20 Sep 2019 14:03:21 +0000 (07:03 -0700)]
bpo-37353: Updated parser note about source code compatibility(GH-14277)

(cherry picked from commit 062cfe3b11c61d03ccc2915e360f9b0d80e23642)

Co-authored-by: Prateek Nayak <45075669+Kriyszig@users.noreply.github.com>
5 years agobpo-37531: sync regrtest with master branch (GH-16285)
Victor Stinner [Thu, 19 Sep 2019 16:05:09 +0000 (18:05 +0200)]
bpo-37531: sync regrtest with master branch (GH-16285)

5 years agoFix _PyTraceMalloc_Fini() definition (GH-16259) (GH-16278)
Miss Islington (bot) [Thu, 19 Sep 2019 06:41:35 +0000 (23:41 -0700)]
Fix _PyTraceMalloc_Fini() definition (GH-16259) (GH-16278)

The function return type is void, not int.
(cherry picked from commit d299b8b47d9dbea8fec2c2abcb6c32ad32f5f4d1)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agoDoc: Clarify dict equality irrespective of ordering. (GH-16266)
Miss Islington (bot) [Thu, 19 Sep 2019 05:58:42 +0000 (22:58 -0700)]
Doc: Clarify dict equality irrespective of ordering. (GH-16266)

(cherry picked from commit 3171d67a6aaf7fe88685b3a80644f0284686ef63)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
5 years ago[3.8] bpo-38218: Doc: Corrected syntax for return annotation (GH-16265) (GH-16274)
Miss Islington (bot) [Thu, 19 Sep 2019 05:42:57 +0000 (22:42 -0700)]
[3.8] bpo-38218: Doc: Corrected syntax for return annotation (GH-16265) (GH-16274)

Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038fe843e1193d795eb58fd5931b44be5a96)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
5 years agobpo-38203: faulthandler.dump_traceback_later() is always available (GH-16260)
Victor Stinner [Wed, 18 Sep 2019 12:37:02 +0000 (14:37 +0200)]
bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16260)

dump_traceback_later() and cancel_dump_traceback_later() functions of
the faulthandler module are always available since Python 3.7.

5 years ago[3.8] bpo-38070: Py_FatalError() logs runtime state (GH-16258)
Victor Stinner [Wed, 18 Sep 2019 12:10:16 +0000 (14:10 +0200)]
[3.8] bpo-38070: Py_FatalError() logs runtime state (GH-16258)

* bpo-38070: _Py_DumpTraceback() writes <no Python frame> (GH-16244)

When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "<no Python frame>", rather than
writing nothing.

(cherry picked from commit 8fa3e1740b3f03ea65ddb68411c2238c5f98eec2)

* bpo-38070: Enhance _PyObject_Dump() (GH-16243)

_PyObject_Dump() now dumps the object address for freed objects and
objects with ob_type=NULL.

(cherry picked from commit b39afb78768418d9405c4b528c80fa968ccc974d)

* bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245)

Add _PyRuntimeState.preinitializing field: set to 1 while
Py_PreInitialize() is running.

_PyRuntimeState: rename also pre_initialized field to preinitialized.

(cherry picked from commit d3b904144e86e2442961de6a7dccecbe133d5c6d)

* bpo-38070: Py_FatalError() logs runtime state (GH-16246)

(cherry picked from commit 1ce16fb0977283ae42a9f8917bbca5f44aa69324)

5 years agobpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234)
Miss Islington (bot) [Wed, 18 Sep 2019 10:36:15 +0000 (03:36 -0700)]
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234)

A little change on first paragraph of python tutorial to be more clearly

https://bugs.python.org/issue37904

Automerge-Triggered-By: @ericvsmith
(cherry picked from commit b57481318e3e3cbacd398b898f9849ec8f2d7eec)

Co-authored-by: Diego Alberto Barriga Martínez <diegobarriga@protonmail.com>
5 years agobpo-38191: Use positional-only parameters in TypedDict(). (GH-16240)
Serhiy Storchaka [Wed, 18 Sep 2019 06:08:01 +0000 (09:08 +0300)]
bpo-38191: Use positional-only parameters in TypedDict(). (GH-16240)

5 years agobpo-36546: No longer a need to make "data" positional only (GH-16252) (GH-16253)
Miss Islington (bot) [Wed, 18 Sep 2019 04:06:53 +0000 (21:06 -0700)]
bpo-36546: No longer a need to make "data" positional only (GH-16252) (GH-16253)

(cherry picked from commit 272d0d017aef585acf84bb0af99a90a2a8582b2c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222)
Miss Islington (bot) [Tue, 17 Sep 2019 18:41:55 +0000 (11:41 -0700)]
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222)

This includes such names as "cls", "self", "typename", "_typename",
"fields" and "_fields".
Passing positional arguments by keyword is deprecated.
(cherry picked from commit 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH...
Miss Islington (bot) [Tue, 17 Sep 2019 13:20:06 +0000 (06:20 -0700)]
bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070)

Even when the helper is not started yet.

This behavior follows conventional generator one.
There is no reason for `async_generator_athrow` to handle `gen.throw()` differently.

https://bugs.python.org/issue38013
(cherry picked from commit c275312a6284bd319ea33c9abd7e15c230eca43f)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16224)
Miss Islington (bot) [Tue, 17 Sep 2019 12:34:13 +0000 (05:34 -0700)]
bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16224)

When using multiprocesss (-jN), the main process now uses a timeout
of 60 seconds instead of the double of the --timeout value. The
buildbot server stops a job which does not produce any output in 1200
seconds.
(cherry picked from commit 46b0b81220a23bc4aee5ba3ba67e8cf1b5df7960)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agobpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)
Miss Islington (bot) [Tue, 17 Sep 2019 11:35:56 +0000 (04:35 -0700)]
bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)

In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock').
(cherry picked from commit 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa)

Co-authored-by: Abraham Toriz Cruz <awonderfulcode@gmail.com>
5 years agoDoc: Fix grammar/spelling in ssl.VERIFY_CRL_CHECK_LEAF docs (GH-16221)
Miss Islington (bot) [Tue, 17 Sep 2019 10:49:20 +0000 (03:49 -0700)]
Doc: Fix grammar/spelling in ssl.VERIFY_CRL_CHECK_LEAF docs (GH-16221)

(cherry picked from commit 219fb9d65ef7e5363eccc9dde0988bb085db1c86)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
5 years agobpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202)
Miss Islington (bot) [Tue, 17 Sep 2019 07:24:31 +0000 (00:24 -0700)]
bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202)

See https://bugs.python.org/issue38192 .

https://bugs.python.org/issue38192
(cherry picked from commit 5d359cc62e0244e1fd8d17146a4135079d6843bf)

Co-authored-by: Hrvoje Nikšić <hniksic@gmail.com>
5 years agobpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH...
Miss Islington (bot) [Tue, 17 Sep 2019 06:39:11 +0000 (23:39 -0700)]
bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190)

(cherry picked from commit f669581a9527afb0d2325f9845a86715c0ba365d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)
Miss Islington (bot) [Tue, 17 Sep 2019 06:23:12 +0000 (23:23 -0700)]
bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)

One happens when EditorWindow.close is called twice.
Printing a traceback, when IDLE is run from a terminal,
is useless and annoying.
(cherry picked from commit dfd34a9cd58e8150c324190f746de919e140abe8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155)
Miss Islington (bot) [Tue, 17 Sep 2019 06:14:20 +0000 (23:14 -0700)]
bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155)

(cherry picked from commit 8debfa50407107ff2329d01081cdc12d359f1d12)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agoDoc: Add list(dict) in stdtypes library (GH-16209) (GH-16210)
Miss Islington (bot) [Tue, 17 Sep 2019 05:05:33 +0000 (22:05 -0700)]
Doc: Add list(dict) in stdtypes library (GH-16209) (GH-16210)

(cherry picked from commit 63dedef48bba9d54f13b958237696505fa665796)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
5 years agobpo-38183: Test_idle ignores user config directory GH-16198)
Miss Islington (bot) [Tue, 17 Sep 2019 03:32:55 +0000 (20:32 -0700)]
bpo-38183: Test_idle ignores user config directory GH-16198)

It no longer tries to create or access .idlerc or any files within.
Users must run IDLE to discover problems with saving settings.
(cherry picked from commit 0048afc16a7e7301d5c565237db271505e5fbed9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-28556: Update the opening note in typing docs (GH-16204)
Miss Islington (bot) [Mon, 16 Sep 2019 22:11:10 +0000 (15:11 -0700)]
bpo-28556: Update the opening note in typing docs (GH-16204)

This PR replaces the old note mentioning that `typing` is a provisional module with a new one mentioning types are not enforced at runtime. I am not sure if there was any official announcement about making `typing` non-provisional, but _de-facto_ no new features were added during Python 3.7, and no backwards incompatible changes were made except for few small things that were considered bugs.
(cherry picked from commit 81528ba2e81c39f4d6bca5b785e818c7d08b8501)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
5 years agobpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)
Miss Islington (bot) [Mon, 16 Sep 2019 19:48:03 +0000 (12:48 -0700)]
bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)

``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``.

https://bugs.python.org/issue33936
(cherry picked from commit 724f1a57231f9287c37255adf0e4364d12cf693d)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agoDoc: Fix Wikipedia link for functools.lru_cache (GH-16183)
Miss Islington (bot) [Mon, 16 Sep 2019 18:55:04 +0000 (11:55 -0700)]
Doc: Fix Wikipedia link for functools.lru_cache (GH-16183)

(cherry picked from commit 336b3064d8981bc7f76c5cc6f6a0527df69771d6)

Co-authored-by: amist <amistern0@gmail.com>
5 years agobpo-38100: Fix spelling error in unittest.mock code (GH-16168)
Miss Islington (bot) [Mon, 16 Sep 2019 16:52:45 +0000 (09:52 -0700)]
bpo-38100: Fix spelling error in unittest.mock code (GH-16168)

(cherry picked from commit a9187c31185fe7ea47271839898416400cc3d976)

Co-authored-by: marcoramirezmx <55331462+marcoramirezmx@users.noreply.github.com>
5 years agoDoc: Add link of GNU Readline library to interpreter tutorial (GH-16152) (GH-16189)
Miss Islington (bot) [Mon, 16 Sep 2019 16:30:04 +0000 (09:30 -0700)]
Doc: Add link of GNU Readline library to interpreter tutorial (GH-16152) (GH-16189)

(cherry picked from commit f18242be16714da2cfe013dbadfaf2e31d971562)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
5 years agobpo-38081: Add more non-fatal error codes for ntpath.realpath (GH-16156)
Miss Islington (bot) [Mon, 16 Sep 2019 14:43:36 +0000 (07:43 -0700)]
bpo-38081: Add more non-fatal error codes for ntpath.realpath (GH-16156)

(cherry picked from commit 89b8933bb537179f81003928786c5cc6183af591)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184)
Miss Islington (bot) [Mon, 16 Sep 2019 14:40:19 +0000 (07:40 -0700)]
bpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184)

(cherry picked from commit 3ab73f6bbf4ff66e7ace3c4eab25461b5c7d71d4)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-38153: detect shake independently from sha3 (GH-16143)
Miss Islington (bot) [Mon, 16 Sep 2019 12:28:32 +0000 (05:28 -0700)]
bpo-38153: detect shake independently from sha3 (GH-16143)

XOF digests (SHAKE) are not available in OpenSSL 1.1.0 but SHA3 fixed-length digests are.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit eb2b0c694aef6122fdf95015abb24e0d095b6401)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-33095: Add reference to isolated mode in -m and script option (GH-7764)
Miss Islington (bot) [Mon, 16 Sep 2019 12:21:03 +0000 (05:21 -0700)]
bpo-33095: Add reference to isolated mode in -m and script option (GH-7764)

Attempt to make isolated mode easier to discover via additional inline documentation.

Co-Authored-By: Julien Palard <julien@palard.fr>
(cherry picked from commit bdd6945d4dbd1fe6a7fcff95f7d6908db7d791a1)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years ago[3.8] bpo-38153: Normalize hashlib algorithm names (GH-16083) (GH-16144)
Christian Heimes [Mon, 16 Sep 2019 12:08:55 +0000 (14:08 +0200)]
[3.8] bpo-38153: Normalize hashlib algorithm names (GH-16083) (GH-16144)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 995b5d38e7cc24cac3de8dfd516115f86b0bcf80)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agoDoc: remove duplicate word in controlflow tutorial (GH-16163)
Miss Islington (bot) [Mon, 16 Sep 2019 07:13:14 +0000 (00:13 -0700)]
Doc: remove duplicate word in controlflow tutorial (GH-16163)

(cherry picked from commit b7af4e75657e6478920d00260c48a1a3020002fc)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>