Commit Graph

103347 Commits

Author SHA1 Message Date
Miss Islington (bot) 1845997dd9 Fix typo: equivalent code of `async with cond` (GH-11681) (GH-16720) 2019-10-11 10:27:16 -07:00
Zachary Ware dd63ee26a8
Update badges in README.rst (GH-16710)
We no longer use AppVeyor in 3.x, and others were still pointed at master.
2019-10-11 11:30:37 -05:00
Victor Stinner ed189ce494
bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) (GH-16719)
pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.

(cherry picked from commit 2b7dc40b2a)
2019-10-11 17:36:56 +02:00
Miss Islington (bot) 08afed7605
Typo fix: "throuhgh" should be "through". (GH-16704)
(cherry picked from commit a8e0d3141e)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-10-10 21:01:33 -07:00
Miss Islington (bot) f5ed41c1ae bpo-38109: Add missing constants to Lib/stat.py (GH-16665) (GH-16691)
Add missing stat.S_IFDOOR, stat.S_IFPORT, stat.S_IFWHT,
stat.S_ISDOOR, stat.S_ISPORT, and stat.S_ISWHT values to
the Python implementation of the stat module.
(cherry picked from commit 7bb14316b8)

Co-authored-by: Ronan Lamy <ronan.lamy@gmail.com>
2019-10-10 15:50:38 +02:00
Miss Islington (bot) ca012360b1
bpo-32996: Documentation fix-up. (GH-16646)
PR GH-4906 changed the typing.Generic class hierarchy, leaving an
outdated comment in the library reference. User-defined Generic ABCs now
must get a abc.ABCMeta metaclass from something other than typing.Generic
inheritance.
(cherry picked from commit d47f0dd2e8)

Co-authored-by: M. Eric Irrgang <mei2n@virginia.edu>
2019-10-10 04:17:05 -07:00
Miss Islington (bot) d27a9b1695
bpo-38425: Fix ‘res’ may be used uninitialized warning (GH-16688)
(cherry picked from commit a05fcd3c7a)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-10-10 01:00:41 -07:00
Zachary Ware a774ac6637
[3.7] bpo-38409: Fix grammar in str.strip() docstring (GH-16682) (GH-16686)
(cherry picked from commit 09895c27cd)
2019-10-09 16:56:07 -05:00
Pablo Galindo a081e93150 [3.7] bpo-38379: don't claim objects are collected when they aren't (GH-16658) (GH-16685)
* [bpo-38379](https://bugs.python.org/issue38379):  when a finalizer resurrects an object,
nothing is actually collected in this run of gc.
Change the stats to relect that truth..
(cherry picked from commit ecbf35f933)

Co-authored-by: Tim Peters <tim.peters@gmail.com>





https://bugs.python.org/issue38379



Automerge-Triggered-By: @pablogsal
2019-10-09 14:42:54 -07:00
Miss Islington (bot) 598bfa4d45
bpo-37531: regrtest ignores output on timeout (GH-16659)
bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call
`popen.communicate() again: it can hang until all child processes
using stdout and stderr pipes completes. Kill the worker process and
ignores its output.

Reenable test_regrtest.test_multiprocessing_timeout().

bpo-37531: Change also the faulthandler timeout of the main process
from 1 minute to 5 minutes, for Python slowest buildbots.
(cherry picked from commit 0ec618af98)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-10-09 06:52:34 -07:00
Serhiy Storchaka 0b354fc2bf
[3.7] bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644). (GH-16673)
(cherry picked from commit 8252c52e57)
2019-10-09 12:57:14 +03:00
Serhiy Storchaka 87db4d343c
[3.7] bpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641). (GH-16674)
(cherry picked from commit 13abda4100)
2019-10-09 12:56:32 +03:00
Miss Islington (bot) 056fa7f52a
bpo-36953: Delay removal of ABCs from collections. (GH-13409)
Bump the removal to 3.9, indicate collections.abc available since 3.3,
replace version-changed directive to deprecated-removed.

https://bugs.python.org/issue36953
(cherry picked from commit eea47e0939)

Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu>
2019-10-09 02:29:31 -07:00
Vinay Sajip 129c2b3d44
bpo-38368: Added fix for ctypes crash when handling arrays in structs/unions. (GH-16589) (GH-16672)
(cherry picked from commit e8bedbddad)
2019-10-09 06:48:48 +01:00
Miss Islington (bot) 443370d8ac
Typo fix: "empy" should be "empty". (GH-16666)
(cherry picked from commit 01171ebd96)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-10-08 19:42:15 -07:00
Ricardo Bánffy 43f5c0c4d0 [3.7] bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442) (GH-16647)
Prior to 3.7, re.escape escaped many characters that don't have
special meaning in Python, but that use to require escaping in other
tools and languages. This commit aims to make it clear which characters
were, but are no longer escaped.
(cherry picked from commit 15ae75d660)
2019-10-08 19:41:00 +03:00
Miss Islington (bot) 98043b4fcd
bpo-38118: Ignore Valgrind false alarm in PyUnicode_Decode() (GH-16651)
Valgrind emits "Conditional jump or move depends on uninitialised
value(s)" false alarms on GCC builtin strcmp() function. The GCC code
is correct.

Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936
(cherry picked from commit 03ab6b4fc6)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-10-08 06:56:08 -07:00
Miss Islington (bot) 4f962ecfa1
bpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH-16583)
It now escapes them with a backslash, as the regular Python interpreter.
Added the "errors" field to the standard streams.
(cherry picked from commit b690a2759e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-08 04:52:48 -07:00
Miss Islington (bot) 13bc1523a7
Fix typo in _warnings.warn_explicit() docstring (GH-16625)
(cherry picked from commit 5dfbb4d503)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-10-08 02:25:56 -07:00
Miss Islington (bot) bfb5f9a66c
bpo-38344: Fix syntax in activate.bat (GH-16533)
(cherry picked from commit e310af9e29)

Co-authored-by: James Abel <j@abel.co>
2019-10-07 14:25:06 -07:00
Miss Islington (bot) 77b4a659b6
bpo-38391: Fixing a typo for Py_DECREF (GH-16616)
(cherry picked from commit 038503e08a)

Co-authored-by: Krishna Oza <krishoza15sep@gmail.com>
2019-10-07 05:04:09 -07:00
Miss Islington (bot) 50b8d57942
bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
The `required` argument to `argparse.add_subparsers` was added in GH-3027. This PR specifies the earliest version of Python where it is available.

https://bugs.python.org/issue26510

Automerge-Triggered-By: @merwok
(cherry picked from commit 9e71917e02)

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2019-10-06 19:14:49 -07:00
Miss Islington (bot) b40442ba88
bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603)
(cherry picked from commit 24ddd9c2d6)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-10-06 05:36:44 -07:00
Miss Islington (bot) 6c3fbbc177
bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545)
On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the
"surrogatepass" error handler for converting to/from Tcl Unicode objects.

On Linux use UTF-8 with the "surrogateescape" error handler for converting
to/from Tcl String objects.

Converting strings from Tcl to Python and back now never fails
(except MemoryError).
(cherry picked from commit 06cb94bc84)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-04 03:28:53 -07:00
Miss Islington (bot) 4f82a53c5d bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16577)
(cherry picked from commit 3142c667b5)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
2019-10-04 09:14:28 +01:00
Miss Islington (bot) 4de3fbe27f
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
(cherry picked from commit b23a8423a9)

Co-authored-by: idomic <michael.ido@gmail.com>
2019-10-03 14:27:35 -07:00
Miss Islington (bot) f9016e5fc9
[3.8] bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550) (GH-16560)
* bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550)

WindowsLoadTracker.read_output() now uses a short buffer for
incomplete line.

(cherry picked from commit 3e04cd268e)

* bpo-36670: Enhance regrtest WindowsLoadTracker (GH-16553)

The last line is now passed to the parser even if it does not end
with a newline, but only if it's a valid value.

(cherry picked from commit c65119d5bf)

* bpo-36670: Enhance regrtest (GH-16556)

* Add log() method: add timestamp and load average prefixes
  to main messages.
* WindowsLoadTracker:

  * LOAD_FACTOR_1 is now computed using SAMPLING_INTERVAL
  * Initialize the load to the arithmetic mean of the first 5 values
    of the Processor Queue Length value (so over 5 seconds), rather
    than 0.0.
  * Handle BrokenPipeError and when typeperf exit.

* format_duration(1.5) now returns '1.5 sec', rather than
  '1 sec 500 ms'

(cherry picked from commit 098e25672f)
(cherry picked from commit de3195c937)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-10-03 08:44:52 -07:00
Miss Islington (bot) ab98cd8aee
bpo-38338, test.pythoninfo: add more ssl infos (GH-16539)
test.pythoninfo now logs environment variables used by OpenSSL and
Python ssl modules, and logs attributes of 3 SSL contexts
(SSLContext, default HTTPS context, stdlib context).
(cherry picked from commit b3e7045f83)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-10-02 09:14:57 -07:00
Ned Deily 2027f90d28 Post release updates 2019-10-01 23:54:33 -04:00
Ned Deily 19ecb5c261 Python 3.7.5rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAl2Ti6kACgkQLTR+pqpl
 Qh0fGA//VxvMkzCD6lbRN8W21xGIHWRnsQacKSnWId/WLaprLyUnX7X+hNaxGFki
 SnRTn8i6NI+ohjDzT2xXYCXlJXur4cjWwBgBl6nwBA7lHVmgKshgXjsMW2q0p/op
 wr6xf/47e9b7YD8sK+Wt2fpiKdxzjfArhLCN0sOs7P8FMb+reUvzEGi2P5YOt7oN
 bCHZR1vdrQRUaz5Lag+HYBBsgoLW3Ce3Kz8LUtKe70nk4KfE6OG/MGko+v4z8j6q
 I/D8JTRY0w38P/iuHOxa+GBJZpsKFgjGCd38eZqhYMrI56verMwt8lGU8OUgOinC
 ZTdknLV5SBRdTZ7XvGr0uc4CyUEZrvKGWwyzqEItKsot/7lDtCOQibcntYNKFJbD
 D5zp+Pzx2k0m2FFq4Foud3lz9GLMX6wiYX65pxI/vdhXqqh80wCIOxvcNdNjOUjK
 1mehESHi8MJ13ggf44wxDcKnt6sG+o/f5Ylfuq6B3978AaD0t5A1t7Ibg9ZUrDC4
 d6g3+bMDnZtpOsfgN09O/8YgCEO6NLMfQ+VavQSub+9kkHPBy1uKBWhTwmm2dB0y
 ea5wEiwKwofvU5uSYMLPr79qijUZ/gy/xOHFEemj/Yw3exQV2qPEvQ3Z0dh7EUIo
 tslmUR6dH07D0axDVdv1ufDNNwcTwt8xi6xhnOUzZ3CKH1yMQ1g=
 =Q9E+
 -----END PGP SIGNATURE-----

Merge tag 'v3.7.5rc1' into 3.7
2019-10-01 23:50:01 -04:00
Miss Islington (bot) 874dae48fe
Correct typos in the codecs module documentation (GH-15135)
(cherry picked from commit 891e9e3b44)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-10-01 13:56:40 -07:00
Ned Deily 4082f600a5 3.7.5rc1 2019-10-01 13:23:17 -04:00
Ned Deily 960068b567 Update macOS installer displays for 3.7.5rc1 2019-10-01 12:59:45 -04:00
Miss Islington (bot) d6a92b5594
bpo-36670: Multiple regrtest bugfixes (GH-16511)
* Windows: Fix counter name in WindowsLoadTracker. Counter names are
  localized: use the registry to get the counter name. Original
  change written by Lorenz Mende.
* Regrtest.main() now ensures that the Windows load tracker is also
  killed if an exception is raised
* TestWorkerProcess now ensures that worker processes are no longer
  running before exiting: kill also worker processes when an
  exception is raised.
* Enhance regrtest messages and warnings: include test name,
  duration, add a worker identifier, etc.
* Rename MultiprocessRunner to TestWorkerProcess
* Use print_warning() to display warnings.

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

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-10-01 03:58:53 -07:00
Miss Islington (bot) 2eb1dac46e Fix and improve `asyncio.run()` docs (GH-16403) (GH-16505)
(cherry picked from commit e407013089)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-30 18:47:13 -07:00
Miss Islington (bot) 1c3e4691bb
bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe (GH-16472)
(cherry picked from commit 58498bc717)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-09-29 05:19:11 -07:00
Jason R. Coombs 80dd66ac27
[3.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (GH-16461)
* bpo-38216: Allow bypassing input validation

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

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

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

* Remove obsolete comment.

* Make _prepare_path_encoding its own attr.

This makes overriding just that simpler.

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

* Add a news entry.

* _prepare_path_encoding -> _encode_prepared_path()

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2019-09-28 09:15:05 -04:00
Miss Islington (bot) 6112b91bb8 bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (#16450)
(cherry picked from commit 52d1b86bde)

Co-authored-by: Jesús Cea <jcea@jcea.es>
2019-09-28 04:21:24 +02:00
Miss Islington (bot) 39a0c75555
bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4f8c)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-09-27 13:18:14 -07:00
Christian Heimes 2c24f2cae0
[3.7] bpo-38275: Skip ssl tests for disabled versions (GH-16427)
test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto
policy and run-time settings are recognized and tests for disabled versions
are skipped.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue38275
(cherry picked from commit df6ac7e2b8)
2019-09-26 22:54:33 +02:00
Victor Stinner e6b5ed1fbd
bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422) (GH-16426)
(cherry picked from commit 64b4a3a2de)
2019-09-26 17:30:14 +02:00
Miss Islington (bot) 5017a645b0 bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16416)
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
(cherry picked from commit 1ad7be2f16)

Co-authored-by: Mohammad Dehghan <md.unicorn@gmail.com>
2019-09-26 11:15:21 +02:00
Miss Islington (bot) 80bde15736 Doc: Use the `with` statement in the first example of the ftplib doc. (GH-16271) (GH-16413)
(cherry picked from commit 5d326abf2c)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-09-26 09:12:26 +02:00
Benjamin Peterson 8e4622ea89
[3.7] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16407)
Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes..
(cherry picked from commit 52b9408038)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-09-25 21:54:59 -07:00
Vinay Sajip d015714f89
[3.7] bpo-22273: Changed conditions for ctypes array-in-struct handling. (GH-16381) (GH-16400)
(cherry picked from commit c64af8fad3)
2019-09-25 21:37:24 +01:00
Miss Islington (bot) 585798fb0e
bpo-38271: encrypt private key test files with AES256 (GH-16385)
The private keys for test_ssl were encrypted with 3DES in traditional
PKCSGH-5 format. 3DES and the digest algorithm of PKCSGH-5 are blocked by
some strict crypto policies. Use PKCSGH-8 format with AES256 encryption
instead.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue38271

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

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-25 09:12:59 -07:00
Miss Islington (bot) 3b5e924114 bpo-38255: super() can search attributes as well as methods (GH-16368) (GH-16392)
Improvement suggested by Géry Ogam.
(cherry picked from commit 15ccc4fac0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-25 08:24:24 -07:00
Miss Islington (bot) d3666945d7
bpo-38260: Add Docs on asyncio.run (GH-16337)
Add docs about return and raise exception on asyncio.run

https://bugs.python.org/issue38260

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

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-25 02:13:00 -07:00
Gregory P. Smith 4042e1afd2
[3.7] bpo-36871: Handle spec errors in assert_has_calls (GH-16364) (GH-16374)
Handle spec errors in assert_has_calls (GH-16005) (GH-16364)

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

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

https://bugs.python.org/issue36871

Co-authored-by: Samuel Freilich <sfreilich@google.com>

(cherry picked from commit 1a17a054f6)
2019-09-24 22:29:17 -07:00
Miss Islington (bot) 16c0f6df62 bpo-22273: Update ctypes to correctly handle arrays in small structur… (GH-15839) (GH-16369)
(cherry picked from commit 12f209eccb)
2019-09-25 05:10:43 +01:00