]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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>
6 years agoreplace 'sequencial argument' by 'positional' in doc (GH-12925)
Miss Islington (bot) [Tue, 23 Apr 2019 13:06:57 +0000 (06:06 -0700)] 
replace 'sequencial argument' by 'positional' in doc (GH-12925)

(cherry picked from commit 29d018aa63b72161cfc67602dc3dbd386272da64)

Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
6 years agobpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)
Miss Islington (bot) [Tue, 23 Apr 2019 12:18:15 +0000 (05:18 -0700)] 
bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)

(cherry picked from commit 359bd4f61b9e1493081f4f67882554247b53926a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years ago[3.7] bpo-9566: Fix compiler warnings on Windows (GH-12920)
Victor Stinner [Tue, 23 Apr 2019 08:26:11 +0000 (10:26 +0200)] 
[3.7] bpo-9566: Fix compiler warnings on Windows (GH-12920)

* bpo-9566: Fix compiler warnings in gcmodule.c (GH-11010)

Change PyDTrace_GC_DONE() argument type from int to Py_ssize_t.

(cherry picked from commit edad38e3e05586ba58291f47756eb3fb808f5577)

* bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)

ast.c: fstring_fix_node_location() downcasts a pointer difference to
a C int. Replace int with Py_ssize_t to fix the compiler warning.

(cherry picked from commit fb7e7992beec7f76cc2db77ab6ce1e86446bfccf)

* bpo-9566: Fix compiler warnings in peephole.c (GH-10652)

(cherry picked from commit 028f0ef4f3111d2b3fc5b971642e337ba7990873)

* bpo-27645, sqlite: Fix integer overflow on sleep (#6594)

Use the _PyTime_t type and round away from zero (ROUND_UP,
_PyTime_ROUND_TIMEOUT) the sleep duration, when converting a Python
object to seconds and then to milliseconds. Raise an OverflowError in
case of overflow.

Previously the (int)double conversion rounded towards zero
(ROUND_DOWN).

(cherry picked from commit ca405017d5e776a2e3d9291236e62d2e09489dd2)

6 years agoFixes platform.win32_ver on non-Windows platforms (GH-12912)
Miss Islington (bot) [Mon, 22 Apr 2019 18:59:08 +0000 (11:59 -0700)] 
Fixes platform.win32_ver on non-Windows platforms (GH-12912)

(cherry picked from commit d307d05350e26a7a5f8f74db9af632a15215b50f)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years agobpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
Miss Islington (bot) [Mon, 22 Apr 2019 17:31:46 +0000 (10:31 -0700)] 
bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)

(cherry picked from commit 34366b7f914eedbcc33aebe882098a2199ffaf82)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)
Miss Islington (bot) [Mon, 22 Apr 2019 17:20:33 +0000 (10:20 -0700)] 
bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)

(cherry picked from commit 56ed86490cb8221c874d432461d77702437f63e5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-36690: Fix typo in Tools/demo/rpython.py (GH-12903)
Miss Islington (bot) [Mon, 22 Apr 2019 13:53:53 +0000 (06:53 -0700)] 
bpo-36690: Fix typo in Tools/demo/rpython.py (GH-12903)

(cherry picked from commit d59b662e490d3fae662c5f81fa5248f0445d2158)

Co-authored-by: 周家未 <752736341@qq.com>
6 years agobpo-36523: Add docstring to io.IOBase.writelines (GH-12683)
Marcin Niemira [Mon, 22 Apr 2019 12:08:24 +0000 (22:08 +1000)] 
bpo-36523: Add docstring to io.IOBase.writelines (GH-12683)

(cherry picked from commit ab86521a9d9999731e39bd9056420bb7774fd144)

6 years agoDoc: add the missing ".tp_flags" in type definition (GH-12902)
Miss Islington (bot) [Mon, 22 Apr 2019 11:14:25 +0000 (04:14 -0700)] 
Doc: add the missing ".tp_flags" in type definition (GH-12902)

(cherry picked from commit 662ebd2ab2047aeae9689ad254b39915c38069fd)

Co-authored-by: Wu Wei <weiwu@cacheme.net>
6 years agobpo-23078: Add support for {class,static}method to mock.create_autospec() (GH-11613)
Berker Peksag [Mon, 22 Apr 2019 03:07:56 +0000 (06:07 +0300)] 
bpo-23078: Add support for {class,static}method to mock.create_autospec() (GH-11613)

Co-authored-by: Felipe <felipe.nospam.ochoa@gmail.com>
(cherry picked from commit 9b21856b0fcda949de239edc7aa6cf3f2f4f77a3)

6 years agobpo-36645: Fix ambiguous formatting in re.sub() documentation (GH-12879)
Miss Islington (bot) [Sun, 21 Apr 2019 22:20:45 +0000 (15:20 -0700)] 
bpo-36645: Fix ambiguous formatting in re.sub() documentation (GH-12879)

(cherry picked from commit 5ebfa840a1c9967da299356733da41b532688988)

Co-authored-by: mollison <mollison@cs.unc.edu>
6 years agoFix typo (GH-12878) 12897/head
Miss Islington (bot) [Sat, 20 Apr 2019 23:12:23 +0000 (16:12 -0700)] 
Fix typo (GH-12878)

"sychronization" -> "synchronization"
(cherry picked from commit 3e986de0d65e78901b55d4e500b1d05c847b6d5e)

Co-authored-by: Fredrik Averpil <fredrik@averpil.com>
6 years agobpo-36650: Fix handling of empty keyword args in C version of lru_cache. (GH-12881...
Miss Islington (bot) [Sat, 20 Apr 2019 17:50:32 +0000 (10:50 -0700)] 
bpo-36650: Fix handling of empty keyword args in C version of lru_cache. (GH-12881) (GH-12888)

(cherry picked from commit 14adbd45980f705cb6554ca17b8a66b56e105296)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
6 years agobpo-36651: Fixed Asyncio Event Loop documentation inconsistency (GH-12866)
Miss Islington (bot) [Thu, 18 Apr 2019 12:49:24 +0000 (05:49 -0700)] 
bpo-36651: Fixed Asyncio Event Loop documentation inconsistency (GH-12866)

GH- [bpo-36651](https://bugs.python.org/issue36651): Fixed Asyncio Event Loop documentation inconsistency

In the documentation for the call_later and the call_at methods there is a note which says that the delay cannot be longer than a day, but both methods have a note saying that this limitation was removed in Python 3.8
Here I fixed this issue by removing the pre-exising note and added a versionchanged.

To test my changes I have rebuilt the documentation with ```make html```. I did not have any errors and the effected page displayed correctly on a browser.

https://bugs.python.org/issue36651
(cherry picked from commit 7e954e7de4f3777b5ce239640bd2b76aced09561)

Co-authored-by: Enrico Alarico Carbognani <enrico.carbognani@gmail.com>
6 years agoFix wrong indentation of a paragraph in documentation (GH-12868)
Miss Islington (bot) [Thu, 18 Apr 2019 01:00:37 +0000 (18:00 -0700)] 
Fix wrong indentation of a paragraph in documentation (GH-12868)

This paragraph doesn't seem to be a part of code, but merged into previous code block.
(cherry picked from commit 9941f963fe085261aec25545fa9f0cc35f750120)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
6 years agobpo-36649: Remove trailing spaces for registry keys when installed via the Store...
Miss Islington (bot) [Wed, 17 Apr 2019 21:52:14 +0000 (14:52 -0700)] 
bpo-36649: Remove trailing spaces for registry keys when installed via the Store (GH-12865)

(cherry picked from commit 4c3efd9cd07194b5db2a60ae5951134cda8b69db)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years ago[3.7] bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12862)
Victor Stinner [Wed, 17 Apr 2019 16:38:06 +0000 (18:38 +0200)] 
[3.7] bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12862)

* bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858)

shutil.which() and distutils.spawn.find_executable() now use
os.confstr("CS_PATH") if available instead of os.defpath, if the PATH
environment variable is not set.

Don't use os.confstr("CS_PATH") nor os.defpath if the PATH
environment variable is set to an empty string.

Changes:

* find_executable() now starts by checking for the executable in the
  current working directly case. Add an explicit
  "if not path: return None".
* Add tests for PATH='' (empty string), PATH=':' and for PATHEXT.

(cherry picked from commit 228a3c99bdb2d02771bead66a0beabafad3a90d3)

* bpo-35755: Remove current directory from posixpath.defpath (GH-11586)

Document the change in a NEWS entry of the Security category.

(cherry picked from commit 2c4c02f8a876fcf084575dcaf857a0236c81261a)

6 years agobpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852) (GH-12863)
Miss Islington (bot) [Wed, 17 Apr 2019 16:30:27 +0000 (09:30 -0700)] 
bpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852) (GH-12863)

Fix Python Initialization code on FreeBSD to detect properly when
stdin file descriptor (fd 0) is invalid.

On FreeBSD, fstat() must be used to check if stdin (fd 0) is valid.
dup(0) doesn't fail if stdin is invalid in some cases.
(cherry picked from commit 3092d6b2630e4d2bd200fbc3231c27a7cba4d6b2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-33783: Use proper class markup for random.Random docs (GH-7817) (GH-12859)
Miss Islington (bot) [Tue, 16 Apr 2019 21:32:32 +0000 (14:32 -0700)] 
bpo-33783: Use proper class markup for random.Random docs (GH-7817) (GH-12859)

Signed-off-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
(cherry picked from commit 31e8d69bfe7cf5d4ffe0967cb225d2a8a229cc97)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
6 years agobpo-36508: python-config don't export LINKFORSHARED (GH-12661) (GH-12748)
Miss Islington (bot) [Tue, 16 Apr 2019 13:01:33 +0000 (06:01 -0700)] 
bpo-36508: python-config don't export LINKFORSHARED (GH-12661) (GH-12748)

python-config --ldflags no longer includes flags of the LINKFORSHARED
variable. The LINKFORSHARED variable must only be used to build
executables.
(cherry picked from commit e65f01f78d7bda3013fc5be485afa87ff56511d9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-36348: test_imaplib: add debug info (GH-12846)
Victor Stinner [Mon, 15 Apr 2019 16:45:01 +0000 (18:45 +0200)] 
bpo-36348: test_imaplib: add debug info (GH-12846)

Log more info if tests fail.

6 years agoDoc: update PendingDeprecationWarning explanation (GH-12837)
Miss Islington (bot) [Mon, 15 Apr 2019 12:48:31 +0000 (05:48 -0700)] 
Doc: update PendingDeprecationWarning explanation (GH-12837)

Keep the nudge towards DeprecationWarning, but remove the
"Note" markup and generally shorten the description.

Ref: https://github.com/python/cpython/pull/12505/filesGH-r273978757
(cherry picked from commit a3283efd30ad52b56d1046138523cbabc6c69daf)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
6 years agobpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834) (GH-12835)
Miss Islington (bot) [Mon, 15 Apr 2019 10:49:37 +0000 (03:49 -0700)] 
bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834) (GH-12835)

Fix test_imap4_host_default_value() of test_imaplib: catch also
errno.ENETUNREACH error.
(cherry picked from commit 3c7931e514faf509a39c218c2c9f55efb434628f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-16079: fix duplicate test method name in test_gzip. (GH-12827)
Miss Islington (bot) [Sun, 14 Apr 2019 17:50:52 +0000 (10:50 -0700)] 
bpo-16079: fix duplicate test method name in test_gzip. (GH-12827)

(cherry picked from commit cd466559c4a312b3c1223a774ad4df19fc4f0407)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years ago[3.7] bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can termina...
Pablo Galindo [Sun, 14 Apr 2019 02:49:17 +0000 (03:49 +0100)] 
[3.7] bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541) (GH-12820)

Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.
(cherry picked from commit fde9b33)

6 years agobpo-36593: Fix isinstance check for Mock objects with spec executed under tracing...
Miss Islington (bot) [Sat, 13 Apr 2019 19:31:58 +0000 (12:31 -0700)] 
bpo-36593: Fix isinstance check for Mock objects with spec executed under tracing (GH-12790)

In Python having a trace function in effect while mock is imported causes isinstance to be wrong for MagicMocks. This is due to the usage of super() in some class methods, as this sets the __class__ attribute. To avoid this, as a workaround, alias the usage of super .
(cherry picked from commit 830b43d03cc47a27a22a50d777f23c8e60820867)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
6 years agoSkip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)
Miss Islington (bot) [Sat, 13 Apr 2019 16:25:20 +0000 (09:25 -0700)] 
Skip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)

(cherry picked from commit 46544f69bff1c3c4173d461be35993ca0109f622)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
6 years agoDoc: define PY_SSIZE_T_CLEAN always (GH-12794)
Miss Islington (bot) [Sat, 13 Apr 2019 01:56:50 +0000 (18:56 -0700)] 
Doc: define PY_SSIZE_T_CLEAN always (GH-12794)

(cherry picked from commit c88feceb449d6e85d7e17ec36559206094d10d81)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
6 years agobpo-36605: make tags: parse Modules/_io directory (GH-12789) (GH-12814)
Victor Stinner [Sat, 13 Apr 2019 00:50:31 +0000 (02:50 +0200)] 
bpo-36605: make tags: parse Modules/_io directory (GH-12789) (GH-12814)

"make tags" and "make TAGS" now also parse Modules/_io/*.c
and Modules/_io/*.h.

(cherry picked from commit 21a74a9d77c5ac628808b9faace18b824ca056f7)

6 years agobpo-35581: Document @typing.type_check_only (GH-11312)
Miss Islington (bot) [Fri, 12 Apr 2019 22:47:57 +0000 (15:47 -0700)] 
bpo-35581: Document @typing.type_check_only (GH-11312)

(cherry picked from commit 1e8295402bf5e81d327ed2b5eb88a6b6de449d63)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
6 years agobpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)
Miss Islington (bot) [Fri, 12 Apr 2019 22:32:33 +0000 (15:32 -0700)] 
bpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)

Since bpo-30291 it is possible to specify the architecture of Python when using the launcher
(cherry picked from commit 1e2ad6c275d2b09e76b7cbba7281d5a125a593c1)

Co-authored-by: mrh1997 <mrh1997@users.noreply.github.com>
6 years agoAllow Windows layout builds to fully skip code signing (GH-12808)
Miss Islington (bot) [Fri, 12 Apr 2019 18:44:00 +0000 (11:44 -0700)] 
Allow Windows layout builds to fully skip code signing (GH-12808)

(cherry picked from commit 606c66a17faf34a4e74d4829e8fe5ad0d2879434)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years agobpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)
Miss Islington (bot) [Fri, 12 Apr 2019 13:33:31 +0000 (06:33 -0700)] 
bpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)

Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name
(cherry picked from commit 9b8314cfe29ca532fc335277f6c36b72e6132922)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-34839: Add a 'before 3.6' in the section 'warnings' of doctest (GH-9736)
Miss Islington (bot) [Fri, 12 Apr 2019 06:27:27 +0000 (23:27 -0700)] 
bpo-34839: Add a 'before 3.6' in the section 'warnings' of doctest (GH-9736)

(cherry picked from commit 0522fd81dc6e3482c2d4c8719f1f85ad5924eede)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
6 years ago[3.7] bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770...
Victor Stinner [Thu, 11 Apr 2019 20:30:31 +0000 (22:30 +0200)] 
[3.7] bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770) (GH-12788)

* bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)

Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.

Add unit tests on _PyObject_IsFreed().

(cherry picked from commit 2b00db68554422ec37faba2a80179a0172df6349)

* bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)

Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().

(cherry picked from commit 4c409beb4c360a73d054f37807d3daad58d1b567)

6 years agobpo-36597: fix random doctest failure (GH-12778)
Inada Naoki [Thu, 11 Apr 2019 10:37:53 +0000 (19:37 +0900)] 
bpo-36597: fix random doctest failure (GH-12778)

6 years agobpo-36416: Correct bytes.rpartition documentation (GH-12543)
Miss Islington (bot) [Thu, 11 Apr 2019 10:18:48 +0000 (03:18 -0700)] 
bpo-36416: Correct bytes.rpartition documentation (GH-12543)

(cherry picked from commit efc48701496ef020e896fc6a91af3c0c612ac69a)

Co-authored-by: pewscorner <pewscorner@users.noreply.github.com>
6 years agoDoc: fix typo in IncrementalDecoder.setstate (GH-12724)
Miss Islington (bot) [Thu, 11 Apr 2019 06:18:07 +0000 (23:18 -0700)] 
Doc: fix typo in IncrementalDecoder.setstate (GH-12724)

(cherry picked from commit b5e2959b27088d39f9954a207b91ab0ebbd149f4)

Co-authored-by: Christopher Thorne <libcthorne@users.noreply.github.com>
6 years agobetter __init__.py explanation in tutorial (GH-12763)
Miss Islington (bot) [Thu, 11 Apr 2019 06:16:34 +0000 (23:16 -0700)] 
better __init__.py explanation in tutorial (GH-12763)

* better __init__.py explanation in tutorial

* Update Doc/tutorial/modules.rst

Co-Authored-By: methane <songofacandy@gmail.com>
(cherry picked from commit 5410d3d283b11e2375f0c1f79728a230edd12bd0)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
6 years agobpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764)
Miss Islington (bot) [Wed, 10 Apr 2019 23:58:55 +0000 (16:58 -0700)] 
bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764)

Set CUSTOMIZED_OSX_COMPILER to True to disable
_osx_support.customize_compiler().
(cherry picked from commit a9bd8925c7fa50dd3cfab125b824ec192133ef49)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-14826: document that URLopener quotes fullurl. (GH-12758)
Miss Islington (bot) [Wed, 10 Apr 2019 09:30:22 +0000 (02:30 -0700)] 
bpo-14826: document that URLopener quotes fullurl. (GH-12758)

(cherry picked from commit 2fb2bc81c3f40d73945c6102569495140e1182c7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years agobpo-12910: update and correct quote docstring (GH-2568)
Miss Islington (bot) [Wed, 10 Apr 2019 00:53:03 +0000 (17:53 -0700)] 
bpo-12910: update and correct quote docstring (GH-2568)

Fixes some mistakes and misleadings in the quote function docstring:
- reserved chars are never actually used by quote code, unreserved chars are
- reserved chars were wrong and incomplete
- mentioned that use-case is not minimal quoting wrt. RFC, but cautious quoting
(cherry picked from commit 750d74fac5c510e39958b3f79641fe54096ee54f)

Co-authored-by: Jörn Hees <joernhees@users.noreply.github.com>
6 years ago[3.7] bpo-36560: regrtest: don't collect the GC twice (GH-12747) (GH-12749)
Victor Stinner [Tue, 9 Apr 2019 16:55:50 +0000 (18:55 +0200)] 
[3.7] bpo-36560: regrtest: don't collect the GC twice (GH-12747) (GH-12749)

* bpo-36560: Fix reference leak hunting in regrtest (GH-12744)

Fix reference leak hunting in regrtest: compute also deltas (of
reference count, allocated memory blocks, file descriptor count)
during warmup, to ensure that everything is initialized before
starting to hunt reference leaks.

Other changes:

* Replace gc.collect() with support.gc_collect()
* Move calls to read memory statistics from dash_R_cleanup() to
  dash_R()
* Pass regrtest 'ns' to dash_R()
* dash_R() is now more quiet with --quiet option (don't display
  progress).
* Precompute the full range for "for it in range(repcount):" to
  ensure that the iteration doesn't allocate anything new.
* dash_R() now is responsible to call warm_caches().

(cherry picked from commit 5aaac94eeb44697e92b0951385cd557bc27e0f6a)

* bpo-36560: regrtest: don't collect the GC twice (GH-12747)

dash_R() function of libregrtest doesn't call support.gc_collect()
directly anymore: it's already called by dash_R_cleanup().

Call dash_R_cleanup() before starting the loop.

(cherry picked from commit bb4447897a5f141eecf42987a1191a3330c5d7ed)

6 years agocloses bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH...
Miss Islington (bot) [Tue, 9 Apr 2019 04:57:31 +0000 (21:57 -0700)] 
closes bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH-11893)

Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.

Corresponding changes to documentation in the _pyio.py module.
(cherry picked from commit 7b97ab35b28b761ab1253df427ee674b1a90f465)

Co-authored-by: Steve Palmer <steve@srpalmer.me.uk>
6 years agobpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733) (GH-12734)
Miss Islington (bot) [Mon, 8 Apr 2019 23:54:16 +0000 (16:54 -0700)] 
bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733) (GH-12734)

Fix reference hunting (``python3 -m test -R 3:3``) when Python has no
built-in abc module: fix _get_dump() reimplementation of libregrtest.
(cherry picked from commit 79b5d29041bd85ea3baa050b3fa2481344ea35c9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agoCorrect "inplace" with "in-place" (GH-10480)
Miss Islington (bot) [Mon, 8 Apr 2019 09:21:38 +0000 (02:21 -0700)] 
Correct "inplace" with "in-place" (GH-10480)

(cherry picked from commit f4efa312d14bc792f59514c5696e29041e05deca)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
6 years agobpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)
Miss Islington (bot) [Mon, 8 Apr 2019 02:55:58 +0000 (19:55 -0700)] 
bpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)

Remove names from the "unimplemented interfaces" list
in the minidom docs that are actually implemented.
(cherry picked from commit 2ea8099523581cf2ecc060831a53debb57ff98ee)

Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
6 years agoFix doc for create_subprocess_exec (GH-12598)
Miss Islington (bot) [Fri, 5 Apr 2019 14:08:31 +0000 (07:08 -0700)] 
Fix doc for create_subprocess_exec (GH-12598)

Add missing `program` argument to asyncio.create_subprocess_exec documentation.
(cherry picked from commit 1328375ad1c91f25a1500945a67b0ef36e387527)

Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
6 years agobpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)
Miss Islington (bot) [Fri, 5 Apr 2019 09:07:21 +0000 (02:07 -0700)] 
bpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)

(cherry picked from commit 176d26364bb67801fa522f52f20cbe44420d6942)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
6 years agobpo-36522: Print all values for headers with multiple values. (GH-12681) (GH-12682) 12692/head
Miss Islington (bot) [Thu, 4 Apr 2019 08:25:59 +0000 (01:25 -0700)] 
bpo-36522: Print all values for headers with multiple values. (GH-12681) (GH-12682)

(cherry picked from commit 461c416dd78a98f2bba7f323af8c9738e060b6f2)

Co-authored-by: Matt Houglum <houglum@google.com>
6 years ago[3.7] bpo-36440: include node names in ParserError messages, instead of numeric IDs...
Pablo Galindo [Wed, 3 Apr 2019 18:34:59 +0000 (14:34 -0400)] 
[3.7] bpo-36440: include node names in ParserError messages, instead of numeric IDs (GH-12565) (GH-12671)

The error messages in the parser module are referring to numeric IDs for the nodes. To improve readability, use the node names when reporting errors..
(cherry picked from commit cb0748d3939c31168ab5d3b80e3677494497d5e3)

Co-authored-by: tyomitch <tyomitch@gmail.com>
6 years agobpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660)
Miss Islington (bot) [Wed, 3 Apr 2019 17:55:26 +0000 (10:55 -0700)] 
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660)

(cherry picked from commit 487b73ab39c80157474821ef9083f51e0846bd62)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>