]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 years agobpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) (GH-13505)
Victor Stinner [Wed, 22 May 2019 21:28:28 +0000 (23:28 +0200)] 
bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) (GH-13505)

CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL
scheme in URLopener().open() and URLopener().retrieve()
of urllib.request.

Co-Authored-By: SH <push0ebp@gmail.com>
(cherry picked from commit 0c2b6a3943aa7b022e8eb4bfd9bffcddebf9a587)

6 years ago[3.7] bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) (GH-13502)
Jelle Zijlstra [Wed, 22 May 2019 16:28:39 +0000 (09:28 -0700)] 
[3.7] bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) (GH-13502)

A very simple fix. I found this while writing typeshed stubs for StreamRecoder.

https://bugs.python.org/issue33482.
(cherry picked from commit b3be4072888a4ce054993c2801802721466ea02d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
https://bugs.python.org/issue33482

6 years agobpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487)
Victor Stinner [Wed, 22 May 2019 16:23:28 +0000 (18:23 +0200)] 
bpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487)

PyErr_WriteUnraisable() now displays the exception even if displaying
the traceback failed. Moreover, hold a strong reference to sys.stderr
while using it.

Document that an exception must be set when calling
PyErr_WriteUnraisable(), but don't add an assertion to check it at
runtime.

Cleanup: use longer names for variables and create
write_unraisable_exc_file() subfunction.

6 years agobpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) (GH-13493)
Jeroen Demeyer [Wed, 22 May 2019 12:52:13 +0000 (14:52 +0200)] 
bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) (GH-13493)

6 years ago bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) ...
Erik Janssens [Wed, 22 May 2019 11:04:06 +0000 (13:04 +0200)] 
 bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) (GH-13471)

Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant.
Moreover, include windows.h on Windows, not only when MSC is used.

(cherry picked from commit 925af1d99b69bf3e229411022ad840c5a0cfdcf8)

6 years ago[3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469)
Miss Islington (bot) [Tue, 21 May 2019 19:05:08 +0000 (12:05 -0700)] 
[3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469)

Links creating an infinite symlink loop would raise an exception.
(cherry picked from commit d5c120f7eb6f2a9cdab282a5d588afed307a23df)

Co-authored-by: Jörg Stucke <joerg.stucke@fkie.fraunhofer.de>
https://bugs.python.org/issue36035

6 years ago[3.7] bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails...
Tal Einat [Tue, 21 May 2019 19:03:58 +0000 (22:03 +0300)] 
[3.7] bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails for Feb 29. (GH-10243)

(cherry picked from commit 56027ccd6b9dab4a090e4fef8574933fb9a36ff2)

Co-authored-by: Abhishek Kumar Singh <toanant@users.noreply.github.com>
6 years agobpo-36929: Modify io/re tests to allow for missing mod name (GH-13392)
Miss Islington (bot) [Tue, 21 May 2019 17:51:56 +0000 (10:51 -0700)] 
bpo-36929: Modify io/re tests to allow for missing mod name (GH-13392)

* bpo-36929: Modify io/re tests to allow for missing mod name

For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:

* Custom repr functions for those types (some of which ignore the
  tp_name in favor of using a string literal, such as _io.TextIOWrapper)
* Pickling error messages

The test suite only tests the former. This commit modifies the test
suite to allow Python implementations to omit the module prefix.

https://bugs.python.org/issue36929
(cherry picked from commit ccb7ca728e09b307f9e9fd36ec40353137e68a3b)

Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
6 years agobpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
Miss Islington (bot) [Tue, 21 May 2019 15:41:44 +0000 (08:41 -0700)] 
bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)

The script needs to be updated to support win 10/ 1803 chcp.com command (output has trailing dot)

https://bugs.python.org/issue34144
(cherry picked from commit 6955d44b41058e3bcc59ff41860bd4cc8948c441)

Co-authored-by: Lorenz Mende <Lorenz.mende@gmail.com>
6 years ago[3.7] bpo-22865: Expand on documentation for the pty.spawn function (GH-11980) (GH...
Geoff Shannon [Tue, 21 May 2019 09:36:58 +0000 (02:36 -0700)] 
[3.7] bpo-22865: Expand on documentation for the pty.spawn function (GH-11980) (GH-13455)

(cherry picked from commit 522ccef8690970fc4f78f51a3adb995f2547871a)

Co-authored-by: Geoff Shannon <earthlingzephyr@gmail.com>
6 years agobpo-36969: Make PDB args command display keyword only arguments (GH-13452)
Miss Islington (bot) [Mon, 20 May 2019 22:34:23 +0000 (15:34 -0700)] 
bpo-36969: Make PDB args command display keyword only arguments (GH-13452)

(cherry picked from commit bf457c7d8224179a023957876e757f2a7ffc3d9d)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
6 years agobpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553)
Miss Islington (bot) [Mon, 20 May 2019 12:35:56 +0000 (05:35 -0700)] 
bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553)

This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it.

https://bugs.python.org/issue35721
(cherry picked from commit 9932fd91e878b740704ff599522e945a4bbe2ae1)

Co-authored-by: Niklas Fiekas <niklas.fiekas@backscattering.de>
6 years agobpo-36958: In IDLE, print exit message (GH-13435)
Miss Islington (bot) [Mon, 20 May 2019 07:16:53 +0000 (00:16 -0700)] 
bpo-36958: In IDLE, print exit message (GH-13435)

Print any argument other than None or int passed to SystemExit
or sys.exit().
(cherry picked from commit 6d965b39b7a486dd9e96a60b19ee92382d668299)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agocloses bpo-36951: Correct some types in the type_members struct in typeobject.c....
Miss Islington (bot) [Mon, 20 May 2019 00:54:08 +0000 (17:54 -0700)] 
closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403)

(cherry picked from commit 53d378c81286644138415cb56da52a7351e1a477)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)
Miss Islington (bot) [Sun, 19 May 2019 22:36:32 +0000 (15:36 -0700)] 
bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)

The sqlite3.Connection object doesn't call its close() method when it's used
as a context manager.

(cherry picked from commit 287b84de939db47aa8c6f30734ceb8aba9d1db29)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
6 years agobpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914)
Miss Islington (bot) [Sun, 19 May 2019 16:28:38 +0000 (09:28 -0700)] 
bpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914)

(cherry picked from commit 7c59362a15dfce538512ff1fce4e07d33a925cfb)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
6 years agobpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094)
Miss Islington (bot) [Sun, 19 May 2019 14:26:35 +0000 (07:26 -0700)] 
bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094)

(cherry picked from commit f4e1babf44792bdeb0c01da96821ba0800a51fd8)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
6 years agoOrthographical fix (GH-13418)
Miss Islington (bot) [Sun, 19 May 2019 09:13:28 +0000 (02:13 -0700)] 
Orthographical fix (GH-13418)

Add a missing comma.
(cherry picked from commit 1d5bdef550d4395211fbe5f3c1444d7ea5bb54a2)

Co-authored-by: Boštjan Mejak <bostjan.xperia@gmail.com>
6 years agobpo-36783: Add new references for C API Documentation changes (GH-13204)
Miss Islington (bot) [Sun, 19 May 2019 02:12:01 +0000 (19:12 -0700)] 
bpo-36783: Add new references for C API Documentation changes (GH-13204)

(cherry picked from commit d28772ab6967fea136c0707f0207673ebad66f61)

Co-authored-by: Edison A <20975616+SimiCode@users.noreply.github.com>
6 years agoFixed typo (GH-11522)
Miss Islington (bot) [Sat, 18 May 2019 09:48:47 +0000 (02:48 -0700)] 
Fixed typo (GH-11522)

Given example does not run, loop variable is missing.

Secondly, this is bad example how to handle shutdown signal, because it would cause `RuntimeError: Event loop stopped before Future completed.`

Perhaps it would be better to cancel all tasks instead of closing loop directly?

Did not create issue, because question is quite simple.
(cherry picked from commit ceb842e155f5fa0109fa88d52da3d1f5e73490ad)

Co-authored-by: Alexander Vasin <hi@alvass.in>
6 years agobpo-36908: 'This module is always available' isn't helpful. (GH-13297)
Miss Islington (bot) [Fri, 17 May 2019 21:08:21 +0000 (14:08 -0700)] 
bpo-36908: 'This module is always available' isn't helpful. (GH-13297)

Makes the documentation of math and cmath module
more helpful for the beginners.
(cherry picked from commit 6faad355db6c2bd4a0ade7868f245b42c04f5337)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
6 years agobpo-33524: Fix the folding of email header when max_line_length is 0 or None (GH...
Miss Islington (bot) [Fri, 17 May 2019 20:47:12 +0000 (13:47 -0700)] 
bpo-33524: Fix the folding of email header when max_line_length is 0 or None (GH-13391)

and there are non-ascii characters in the header.
(cherry picked from commit feac6cd7753425fba006e97e2d9b74a0c0c75894)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
6 years ago[3.7] Fix typo in _PyMethodDef_RawFastCallKeywords error message (GH-13343) (GH-13385)
Stéphane Wirtel [Fri, 17 May 2019 11:34:47 +0000 (13:34 +0200)] 
[3.7] Fix typo in _PyMethodDef_RawFastCallKeywords error message (GH-13343) (GH-13385)

(cherry picked from commit a8b46944d72bba6dc76260ed61da5c78d3f9d9c0)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
6 years agoSimplify SSLSocket / SSLObject doc string (GH-9972) (GH-13384)
Miss Islington (bot) [Fri, 17 May 2019 11:29:35 +0000 (04:29 -0700)] 
Simplify SSLSocket / SSLObject doc string (GH-9972) (GH-13384)

Instead of maintaining the same docstring two times, let's copy common
docstrings from SSLObject methods and properties to SSLSocket.

(cherry picked from commit 80ed353329ef01ca6ab2056051fb999818a86215)

Co-authored-by: Christian Heimes <christian@python.org>
6 years agodocs 36789: resolve incorrect note regarding UTF-8 (GH-13111)
Miss Islington (bot) [Fri, 17 May 2019 11:01:47 +0000 (04:01 -0700)] 
docs 36789: resolve incorrect note regarding UTF-8 (GH-13111)

(cherry picked from commit f98c3c59c0930ee41175d8935f72bfeed5fee17a)

Co-authored-by: redshiftzero <jen@freedom.press>
6 years agobpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332)
Miss Islington (bot) [Fri, 17 May 2019 10:59:48 +0000 (03:59 -0700)] 
bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332)

Move the check for dead conditionals (if 0) to the peephole optimizer
and make sure that the code block is still compiled to report any
existing syntax errors within.
(cherry picked from commit af8646c8054d0f4180a2013383039b6a472f9698)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
6 years agobpo-35545: Fix asyncio discarding IPv6 scopes (GH-11271)
Miss Islington (bot) [Fri, 17 May 2019 09:05:19 +0000 (02:05 -0700)] 
bpo-35545: Fix asyncio discarding IPv6 scopes  (GH-11271)

This PR proposes a solution to [bpo-35545](https://bugs.python.org/issue35545) by adding an optional `flowinfo` and `scopeid` to `asyncio.base_events._ipaddr_info` to carry the full address information into `_ipaddr_info` and avoid discarding IPv6 specific information.

Changelog entry & regression tests to come.

https://bugs.python.org/issue35545
(cherry picked from commit ac8eb8f36bf7ca636f8d886eb65a3b532f4725d5)

Co-authored-by: Erwan Le Pape <lepaperwan@users.noreply.github.com>
6 years agoDoc: Add link threading.settrace to sys.settrace (GH-13345)
Miss Islington (bot) [Fri, 17 May 2019 09:02:51 +0000 (02:02 -0700)] 
Doc: Add link threading.settrace to sys.settrace (GH-13345)

(cherry picked from commit 245f528a92d7748dbd7acf9cba860153c143bbfe)

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
6 years agobpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)
Miss Islington (bot) [Fri, 17 May 2019 07:33:10 +0000 (00:33 -0700)] 
bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)

The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.

Co-Authored-By: Martin Panter <vadmium+py@gmail.com>
(cherry picked from commit 14514d9084a40f599c57da853a305aa264562a43)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779)
Steve Dower [Thu, 16 May 2019 16:41:36 +0000 (09:41 -0700)] 
bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779)

6 years agoFix typos in documentation. Patch by tirkarthi. (GH-13354)
Miss Islington (bot) [Thu, 16 May 2019 05:38:31 +0000 (22:38 -0700)] 
Fix typos in documentation.  Patch by tirkarthi. (GH-13354)

(cherry picked from commit 8a533ffb499b168ed4bdb707c9919290631e267d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agobpo-36015: Handle StreamHandler representaton of stream with an integer name (GH...
Miss Islington (bot) [Wed, 15 May 2019 18:06:29 +0000 (11:06 -0700)] 
bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908) (GH-13183)

(cherry picked from commit ca87eebb22d202c33f3317cbf85059cadc64fa9f)

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
6 years ago[3.7] bpo-36799: Fix typo in ctypes.rst (GH-13104) (GH-13341)
Stéphane Wirtel [Wed, 15 May 2019 15:53:25 +0000 (17:53 +0200)] 
[3.7] bpo-36799: Fix typo in ctypes.rst (GH-13104) (GH-13341)

(cherry picked from commit 133fc89ca)

Co-authored-by: Yavor Konstantinov <7553015+sehnsucht13@users.noreply.github.com>
6 years agoRevert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH...
Victor Stinner [Tue, 14 May 2019 20:29:54 +0000 (22:29 +0200)] 
Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" (GH-13328)

This reverts commit 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e.

6 years agobpo-33529, email: Fix infinite loop in email header encoding (GH-12020) (GH-13321)
Miss Islington (bot) [Tue, 14 May 2019 20:12:46 +0000 (13:12 -0700)] 
bpo-33529, email: Fix infinite loop in email header encoding (GH-12020) (GH-13321)

(cherry picked from commit c1f5667be1e3ec5871560c677402c1252c6018a6)

Co-authored-by: Krzysztof Wojcik <wojcikk2903@users.noreply.github.com>
6 years agobpo-36760: Clarify subprocess capture_output docs. (GH-13322)
Miss Islington (bot) [Tue, 14 May 2019 19:39:17 +0000 (12:39 -0700)] 
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)

Clarify how to capture stdout and stderr combined into one stream.
(cherry picked from commit e883091abf7ca84a88e956fe5202e75c53bd4128)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years agobpo-36915: regrtest always remove tempdir of worker processes (GH-13312)
Miss Islington (bot) [Tue, 14 May 2019 15:25:06 +0000 (08:25 -0700)] 
bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)

When using multiprocessing (-jN option), worker processes now create
their temporary directory inside the temporary directory of the
main process. So the main process is able to remove temporary
directories of worker processes even if they crash or when they are
killed by regrtest on KeyboardInterrupt (CTRL+c).

Rework also how multiprocessing arguments are parsed in main.py.
(cherry picked from commit 3c93153f7db5dd9b06f229e61978fd9199b3c097)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-32995 - Added context variable in glossary (GH-9741)
Miss Islington (bot) [Tue, 14 May 2019 12:24:42 +0000 (05:24 -0700)] 
bpo-32995 - Added context variable in glossary (GH-9741)

(cherry picked from commit c0a1a07c7e9814cad79cce3580c16284b2df7f52)

Co-authored-by: Vinodhini Balusamy <me.vinob@gmail.com>
6 years agobpo-36719: Fix regrtest MultiprocessThread (GH-13301) (GH-13303)
Miss Islington (bot) [Tue, 14 May 2019 12:12:49 +0000 (05:12 -0700)] 
bpo-36719: Fix regrtest MultiprocessThread (GH-13301) (GH-13303)

MultiprocessThread.kill() now closes stdout and stderr to prevent
popen.communicate() to hang.
(cherry picked from commit c923c3449f825021b13521b2380e67ba35a36f55)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-36845: validate integer network prefix when constructing IP networks (GH-13298)
Miss Islington (bot) [Tue, 14 May 2019 11:00:16 +0000 (04:00 -0700)] 
bpo-36845: validate integer network prefix when constructing IP networks (GH-13298)

(cherry picked from commit 5e48e3db6f5a937023e99d89cef8884d22bd8533)

Co-authored-by: Nicolai Moore <niconorsk@gmail.com>
6 years agobpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files....
Miss Islington (bot) [Tue, 14 May 2019 05:30:22 +0000 (22:30 -0700)] 
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) (#13234)

Extended attributes can only be set on user-writeable files, but shutil previously
first chmod()ed the destination file to the source's permissions and then tried to
copy xattrs. This will cause failures if attempting to copy read-only files with
xattrs, as occurs with Git clones on Lustre FS.
(cherry picked from commit 79efbb719383386051c72f2ee932eeca8e033e6b)

Co-authored-by: Olexa Bilaniuk <obilaniu@users.noreply.github.com>
6 years agoChanges to the documentation of normcase (GH-4725)
Miss Islington (bot) [Tue, 14 May 2019 02:21:25 +0000 (19:21 -0700)] 
Changes to the documentation of normcase (GH-4725)

(cherry picked from commit 32d1458b2e2e00eeb29022179eeb04b83fb7f3c4)

Co-authored-by: Kexuan Sun <me@kianasun.com>
6 years agobpo-34424: Handle different policy.linesep lengths correctly. (GH-8803)
Miss Islington (bot) [Tue, 14 May 2019 02:02:46 +0000 (19:02 -0700)] 
bpo-34424: Handle different policy.linesep lengths correctly. (GH-8803)

(cherry picked from commit 45b2f8893c1b7ab3b3981a966f82e42beea82106)

Co-authored-by: Jens Troeger <jenstroeger@users.noreply.github.com>
6 years agobpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
Miss Islington (bot) [Mon, 13 May 2019 19:41:31 +0000 (12:41 -0700)] 
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)

* Update timeit.rst
(cherry picked from commit 8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8)

Co-authored-by: Anders Hovmöller <boxed@killingar.net>
6 years agoDocs: Add bz2 usage examples (GH-13258)
Miss Islington (bot) [Mon, 13 May 2019 18:50:16 +0000 (11:50 -0700)] 
Docs: Add bz2 usage examples (GH-13258)

* Docs: Add bz2 usage examples

- Adds an "Examples of usage" section inspired by the one
  found in the gzip docs
- Corrects the descriptions for ``compresslevel`` and ``data``:
    - ``compresslevel`` must be an `int`, not any number.  For
      instance, passing a float will raise ``TypeError``
    - Notes that `data` must be bytes-like
(cherry picked from commit be6939fb02e65b56c45377940b339d150b124d05)

Co-authored-by: Brad <brad.solomon.1124@gmail.com>
6 years agobpo-36719: regrtest -jN no longer stops on crash (GH-13231)
Miss Islington (bot) [Mon, 13 May 2019 17:55:07 +0000 (10:55 -0700)] 
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)

"python3 -m test -jN ..." now continues the execution of next tests
when a worker process crash (CHILD_ERROR state). Previously, the test
suite stopped immediately. Use --failfast to stop at the first error.

Moreover, --forever now also implies --failfast.
(cherry picked from commit b0917df329ba14b7bc6fa782c1b61e7a2163af0b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years ago[3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (#13288)
Miss Islington (bot) [Mon, 13 May 2019 16:58:42 +0000 (09:58 -0700)] 
[3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (#13288)

Includes blurb fix in 85c69d5
(cherry picked from commit 4f098b35f58e911639f8e9adc393d5cf5c792e7f)

6 years ago[3.7] bpo-36895: document time.clock() has been removed in 3.8 (GH-13287)
Matthias Bussonnier [Mon, 13 May 2019 16:08:49 +0000 (09:08 -0700)] 
[3.7] bpo-36895: document time.clock() has been removed in 3.8 (GH-13287)

6 years agobpo-36903: Fix ResourceWarning in test_logging (GH-13283) (GH-13285)
Miss Islington (bot) [Mon, 13 May 2019 15:39:50 +0000 (08:39 -0700)] 
bpo-36903: Fix ResourceWarning in test_logging (GH-13283) (GH-13285)

(cherry picked from commit 2c10538d11fa9be9a1a9f21605861e10ec4fa207)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
6 years ago[3.7] bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org...
Stéphane Wirtel [Mon, 13 May 2019 13:48:50 +0000 (15:48 +0200)] 
[3.7] bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3) (GH-13120) (GH-13281)

https://bugs.python.org/issue34682
(cherry picked from commit 778a9107586e29421af3a08209cf0b557c1fe5bc)

Co-authored-by: divyag9 <divyam9@gmail.com>
6 years agobpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759) (GH-13077)
Miss Islington (bot) [Mon, 13 May 2019 13:03:10 +0000 (06:03 -0700)] 
bpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759) (GH-13077)

(cherry picked from commit cf48e55f7f7718482fa712552f0cbc0aea1c826f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
6 years agobpo-36791: Safer detection of integer overflow in sum(). (GH-13080)
Miss Islington (bot) [Sun, 12 May 2019 09:37:15 +0000 (02:37 -0700)] 
bpo-36791: Safer detection of integer overflow in sum(). (GH-13080)

(cherry picked from commit 29500737d45cbca9604d9ce845fb2acc3f531401)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years ago[3.7] bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145). (GH-13260)
Sanyam Khurana [Sun, 12 May 2019 03:53:02 +0000 (23:53 -0400)] 
[3.7] bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145). (GH-13260)

(cherry picked from commit 90fb04c1e23c0fddd438bd0f73e7c018cacef4bc)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
6 years ago[3.7] bpo-34408: Prevent a null pointer dereference and resource leakage in `PyInterp...
Pablo Galindo [Fri, 10 May 2019 20:16:19 +0000 (21:16 +0100)] 
[3.7] bpo-34408: Prevent a null pointer dereference and resource leakage in `PyInterpreterState_New()` (GH-8767) (GH-13237)

* A pointer in `PyInterpreterState_New()` could have been `NULL` when being dereferenced.

* Memory was leaked in `PyInterpreterState_New()` when taking some error-handling code path.
(cherry picked from commit 95d630e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
6 years agobpo-33071: remove outdated PyPI docs (GH-13087)
Miss Islington (bot) [Fri, 10 May 2019 08:50:54 +0000 (01:50 -0700)] 
bpo-33071: remove outdated PyPI docs (GH-13087)

Patch by Kojo Idrissa.
(cherry picked from commit 1b4abcf302ff2c8f4d4881294510d48ba5186b53)

Co-authored-by: Kojo Idrissa <kojoidrissa@users.noreply.github.com>
6 years ago[3.7] bpo-10536: Enhancements to gettext docs (GH-10324) (GH-13224)
Miss Islington (bot) [Thu, 9 May 2019 20:26:09 +0000 (13:26 -0700)] 
[3.7] bpo-10536: Enhancements to gettext docs (GH-10324) (GH-13224)

(cherry picked from commit 55f3317e984cc35bd18ba0326ed98766a2750ffd)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
https://bugs.python.org/issue10536

6 years ago[3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13197)
Gregory P. Smith [Wed, 8 May 2019 21:13:09 +0000 (16:13 -0500)] 
[3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13197)

We updated the server, our testsuite must match.

https://bugs.python.org/issue36816

✈️ CLE -> DEN ✈️ #pycon2019 #beyonce
(cherry picked from commit 6bd81734de0b73f1431880d6a75fb71bcbc65fa1)

Authored-by: Gregory P. Smith <greg@krypto.org>
https://bugs.python.org/issue36816

6 years agobpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)
Miss Islington (bot) [Wed, 8 May 2019 16:34:12 +0000 (09:34 -0700)] 
bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)

Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized.
Changed multiple instances.
(cherry picked from commit 85225b6a58a516c50c055d5114668ed2fcdcda8c)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
6 years agoDoc: Be explicit that Pathlib resolve was strict before 3.6. (GH-11316)
Miss Islington (bot) [Wed, 8 May 2019 15:26:23 +0000 (08:26 -0700)] 
Doc: Be explicit that Pathlib resolve was strict before 3.6. (GH-11316)

(cherry picked from commit 1d4b16051f8550fd7dada3670a3e83ae13b99d3b)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years ago[3.7] Doc: Fix missing bracket (GH-13163) (GH-13189)
Miss Islington (bot) [Wed, 8 May 2019 14:07:02 +0000 (07:07 -0700)] 
[3.7] Doc: Fix missing bracket (GH-13163) (GH-13189)

(cherry picked from commit 70b80541bb044e8cb7037acaf97f64890fef418e)

Co-authored-by: Zhaorong Ma <mazhaorong@gmail.com>
6 years agobpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)
Miss Islington (bot) [Tue, 7 May 2019 21:48:35 +0000 (14:48 -0700)] 
bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)

https://bugs.python.org/issue36801
(cherry picked from commit 1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
6 years agoAdd a footnote about Cheese Shop in Doc/tutorial (GH-13103) (GH-13174)
Miss Islington (bot) [Tue, 7 May 2019 20:59:20 +0000 (13:59 -0700)] 
Add a footnote about Cheese Shop in Doc/tutorial (GH-13103) (GH-13174)

(cherry picked from commit e19a91e45fd54a56e39c2d12e6aaf4757030507f)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
6 years ago[3.7] bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704) (GH-13170)
Gregory P. Smith [Tue, 7 May 2019 20:29:41 +0000 (16:29 -0400)] 
[3.7] bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704) (GH-13170)

Instead of attempting to acquire and release them all across fork
which was leading to deadlocks in some applications that had chained
their own handlers while holding multiple locks.
(cherry picked from commit 64aa6d2000665efb1a2eccae176df9520bf5f5e6)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google LLC]
6 years agobpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)
Miss Islington (bot) [Tue, 7 May 2019 19:38:00 +0000 (12:38 -0700)] 
bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)

When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregisters the callback from the inner future when the outer
future is cancelled.

https://bugs.python.org/issue35125
(cherry picked from commit b35acc5b3a0148c5fd4462968b310fb436726d5a)

Co-authored-by: Romain Picard <romain.picard@oakbits.com>
6 years agobpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)
Miss Islington (bot) [Tue, 7 May 2019 17:45:53 +0000 (10:45 -0700)] 
bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)

*Moved from python/asyncioGH-493.*

This PR fixes issue python/asyncioGH-480, as explained in [this comment](https://github.com/python/asyncio/issues/480GH-issuecomment-278703828).

The `_SelectorDatagramTransport.sendto` method has to be modified ~~so `_sock.sendto` is used in all cases (because it is tricky to reliably tell if the socket is connected or not). Could that be an issue for connected sockets?~~ *EDIT* ... so `_sock.send` is used only if `_sock` is connected.

It also protects `socket.getsockname` against `OSError` in `_SelectorTransport`. This might happen on Windows if the socket is not connected (e.g. for UDP broadcasting).

https://bugs.python.org/issue31922
(cherry picked from commit 63deaa5b70108ef441c57728322da6b4321db4fc)

Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
6 years ago[3.7] bpo-11001: updated cookie docs (GH-13086) (GH-13161)
Miss Islington (bot) [Tue, 7 May 2019 17:32:45 +0000 (10:32 -0700)] 
[3.7] bpo-11001: updated cookie docs (GH-13086) (GH-13161)

Used **spookylukey**'s patch from 2011-01-24

https://bugs.python.org/issue11001
(cherry picked from commit 91cc01f40eec03ece2d6b04ad9ea786e77707d8d)

Co-authored-by: Julia Iliuk <julia.iluyk@gmail.com>
https://bugs.python.org/issue11001

6 years agobpo-28795: Signal documentation: Fix misleading statement. (GH-13121)
Miss Islington (bot) [Tue, 7 May 2019 15:55:39 +0000 (08:55 -0700)] 
bpo-28795: Signal documentation: Fix misleading statement. (GH-13121)

(cherry picked from commit e85ef7a7eacdef2f43e6bf2e67f335100e7ef2da)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years agobpo-30458: Disallow control chars in http URLs. (GH-12755) (GH-13154)
Miro Hrončok [Tue, 7 May 2019 15:28:47 +0000 (17:28 +0200)] 
bpo-30458: Disallow control chars in http URLs. (GH-12755) (GH-13154)

Disallow control chars in http URLs in urllib.urlopen.  This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.

Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.

Use http.client.InvalidURL instead of ValueError as the new error case's exception. (GH-13044)

Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>

6 years agobpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDate...
Miss Islington (bot) [Tue, 7 May 2019 15:17:50 +0000 (08:17 -0700)] 
bpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold (GH-13147)

(cherry picked from commit 5765ecf79fcee987f2f97c246c64b494324dfd33)

Co-authored-by: Edison A <20975616+SimiCode@users.noreply.github.com>
6 years agobpo-31855: unittest.mock.mock_open() results now respects the argument of read([size...
Miss Islington (bot) [Tue, 7 May 2019 12:34:48 +0000 (05:34 -0700)] 
bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) (#13152)

unittest.mock.mock_open() results now respects the argument of read([size])

Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
(cherry picked from commit 11a8832c98b3db78727312154dd1d3ba76d639ec)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
6 years agobpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124)
Miss Islington (bot) [Tue, 7 May 2019 03:51:25 +0000 (20:51 -0700)] 
bpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124)

Modern Linux distros such as Debian Buster have default OpenSSL system
configurations that reject connections to servers with weak certificates
by default.  This causes our test suite run with external networking
resources enabled to skip these tests when they encounter such a failure.

Fixing the network servers is a separate issue.
(cherry picked from commit 2cc0223f43a1ffd59c887a73e2b0ce5202f3be90)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years ago[3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136)
penguindustin [Mon, 6 May 2019 20:55:19 +0000 (16:55 -0400)] 
[3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136)

(cherry picked from commit 964663089547ca110199e23867b46b07ff4be88c)

Co-authored-by: penguindustin <penguindustin@gmail.com>
https://bugs.python.org/issue36766

6 years ago[3.7] Clarify the download unit in the download section (GH-13122) (GH-13130)
Miss Islington (bot) [Mon, 6 May 2019 19:32:52 +0000 (12:32 -0700)] 
[3.7] Clarify the download unit in the download section (GH-13122) (GH-13130)

(cherry picked from commit e9b49d1b4eec21f2da838db3360f6458cf648c36)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
6 years agobpo-36275: enhance documentation for venv.create() (GH-13114)
Miss Islington (bot) [Mon, 6 May 2019 19:25:59 +0000 (12:25 -0700)] 
bpo-36275: enhance documentation for venv.create() (GH-13114)

(cherry picked from commit 3921b1cc34c2fc8b8b480c19a95ec306de710fdd)

Co-authored-by: Sebastian Koslowski <sebastian.koslowski@gmail.com>
6 years agobpo-30668: add missing word in license.rst (GH-13115)
Miss Islington (bot) [Mon, 6 May 2019 19:08:10 +0000 (12:08 -0700)] 
bpo-30668: add missing word in license.rst (GH-13115)

(cherry picked from commit 4920c093da8a3061faea62d62f2ddf0c5c443360)

Co-authored-by: Patrick Mühlbauer <tmuxbiene@googlemail.com>
6 years agosimplify StartupImportTests (GH-13096)
Miss Islington (bot) [Sun, 5 May 2019 09:25:16 +0000 (02:25 -0700)] 
simplify StartupImportTests (GH-13096)

_osx_support and copyreg are not imported from site on macOS for now.
(cherry picked from commit c4d92c8ada7ecfc479ebb1dd4a819c9202155970)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
6 years agobpo-36189: Fixing typo in tutorial introduction (GH-13093)
Miss Islington (bot) [Sun, 5 May 2019 03:22:34 +0000 (20:22 -0700)] 
bpo-36189: Fixing typo in tutorial introduction (GH-13093)

(cherry picked from commit 98a1e06c47f655c7601b130cf8d549de9f08369e)

Co-authored-by: Jonatan <jonyucra@gmail.com>
6 years agobpo-36166: Change to rst datamodel file. (GH-13089) (#13094)
Miss Islington (bot) [Sun, 5 May 2019 03:21:28 +0000 (20:21 -0700)] 
bpo-36166: Change to rst datamodel file. (GH-13089) (#13094)

(cherry picked from commit 5e98f05e55d13981c7c92fb14b9c013e4227c3c1)

Co-authored-by: Catherine Alvarado <catherine@qventus.com>
6 years agobpo-36613: call remove_done_callback if exception (GH-12800)
Miss Islington (bot) [Fri, 3 May 2019 15:35:52 +0000 (08:35 -0700)] 
bpo-36613: call remove_done_callback if exception (GH-12800)

Call remove_done_callback() in finally block.

https://bugs.python.org/issue36613
(cherry picked from commit c1964e9e2177eabe821f3e4243be8b99e0d2d542)

Co-authored-by: gescheit <gescheit12@gmail.com>
6 years agobpo:34848 : Correct an incorrect docstring for range().index method (GH-9877)
Miss Islington (bot) [Fri, 3 May 2019 12:39:17 +0000 (05:39 -0700)] 
bpo:34848 : Correct an incorrect  docstring for range().index method (GH-9877)

(cherry picked from commit 22c526394b2ef51b985873ddbfbcc32c16411919)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
6 years ago [3.7] bpo-34162: Fix idlelib/NEWS.text for 3.7.4 (#13067)
Terry Jan Reedy [Thu, 2 May 2019 19:34:01 +0000 (15:34 -0400)] 
 [3.7] bpo-34162: Fix idlelib/NEWS.text for 3.7.4  (#13067)

6 years ago[3.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH...
Miss Islington (bot) [Thu, 2 May 2019 19:29:06 +0000 (12:29 -0700)] 
[3.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH-13060)

(cherry picked from commit c4e78b116f9a4299f3b3bfbbd18ef49782bb1143)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-35726: Add test for QueueHandler with multiple handlers (GH-11659) (GH-13061)
Miss Islington (bot) [Thu, 2 May 2019 17:24:01 +0000 (10:24 -0700)] 
bpo-35726: Add test for QueueHandler with multiple handlers (GH-11659) (GH-13061)

(cherry picked from commit 2dad96013ca24abdc5ba5a369ea42d70ff02487a)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
6 years ago[3.7] bpo-35726: Prevented QueueHandler formatting from affecting other handlers...
Xtreak [Thu, 2 May 2019 17:02:43 +0000 (22:32 +0530)] 
[3.7] bpo-35726: Prevented QueueHandler formatting from affecting other handlers (GH-11537) (GH-12716)

QueueHandler.prepare() now makes a copy of the record before modifying and enqueueing it, to avoid affecting other handlers in the chain.
(cherry picked from commit da6424e96ada72c15c91bddb0a411acf7119e10a)

Co-authored-by: Manjusaka <lizheao940510@gmail.com>
6 years agoChange bisect to bisect_cmd in docstring (GH-13040)
Miss Islington (bot) [Thu, 2 May 2019 03:10:12 +0000 (20:10 -0700)] 
Change bisect to bisect_cmd in docstring (GH-13040)

(cherry picked from commit 11e4a941e9c6225776a986b05230a1963e83f4fb)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
6 years agobpo-27682: Handle client connection terminations in wsgiref (GH-9713)
Miss Islington (bot) [Wed, 1 May 2019 17:52:40 +0000 (10:52 -0700)] 
bpo-27682: Handle client connection terminations in wsgiref (GH-9713)

(cherry picked from commit 3d37ea25dc97e4cb024045581979570835deb13c)

Co-authored-by: Petter Strandmark <petter.strandmark@gmail.com>
6 years agobpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)
Miss Islington (bot) [Tue, 30 Apr 2019 21:30:44 +0000 (14:30 -0700)] 
bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)

Initialize "stack_t current_stack" to zero using memset().
(cherry picked from commit b84cb70880a0acfcbbaca7bcda405af08f94d269)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)
Miss Islington (bot) [Tue, 30 Apr 2019 12:21:02 +0000 (05:21 -0700)] 
bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)

(cherry picked from commit d537ab0ff9767ef024f26246899728f0116b1ec3)

Co-authored-by: Steve Dower <steve.dower@python.org>
6 years agocloses bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)
Miss Islington (bot) [Tue, 30 Apr 2019 02:26:00 +0000 (19:26 -0700)] 
closes bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)

(cherry picked from commit ee0309f3d83ab9ffa02542bcf45ece84f4fb265e)

Co-authored-by: Utkarsh Gupta <guptautkarsh2102@gmail.com>
6 years agobpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)
Miss Islington (bot) [Mon, 29 Apr 2019 19:27:36 +0000 (12:27 -0700)] 
bpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)

Under some conditions the earlier fix for bpo-18075, "Infinite recursion
tests triggering a segfault on Mac OS X", now causes failures on macOS
when attempting to change stack limit with resource.setrlimit
resource.RLIMIT_STACK, like regrtest does when running the test suite.
The reverted change had specified a non-default stack size when linking
the python executable on macOS.  As of macOS 10.14.4, the previous
code causes a hard failure when running tests, although similar
failures had been seen under some conditions under some earlier
systems.  For now, revert the original change and resume using
the default stack size when linking the interpreter.
(cherry picked from commit 883dfc668f9730b00928730035b5dbd24b9da2a0)

Co-authored-by: Ned Deily <nad@python.org>
6 years agobpo-35952: Sync test.pythoninfo from master (GH-13009)
Victor Stinner [Mon, 29 Apr 2019 13:20:27 +0000 (15:20 +0200)] 
bpo-35952: Sync test.pythoninfo from master (GH-13009)

6 years agobpo-36745: Fix a possible reference leak in PyObject_SetAttr() (GH-12993)
Miss Islington (bot) [Sun, 28 Apr 2019 13:17:40 +0000 (06:17 -0700)] 
bpo-36745: Fix a possible reference leak in PyObject_SetAttr() (GH-12993)

https://bugs.python.org/issue36745
(cherry picked from commit e0dcb85b7d64153d1741698c04a6736c9669603a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-2091: Fix typo in exception message (GH-12987)
Miss Islington (bot) [Sat, 27 Apr 2019 20:39:06 +0000 (13:39 -0700)] 
bpo-2091: Fix typo in exception message (GH-12987)

(cherry picked from commit 21a9ba1992775b5a833da28bfa0a9f028d1b6761)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
6 years agoSyntax highlight IDLE html doc code example. (GH-12981) 12984/head
Miss Islington (bot) [Sat, 27 Apr 2019 03:42:05 +0000 (20:42 -0700)] 
Syntax highlight IDLE html doc code example. (GH-12981)

The new markup is currently ignored by IDLE's tk doc display.
(cherry picked from commit 55d035113dfb1bd90495c8571758f504ae8d4802)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years ago[3.7] bpo-36679: Rename duplicate test_class_getitem function (GH-12892) (GH-12978)
Ivan Levkivskyi [Sat, 27 Apr 2019 01:21:45 +0000 (18:21 -0700)] 
[3.7] bpo-36679: Rename duplicate test_class_getitem function (GH-12892) (GH-12978)

(cherry picked from commit d437012cdd4a38b5b3d05f139d5f0a28196e4769)

Co-authored-by: Windson yang <wiwindson@outlook.com>
6 years agobpo-31525: Increase minimum sqlite version number check (GH-12923) 12975/head
Miss Islington (bot) [Fri, 26 Apr 2019 16:15:31 +0000 (09:15 -0700)] 
bpo-31525: Increase minimum sqlite version number check (GH-12923)

(cherry picked from commit ad0daf5b374dc43540d4ffcf32ca30e5c5147b90)

Co-authored-by: Charles Pigott <charlespigott@googlemail.com>
6 years ago[3.7] bpo-36719: sync regrtest with master branch (GH-12967)
Victor Stinner [Fri, 26 Apr 2019 10:16:30 +0000 (12:16 +0200)] 
[3.7] bpo-36719: sync regrtest with master branch (GH-12967)

* Clean up code which checked presence of os.{stat,lstat,chmod} (GH-11643)

(cherry picked from commit 8377cd4fcd0d51d86834c9b0518d29aac3b49e18)

* bpo-36725: regrtest: add TestResult type (GH-12960)

* Add TestResult and MultiprocessResult types to ensure that results
  always have the same fields.
* runtest() now handles KeyboardInterrupt
* accumulate_result() and format_test_result() now takes a TestResult
* cleanup_test_droppings() is now called by runtest() and mark the
  test as ENV_CHANGED if the test leaks support.TESTFN file.
* runtest() now includes code "around" the test in the test timing
* Add print_warning() in test.libregrtest.utils to standardize how
  libregrtest logs warnings to ease parsing the test output.
* support.unload() is now called with abstest rather than test_name
* Rename 'test' variable/parameter to 'test_name'
* dash_R(): remove unused the_module parameter
* Remove unused imports

(cherry picked from commit 4d29983185bc12ca685a1eb3873bacb8a7b67416)

* bpo-36725: Refactor regrtest multiprocessing code (GH-12961)

Rewrite run_tests_multiprocess() function as a new MultiprocessRunner
class with multiple methods to better report errors and stop
immediately when needed.

Changes:

* Worker processes are now killed immediately if tests are
  interrupted or if a test does crash (CHILD_ERROR): worker
  processes are killed.
* Rewrite how errors in a worker thread are reported to
  the main thread. No longer ignore BaseException or parsing errors
  silently.
* Remove 'finished' variable: use worker.is_alive() instead
* Always compute omitted tests. Add Regrtest.get_executed() method.

(cherry picked from commit 3cde440f20a9db75fb2c4e65e8e4d04a53216a2d)

* bpo-36719: regrtest always detect uncollectable objects (GH-12951)

regrtest now always detects uncollectable objects. Previously, the
check was only enabled by --findleaks. The check now also works with
-jN/--multiprocess N.

--findleaks becomes a deprecated alias to --fail-env-changed.

(cherry picked from commit 75120d2205af086140e5e4e2dc620eb19cdf9078)

* bpo-34060: Report system load when running test suite for Windows (GH-8357)

While Windows exposes the system processor queue length, the raw value
used for load calculations on Unix systems, it does not provide an API
to access the averaged value. Hence to calculate the load we must track
and average it ourselves. We can't use multiprocessing or a thread to
read it in the background while the tests run since using those would
conflict with test_multiprocessing and test_xxsubprocess.

Thus, we use Window's asynchronous IO API to run the tracker in the
background with it sampling at the correct rate. When we wish to access
the load we check to see if there's new data on the stream, if there is,
we update our load values.

(cherry picked from commit e16467af0bfcc9f399df251495ff2d2ad20a1669)

* bpo-36719: Fix regrtest re-run (GH-12964)

Properly handle a test which fail but then pass.

Add test_rerun_success() unit test.

(cherry picked from commit 837acc1957d86ca950433f5064fd06d09b57d23b)

* bpo-36719: regrtest closes explicitly WindowsLoadTracker (GH-12965)

Regrtest.finalize() now closes explicitly the WindowsLoadTracker
instance.

(cherry picked from commit 00db7c73af4f60df61e9df87cde7401c3ed9df69)

6 years agobpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) (GH-12948)
Miss Islington (bot) [Thu, 25 Apr 2019 11:15:47 +0000 (04:15 -0700)] 
bpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) (GH-12948)

bpo-28552, bpo-7774: Fix distutils.sysconfig if sys.executable is
None or an empty string: use os.getcwd() to initialize project_base.

Fix also the distutils build command: don't use sys.executable if
it's evaluated as false (None or empty string).
(cherry picked from commit 0ef8c157e9195df0115c54ba875a5efb92ac22fb)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-30840: Document relative imports (GH-12831) (GH-12938)
Miss Islington (bot) [Wed, 24 Apr 2019 15:44:19 +0000 (08:44 -0700)] 
bpo-30840: Document relative imports (GH-12831) (GH-12938)

* Document relative imports
(cherry picked from commit 70bf713617e15fad390ed953e48b3c65d9bc90ec)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
6 years agobpo-36454: Fix test_time.test_monotonic() (GH-12929)
Miss Islington (bot) [Tue, 23 Apr 2019 22:35:55 +0000 (15:35 -0700)] 
bpo-36454: Fix test_time.test_monotonic() (GH-12929)

Change test_time.test_monotonic() to test only the lower bound of elapsed time
after a sleep command rather than the upper bound. This prevents unnecessary
test failures on slow buildbots. Patch by Victor Stinner.
(cherry picked from commit d246a6766b9d8cc625112906299c4cb019944300)

Co-authored-by: Victor Stinner <vstinner@redhat.com>