Commit Graph

22991 Commits

Author SHA1 Message Date
Miss Islington (bot) 38e32872eb
bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) (GH-22019)
(cherry picked from commit 475a5fbb56)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
2020-08-30 20:42:27 +01:00
Miss Islington (bot) 85ca9c049c
bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-22016) 2020-08-30 16:20:40 +09:00
Karthikeyan Singaravelan 838316db08
[3.8] bpo-41624: fix documentation of typing.Coroutine (GH-21952). (#21983)
(cherry picked from commit 8c58d2a216)

Co-authored-by: MingZhe Hu <humingzhework@163.com>

Co-authored-by: MingZhe Hu <humingzhework@163.com>
2020-08-28 08:03:40 -07:00
Miss Islington (bot) 641279e6e5
bpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935) (#21976)
(cherry picked from commit 022bc7572f)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-08-27 03:17:05 +02:00
Miss Islington (bot) 7475aa2c59
bpo-33660: Fix PosixPath to resolve a relative path on root (GH-21975)
(cherry picked from commit 94ad6c674f)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-08-27 02:47:10 +02:00
Elvis Pranskevichus 57b698886b
[3.8] bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895) (#21967)
When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative.  This takes care of that.

Props to @aaliddell for noticing the inconsistency..
(cherry picked from commit c517fc7121)
2020-08-26 13:59:17 -07:00
Miss Islington (bot) 6e1954cd82
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (#21965)
Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running.  This is similar to a race with the timeout, which is handled
already.
(cherry picked from commit a2118a1462)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2020-08-26 11:26:28 -07:00
Victor Stinner 7d0fef56d8
bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)

Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.

(cherry picked from commit 423e77d6de)

* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)

Use generic '.. object::' to declare markers, rather than abusing
'..  c:function::' which fails on Sphinx 3.

(cherry picked from commit 43577c01a2)

* bpo-40204: Fix duplicates in the documentation (GH-21857)

Fix two Sphinx 3 issues:

Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.

Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.

(cherry picked from commit 46d10b1237)

* bpo-40204: Add :noindex: in the documentation (GH-21859)

Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.

For example, fix this Sphinx 3 issue:

Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them

(cherry picked from commit d3ded08048)

* bpo-40204, doc: Fix syntax of C variables (GH-21846)

For example, fix the following Sphinx 3 errors:

Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
  void \*obj
  -----^

Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
  PyObject*
  --------^

The modified documentation is compatible with Sphinx 2 and Sphinx 3.

(cherry picked from commit 474652fe93)

* bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

(cherry picked from commit bb0b08540c)

* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

(cherry picked from commit 1abeda80f7)
(cherry picked from commit 8f88190af5)
2020-08-20 13:28:49 +02:00
Miss Islington (bot) 1baa8b14ee
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a coroutine (GH-21852)
asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.
(cherry picked from commit 29f84294d8)

Co-authored-by: James Weaver <james.barrett@bbc.co.uk>
2020-08-17 07:37:12 -07:00
Miss Islington (bot) 08f0a21092
[3.8] bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765) (GH-21898)
(cherry picked from commit 2353d77fad)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>

Automerge-Triggered-By: @vsajip
2020-08-16 09:27:01 -07:00
Miss Islington (bot) 243458115e
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation (GH-18772)
[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation

Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)
(cherry picked from commit 495bd03566)

Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
2020-08-15 10:42:36 -07:00
Miss Islington (bot) a3416c13b5
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15fa5)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit f24430f154)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-13 11:38:55 -07:00
Miss Islington (bot) afff51fc09
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
(cherry picked from commit 369a1cbdee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-12 06:12:05 -07:00
Miss Islington (bot) 61f23cb62d
bpo-41468: Improve and test IDLE run error exit (GH-21798)
A message box pops up when an unexpected error stops the run process.  Tell users it is likely a random glitch, but report it if not.
(cherry picked from commit f2e161c279)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-09 13:26:37 -07:00
Miss Islington (bot) 66c8996619
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
(cherry picked from commit a4084b9d1e)

Co-authored-by: Konge <zkonge@outlook.com>
2020-08-07 20:21:33 -07:00
Steve Dower 135de08128
bpo-41490: Update ensurepip to install pip 20.2.1 and setuptools 49.2.1 (GH-21775) 2020-08-07 23:10:32 +01:00
Miss Islington (bot) 713ba03276
bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754)
(cherry picked from commit 777b611c8c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-08-06 09:52:57 -07:00
Batuhan Taskaya b24c9d2b06
[3.8] bpo-40726: handle uninitalized end_lineno on ast.increment_lineno (GH-21745)
…no (GH-20312).

(cherry picked from commit 8f4380d2f5)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>

Automerge-Triggered-By: @pablogsal
2020-08-05 11:37:19 -07:00
Miss Islington (bot) b934d832d1
bpo-41467: Fix asyncio recv_into() on Windows (GH-21720)
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
(cherry picked from commit 602a971a2a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-03 17:58:06 -07:00
Miss Islington (bot) 4bc8445c39
bpo-41425: Make tkinter doc example runnable (GH-21706)
Co-authored-by: Ankit Chandawala <achandaw@amazon.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit c36dbac588)
2020-08-03 00:25:04 -04:00
Miss Islington (bot) 7cfede6859
closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569)
This consolidates the handling of my_fgets return values, so that interrupts are always handled, even if they come after EOF.

 I believe PyOS_StdioReadline is still buggy in that I/O errors will not result in a proper Python exception being set. However, that is a separate issue.
(cherry picked from commit a74eea238f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-07-28 18:16:19 -07:00
Guido van Rossum 3baff21f5b
[3.8] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (#21647)
Co-Authored-By: Rishi <rishi93dev@gmail.com>

(cherry picked from commit 13efaec)

Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
2020-07-27 16:22:16 -07:00
Miss Islington (bot) 104adedf64
bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)
... when an unknown option is passed.  TypeError was being raised because a 2to3 fix was missing.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit f1d40f941a)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2020-07-26 22:14:49 -04:00
Miss Islington (bot) b99f770230
bpo-41314: fixed annotations __future__ version (GH-21616)
PEP 563 was updated to change the release where `from __future__ import annotations` becomes the default (and only) behavior from 4.0 to 3.10. Update `__future__.py` and its docs to reflect this.
(cherry picked from commit 0028c14073)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
2020-07-25 15:00:17 -07:00
Miss Islington (bot) 949cf93f8e
bpo-38731: Fix NameError in command-line interface of py_compile (GH-21617)
(cherry picked from commit 2024d7aca1)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2020-07-26 00:03:50 +03:00
Miss Islington (bot) 1c562ced21
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines (GH-21597)
Fixes regression in 3.8.4 and 3.9.0b4.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 0dd463c8a4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-24 20:38:46 -07:00
Terry Jan Reedy 29df301a92
[3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
Also one in news log.

(cherry picked from commit 592527f3ee)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-23 04:18:03 -04:00
Steve Dower a18f22ab11
bpo-41364: Reduce import overhead of uuid module (GH-21586) 2020-07-22 12:26:37 +01:00
Miss Islington (bot) f599f9ea3c
bpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)
(cherry picked from commit 84761c3cc4)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-20 17:09:51 -07:00
Łukasz Langa 580fbb018f
Python 3.8.5
Contains security fixes for CVE-2019-20907, CVE-2020-15801, and BPO-39603.
2020-07-20 15:01:32 +02:00
Miss Islington (bot) 58f59a9621
bpo-37703: improve asyncio.gather documentation regarding cancellation (GH-15312)
These changes updates the doc to comprehensively mention the behaviour of gather.cancel()

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

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
2020-07-20 02:00:51 -07:00
Miss Islington (bot) 892fc8d328
bpo-40741: Update macOS installer to use SQLite 3.32.3 (GH-20979)
(cherry picked from commit 7cf1cb36ec)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-07-19 23:37:57 -07:00
Miss Islington (bot) 38d930f2cc
bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)
Walk down the MRO backwards to find the type that originally defined the final `tp_setattro`, then make sure we are not jumping over intermediate C-level bases with the Python-level call.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit c53b310e59)

Co-authored-by: scoder <stefan_ml@behnel.de>
2020-07-18 14:37:43 -07:00
Miss Islington (bot) 668d321476
bpo-39603: Prevent header injection in http methods (GH-18485)
reject control chars in http method in http.client.putrequest to prevent http header injection
(cherry picked from commit 8ca8a2e8fb)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
2020-07-18 13:39:12 -07:00
Miss Islington (bot) 79ed1a53fa
bpo-41304: Update NEWS to include CVE-2020-15801 reference (GH-21521)
(cherry picked from commit 164b04c47e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-17 17:54:11 +01:00
Miss Islington (bot) ffeb920254
[3.8] bpo-41300: IDLE - save files with non-ascii chars (GH-21512)
Fix regression released in 3.9.0b4 and 3.8.4.
(cherry picked from commit 38d3864efe)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-16 18:47:52 -04:00
Miss Islington (bot) 3b6a8d2455
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)
(cherry picked from commit 936a660945)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-15 15:15:37 -07:00
Felix Yan 16eea45fbd
[3.8] bpo-41302: Support system libmpdec 2.5 for Python 3.8 (GH-21488)
Define UNUSED only when mpdecimal.h doesn't define it. This would support
building with system libmpdec 2.5 while retaining compatibility with system
libmpdec 2.4 or the vendored copy.

Tested to build fine with either system libmpdec or the vendored one.
2020-07-15 22:22:23 +02:00
Miss Islington (bot) c55479556d
[3.8] bpo-39017: Avoid infinite loop in the tarfile module (GH-21454) (GH-21483)
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).
(cherry picked from commit 5a8d121a1f)


Co-authored-by: Rishi <rishi_devan@mail.com>

Automerge-Triggered-By: @encukou
2020-07-15 05:30:53 -07:00
Łukasz Langa 0277b914ca Python 3.8.4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl8MT5gACgkQsmmV4xAl
 BWg0CA//Q+aC/BwXrpPrUfgFAGF1UlwxkRlaEfDRvA+Yip3mo2QR005w4xfxkrzS
 8A0PNWOMH/nbmGabmZ/2xZH4ntOvjy2/+5Bcmj1tqNuDOc1gUqywuQ9MtDmW6w+6
 oZ7NE/m948NJwlnoreJCOu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/MFduBRXCyNJKeUmSi2wawnBnT2vk3XFadLdfnM8UWU7JvtjBmki/YOQK
 D9mAXzOgDMpnah4ora2YeS554OxwxbIyJlf2PilRL6MMZ7mSqpndEYvFPd9yeIoK
 HWTKpyTM3W1UOAAZzs09UdOg17Aq1Ei6jLaeEm2uI3mvCP6YUlcQxZVSq5GVkaR1
 eB8JB5plCdM83mrP+9XPXCD+MPaO5V0L+1O2lxcJuwVl4kRKW6tsA6NoDbRqLdk+
 EnlryOAALHbk3aDD/J+qhfjNgPsfeuJLC9nvB6IkUWw57TcjKWReVHLhELfUmOkO
 3EP8tA3k9w==
 =YNqk
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.4' into 3.8

Python 3.8.4
2020-07-13 22:49:45 +02:00
Miss Islington (bot) f56c75ed53
bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)
Automerge-Triggered-By: @tiran
(cherry picked from commit 4f309abf55)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-13 06:05:44 -07:00
Łukasz Langa dfa645a65e
Python 3.8.4 2020-07-13 14:11:53 +02:00
Miss Islington (bot) 33672c0191
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)
The issue is triggered by the bytearray() + bytearray() operation.

Detected by GCC 10 static analysis tool.
(cherry picked from commit 61fc23ca10)

Co-authored-by: stratakis <cstratak@redhat.com>
2020-07-10 03:15:59 -07:00
Miss Islington (bot) 3d1c06e8b9
bpo-37765: Add keywords to IDLE tab completions (GH-15138)
Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key.

Rewrite Completions doc.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit bce2eb4646)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-09 15:54:44 -07:00
Tony Solomonik 0b6169e391
bpo-41247: asyncio.set_running_loop() cache running loop holder (#21406)
The running loop holder cache variable was always set to NULL when
calling set_running_loop.

Now set_running_loop saves the newly created running loop holder in the
cache variable for faster access in get_running_loop.
2020-07-09 10:38:46 -07:00
Miss Islington (bot) 54babbe976
bpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback() (GH-21407)
(cherry picked from commit ee96f32ca2)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-09 03:15:36 -07:00
Miss Islington (bot) c1c5034593
bpo-40597: Allow email.contextmanager set_content() to set a null string. (GH-20542)
(cherry picked from commit 4fa61a7732)

Co-authored-by: Mark Sapiro <mark@msapiro.net>
2020-07-08 14:18:38 -07:00
Miss Islington (bot) c8b599ff0a
closes bpo-41235: Fix the error handling in SSLContext.load_dh_params() (GH-21385)
(cherry picked from commit aebc049557)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-07 21:37:50 -07:00
Miss Islington (bot) 41db8ffc59
bpo-41218: Only mark async code with CO_COROUTINE. (GH-21357)
3.8.3 had a regression where compiling with
ast.PyCF_ALLOW_TOP_LEVEL_AWAIT woudl agressively mark things are
coroutine even if there were not.
(cherry picked from commit bd46174a5a)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2020-07-06 14:44:16 -07:00
Miss Islington (bot) aa7f775614
bpo-29778: Ensure python3.dll is loaded from correct locations when Python is embedded (GH-21297) (GH-21352)
Also enables using debug build of `python3_d.dll`
Reference: CVE-2020-15523
(cherry picked from commit dcbaa1b49c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-06 19:12:16 +02:00