Commit Graph

43910 Commits

Author SHA1 Message Date
Miss Islington (bot) ecb2afc1bc
bpo-38821: Fix crash in argparse when using gettext (GH-17192)
(cherry picked from commit be5c79e033)

Co-authored-by: Federico Bond <federicobond@gmail.com>
2019-11-20 05:48:20 -08:00
Miss Islington (bot) 755caaa753
bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)
These Format menu functions (default shortcuts Alt-T and Alt-U)
were mistakenly disabled in 3.7.5 and 3.8.0.
(cherry picked from commit b8462477bf)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-11-19 22:37:09 -08:00
Miss Islington (bot) 4ffc569b47
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator.

https://bugs.python.org/issue35409
(cherry picked from commit 8e0de2a480)

Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
2019-11-19 06:12:12 -08:00
Miss Islington (bot) 5469bc0ea7
Fix typo in Lib/socketserver.py (GH-17024)
changed 'This is bad class design, but save some typing'
into 'This is bad class design, but saves some typing'.
(cherry picked from commit d0acdfcf34)

Co-authored-by: Jason (Perry) Taylor <jtaylor@seek.com.au>
2019-11-16 10:32:37 -08:00
Miss Islington (bot) 87b4d3994e
bpo-38785: Prevent asyncio from crashing (GH-17144)
if parent `__init__` is not called from a constructor of object derived from `asyncio.Future`

https://bugs.python.org/issue38785
(cherry picked from commit dad6be5ffe)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-11-13 13:54:50 -08:00
Miss Islington (bot) 753d0c05b3
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
This immediately toggles shell, editor, and output windows, but does not affect other input widgets.
(cherry picked from commit 9c2844927d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-11-12 23:37:07 -08:00
Benjamin Peterson b8b3e4377e
[3.7] closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17137)
This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode..
(cherry picked from commit 74fa9f723f)
2019-11-12 15:34:43 -08:00
Serhiy Storchaka 42b619ac9a
[3.7] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17128)
* "Return true/false" is replaced with "Return ``True``/``False``"
  if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
(cherry picked from commit 138ccbb022)
2019-11-12 20:07:20 +02:00
Miss Islington (bot) 177b12682c
bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103)
(cherry picked from commit c8b53dc3d8)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-11-12 03:13:32 -08:00
Miss Islington (bot) 832341a071
[3.8] bpo-37309: idlelib/NEWS.txt - add missing period. (GH-17115)
(cherry picked from commit 8341a4d918)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-11-12 02:21:06 -08:00
Miss Islington (bot) 917dbe350a
bpo-22367: Add tests for fcntl.lockf(). (GH-17010)
(cherry picked from commit befa032d88)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-11-09 03:12:35 -08:00
Miss Islington (bot) 1f9148bdb4
Fix a typo in wave module docstring (GH-17009)
s/pathing/patching/
(cherry picked from commit 25fa3ecb98)

Co-authored-by: Michael Haas <micha2718l@gmail.com>
2019-11-04 20:50:01 -08:00
Miss Skeleton (bot) 72b874a2ac
bpo-38422: Clarify docstrings of pathlib suffix(es) (GH-16679)
Whenever I use `path.suffix` I have to check again whether it includes the dot or not. I decided to add it to the docstring so I won't have to keep checking.

https://bugs.python.org/issue38422

Automerge-Triggered-By: @pitrou
(cherry picked from commit 8d4fef4ee2)

Co-authored-by: Ram Rachum <ram@rachum.com>
2019-11-02 10:04:18 -07:00
Vinay Sajip 0118d109d5
[3.7] bpo-16575: Add checks for unions passed by value to functions. (GH-16799) (GH-17017)
(cherry picked from commit 79d4ed102a)
2019-10-31 14:15:04 +00:00
Miss Skeleton (bot) a28cf14dea Add docstring for shlex.split (GH-16740) (GH-17012)
(cherry picked from commit 65c7382c47)

Co-authored-by: MaT1g3R <peijun.ma@protonmail.com>
2019-10-31 12:50:32 +00:00
Miss Skeleton (bot) f7d50f8f99
bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656)
(cherry picked from commit da6ce58dd5)

Co-authored-by: Daniel Hillier <daniel.hillier@gmail.com>
2019-10-29 00:43:37 -07:00
Miss Skeleton (bot) ed2db3113d
bpo-38334: Fix seeking backward on an encrypted zipfile.ZipExtFile. (GH-16937)
Test by Daniel Hillier.
(cherry picked from commit 5c32af7522)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-27 01:41:27 -07:00
Terry Jan Reedy baf2657eff
[3.7] bpo-37309: First idlelib/NEWS.txt for 3.7.6 (GH-) (#16949) 2019-10-27 02:38:20 -04:00
Miss Skeleton (bot) bc30db1ee7
bpo-34162: Last idlelib/NEWS.txt items for 3.8.0. (GH-16943)
(cherry picked from commit e31a79a5b4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-10-26 19:38:26 -07:00
Miss Skeleton (bot) 849b1b9f6c
bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939)
(cherry picked from commit e3f90b217a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-10-26 18:32:11 -07:00
Serhiy Storchaka 91fc9cf43c
[3.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16930)
(cherry picked from commit 26ae9f6d3d)
2019-10-26 17:30:14 +03:00
Miss Skeleton (bot) 0160a70acb
bpo-33348: parse expressions after * and ** in lib2to3 (GH-6586)
These are valid even in python 2.7

https://bugs.python.org/issue33348

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

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2019-10-23 23:36:26 -07:00
Miss Skeleton (bot) 175abccbbf
bpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)
(cherry picked from commit 10ecbadb79)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-21 11:12:17 -07:00
Miss Islington (bot) 82b5f6b16e
bpo-27657: Fix urlparse() with numeric paths (GH-661)
* bpo-27657: Fix urlparse() with numeric paths

Revert parsing decision from bpo-754016 in favor of the documented
consensus in bpo-16932 of how to treat strings without a // to
designate the netloc.

* bpo-22891: Remove urlsplit() optimization for 'http' prefixed inputs.
(cherry picked from commit 5a88d50ff0)

Co-authored-by: Tim Graham <timograham@gmail.com>
2019-10-18 06:24:28 -07:00
Victor Stinner 1bceb0e589
bpo-35998: Fix test_asyncio.test_start_tls_server_1() (GH-16815) (GH-16818)
main() is now responsible to send the ANSWER, rather than
ServerProto. main() now waits until it got the HELLO before sending
the ANSWER over the new transport.

Previously, there was a race condition between main() replacing the
protocol and the protocol sending the ANSWER once it gets the HELLO.

TLSv1.3 was disabled for the test: reenable it.

(cherry picked from commit fab4ef2df0)
2019-10-16 11:44:30 +02:00
Ned Deily 1f187714be Python 3.7.5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAl2k+McACgkQLTR+pqpl
 Qh3v2xAAgF1LyLY/T9nqtWGsbnTLsFSINUpeLS9g2ccrxA2iBq8rs6BcQ6FhZpRS
 y1PHRnnEwqNYDvRyo9HmfAjUb2uqXDSEO6SbEkp38GkU1kh2Vubyp8DENF0M6UH3
 hOTWBEpXof9PTqXXM9nNf/D556HoBt31FJcyHV6SCteF8pbkmMdNM+kfuP1BP1RI
 LLYg/EvH21C/Y0Dutmgo62yt+2mOsJH8gqL14WP93fFRrnoW4TsgYqbQXUC3IaVV
 G6pp5EMWZ6s3M7rWSyNMSs00fV0Rh/CUJimUwk0JmmJdYdrmC0aUkXbMFOcmGS/C
 fK8YlwagB4R6RnHjEScoZlVoQSqQOMOJpEyIZYZ4rb4FqgTGS1R7weFbya7kAmma
 1x4WhN/U0OOi7G1btLyNis9yz4I1ho2PNIWnuozOqSJ04NMm6bGYsdHvWpawmQTg
 01Ndh5EhXYlIneFKkW2fewGqY/HrACNEXMS8VqC6Bgm8h+quUXyzOxsUB3ErP50+
 gGIDzBEajZg22Z+Ei3+bD0z2t6v7wfa3JiS52oQBfPTCDHXyHBDl6YQqcR3A5emR
 rPJp4ix0jo74KPq7+WOoBvriEaUsUzj/G6j8MvaTLIpr07Vn83dVyXPEFgkozFl5
 L/cSxDzoFTkuScsdLlb6bbpEBO9wo+7fnZApBt3WjdhsrtxDzMg=
 =Ro62
 -----END PGP SIGNATURE-----

Merge tag 'v3.7.5' into 3.7
2019-10-15 03:15:46 -04:00
Ned Deily 5c02a39a0b 3.7.5 2019-10-14 18:32:36 -04:00
Abhilash Raj 2a405598bb [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727)
Reverts GH-15687 which caused the issue.


https://bugs.python.org/issue22347

https://bugs.python.org/issue38449
2019-10-14 17:27:49 -04:00
Miss Islington (bot) 42b16b2a86 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-14 17:04:26 -04:00
Vinay Sajip 1c61f2cc7a bpo-38368: Added fix for ctypes crash when handling arrays in structs/unions. (GH-16589) (GH-16672)
(cherry picked from commit e8bedbddad)
2019-10-14 17:03:10 -04:00
Miss Islington (bot) ab22c8bc48 bpo-38344: Fix syntax in activate.bat (GH-16533)
(cherry picked from commit e310af9e29)

Co-authored-by: James Abel <j@abel.co>
2019-10-14 16:56:12 -04:00
Miss Islington (bot) 88204a3908 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-14 16:48:16 -04:00
Abhilash Raj 164bee296a [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727)
Reverts GH-15687 which caused the issue.


https://bugs.python.org/issue22347

https://bugs.python.org/issue38449
2019-10-12 11:50:03 -07:00
Miss Islington (bot) febe359559
bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503)
KeyError should cause a failure in parsing the encoded word and should be caught and raised as a _InvalidEWError instead.
(cherry picked from commit 65dcc8a8dc)

Co-authored-by: Andrei Troie <andreitroie90@gmail.com>
2019-10-12 10:02:23 -07:00
Miss Islington (bot) cb580d6fa8
bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525)
Add SMTPNotSupportedError in the exports of smtplib

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 3faf826e58)

Co-authored-by: nde <denayer.norman@gmail.com>
2019-10-12 09:26:04 -07:00
Pablo Galindo 193366e25c [3.7] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16663)
The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods..
(cherry picked from commit 10cd00a9e3)

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





https://bugs.python.org/issue38395
2019-10-11 13:28:49 -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
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) 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) 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) 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) 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 4082f600a5 3.7.5rc1 2019-10-01 13:23:17 -04:00