Commit Graph

23614 Commits

Author SHA1 Message Date
Miss Islington (bot) 95cc37f6b8
bpo-41412 and bpo-40948: Windows installer updates (GH-21656)
Prevent installation on Windows 8 and earlier.
Download UCRT on demand when required (non-updated Windows 8.1 only)
Add reference to py launcher to post-install message
(cherry picked from commit 37a06cbe5c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-28 08:55:38 -07:00
Guido van Rossum e962e3f65a
[3.9] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (GH-21645)
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:01:49 -07:00
Miss Islington (bot) 8b052751d3
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:12 -04:00
Miss Islington (bot) 6e4975a1c7
bpo-41182 selector: use DefaultSelector based upon implementation (GH-21257)
On some platform such as VMware ESXi, DefaultSelector fails
to detect selector due to default value.
This fix adds a check and uses the correct selector depending upon
select implementation and actual call.

Fixes: [bpo-41182]()

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit bcd47837a9)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-26 08:32:25 -07:00
Miss Islington (bot) 41d1c04f73
bpo-41341: Recursive evaluation of ForwardRef in get_type_hints (GH-21553)
The issue raised by recursive evaluation is infinite recursion with
recursive types. In that case, only the first recursive ForwardRef is
evaluated.
(cherry picked from commit 653f420b53)

Co-authored-by: wyfo <joperez@hotmail.fr>
2020-07-26 08:31:24 -07:00
Miss Islington (bot) fdc91c2e60
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:48 -07:00
Berker Peksag 2024d7aca1
bpo-38731: Fix NameError in command-line interface of py_compile (GH-21617) 2020-07-25 23:43:47 +03:00
Miss Islington (bot) 15fdbb7145
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:39:31 -07:00
Miss Islington (bot) 4ff8e5ba4f
bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (GH-21595)
(cherry picked from commit 0dd98c2d00)

Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
2020-07-23 13:02:47 -07:00
Miss Islington (bot) 4cf7afcefc
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-22 23:25:59 -07:00
Miss Islington (bot) 00466db221
bpo-41364: Reduce import overhead of uuid module (GH-21586)
(cherry picked from commit bf2f76ec09)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-21 17:09:32 -07:00
Miss Islington (bot) d6ba8c8e16
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:10:32 -07:00
Łukasz Langa 8ad7d506ca
Python 3.9.0b5 2020-07-20 19:47:09 +02:00
Miss Islington (bot) 46634b7aa8
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:01:39 -07:00
Miss Islington (bot) 2fbb0d8da9
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:50 -07:00
Miss Islington (bot) 01ab963460
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:39:02 -07:00
Miss Islington (bot) 27b811057f
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:41:55 -07:00
Miss Islington (bot) a16ac4e43c
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:53:56 +01:00
Miss Islington (bot) 5a7aa28045
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 15:42:09 -07:00
Miss Islington (bot) 28e93dd2b2
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:14:48 -07:00
Miss Islington (bot) f3232294ee
[3.9] bpo-39017: Avoid infinite loop in the tarfile module (GH-21454) (GH-21482)
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:33 -07:00
Miss Islington (bot) 57c984fab6
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:09:27 -07:00
Miss Islington (bot) 51b36ed96d
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:18:45 -07:00
Miss Islington (bot) fd27fb7f3d
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:14 -07:00
Miss Islington (bot) 90584c02b4
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:18:30 -07:00
Miss Islington (bot) e68978978f
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:21:00 -07:00
Miss Islington (bot) fbd71f6684
bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401)
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.

Automerge-Triggered-By: @1st1
(cherry picked from commit 529f42645d)

Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
2020-07-08 12:47:20 -07:00
Miss Islington (bot) a0a6f11678
Revert "bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() (GH-19378)" (GH-21390)
This partially reverts commit 45ec5b99ae.
(cherry picked from commit b26a0db8ea)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-07-08 02:19:38 -07:00
Miss Islington (bot) 1d1c574340
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:40:18 -07:00
Miss Islington (bot) 2c82628e9a
bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)
Automerge-Triggered-By: @jaraco
(cherry picked from commit 6ae2780be0)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2020-07-07 04:31:32 -07:00
Pablo Galindo 6488a4a3c9
[3.9] bpo-41218: Only mark async code with CO_COROUTINE. (GH-21357) (GH-21362)
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 bd46174)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2020-07-06 23:30:20 +01:00
Pablo Galindo 54f115dd53
[3.9] bpo-41215: Don't use NULL by default in the PEG parser keyword list (GH-21355) (GH-21356)
(cherry picked from commit 39e76c0fb0)

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

Automerge-Triggered-By: @lysnikolaou
2020-07-06 12:29:59 -07:00
Miss Islington (bot) 4981fe36c7
bpo-29778: Ensure python3.dll is loaded from correct locations when Python is embedded (GH-21297)
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 09:52:13 -07:00
Miss Islington (bot) 5a1384935e
bpo-39168: Remove the __new__ method of typing.Generic (GH-21327)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 7fed75597f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-05 09:02:40 -07:00
Steve Dower e1d4fdc533
bpo-41162: Clear audit hooks later during finalization (GH-21222)
Co-authored-by: Konge <zkonge@outlook.com>
2020-07-03 22:58:29 +01:00
Łukasz Langa b0bb791313 Python 3.9.0b4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl7+ICsACgkQsmmV4xAl
 BWjNgg//fTnAwme/3pJU6MiYy9K6nes+498B9pjqbmm08Afb7n7Jx/N8hKr7Bx7w
 QL7KzXltmGyKQwU7D9436eXCWkkkYn5wGt/snsgPAxf0wgg2T9vaJMvw48XNZatD
 zRY8Jh9fdKZMA3HNuUkFGpun6sB/IP/JyeCUK66ZKdcW0YLrU6ycWt5E6Vh8BQxQ
 YHyqJXFhsTW1XgkxbMbhSAv60DBBmHX2Wdtnhezpqu92eYlCVNI++adNc4A5v5t7
 fdxAJOsdbqiZMEcV6xwlfdlciBE3Y0Eu0DH6z1gfeKN69+2E+mrOzTOvhNJ+tZAs
 R7KRcVZZMxdiB0QMlEYjZS/zABp8XBQEDByonvEIdCcrGRS/jH7NP04+nUtnjUnB
 BT3dNimwVqJHCJkfgzUrTXjz5tPwzLB4SA/bJDjM1ifDS2Ml+lk/WcemMNe6IKv+
 ukIi8dvRJmx/W7Nrevu7EDsQnOqwkMjR9sUcwysJNA2iDQ3cePQ/GhPQHBWBgSA+
 voiem2SDC7MOBw47yxELk8P96DpoYGZ0IACDMXTrlaqQqXPOpNY27rf1ofpTRBUf
 iukBrZh2DPw4l3EO/CXhVDY8MA3YRWaPyYr44kv/GSFZ+IaLiaeGH+Wc05832C2d
 KN+p/MVUK/gKQWUh/KZ3dYWhKHSs1tFxz8pA1wWdDTnubIKnk1I=
 =9XaI
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl7/YSkQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaNqAD/98JLK6EnZSOLduPWcXs/hNCnSek8Wf4V5e
 fx7h3Oh58x2lUMGwroLICWWNKEU3KGVXxhC/RZj7EefIwDzZQHFFHNuz/MyF5nqS
 NJ7TbVks4nLPQMkxqXCRSiIB9O8XNAfIBzGqqRMKXoan5Nt30FN30MPKZT9JpD1l
 pcFcZ7jAYmEZekRW5JZB+6R5AfUI1WMoxT4NBKWZ7QCD9lGvR1iorHERnZ1GXGFn
 2c4xk3wc/RgzuoMaEC4LhmObUVLmjuF3PC5WtnV710wARVGQgsOWkp0YsHk+KFHN
 M2XFZdgCSmSXgNzHUYszFN2SYe7oZtI9IZJRjmHKjMPN1PwOjUmENn8WBwD5bjHO
 PWA2dSazN1ZzaLmngNOx1NBwLu7p85dMpnYSiG1qKRpsD5DtCbKS0tSHdExSmhHT
 3Ju2oInJcswWqk2SVHDauq3ocLxaYlf0lRl71G6p56eN9DrTSj0wDrhjoseRpNkm
 s0ZrpCUYZWR3T9kTTxJjYTnoA1x7TybOSJFHe+dKVfggO0n2/Ytuy+HOTRY+BPrc
 0x2TNbfkAL2Vla5e5wxv+zQkZhBoRZRpf1k3A5mJg8ZMC9c69HEpMDEJI8wzQd0a
 kf+T+XzuUIdS/lzFTWu/KWRXpNj9PXsjjN6vbmDC3U0qcU2y27bQKfFWwX/nyROe
 onLsxvD8EQ==
 =Y3oI
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.0b4' into 3.9

Python 3.9.0b4
2020-07-03 18:47:34 +02:00
Victor Stinner f8599279b6
[3.9] bpo-41194: The _ast module cannot be loaded more than once (GH-21290) (GH-21292)
* bpo-41194: Pass module state in Python-ast.c (GH-21284)

Rework asdl_c.py to pass the module state to functions in
Python-ast.c, instead of using astmodulestate_global.

Handle also PyState_AddModule() failure in init_types().

(cherry picked from commit 74419f0c64)

* bpo-41194: The _ast module cannot be loaded more than once (GH-21290)

Fix a crash in the _ast module: it can no longer be loaded more than
once. It now uses a global state rather than a module state.

* Move _ast module state: use a global state instead.
* Set _astmodule.m_size to -1, so the extension cannot be loaded more
  than once.

(cherry picked from commit 91e1bc18bd)
2020-07-03 16:57:19 +02:00
Miss Islington (bot) bfec674254
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 148f329135)

Co-authored-by: scoder <stefan_ml@behnel.de>
2020-07-02 17:28:41 -07:00
Łukasz Langa 69dec9c8d2
Python 3.9.0b4 2020-07-02 19:57:45 +02:00
Miss Islington (bot) 0b4c87ef8f
bpo-41193: Ignore OSError in readline write_history() (GH-21279)
The write_history() atexit function of the readline completer now
ignores any OSError to ignore error if the filesystem is read-only,
instead of only ignoring FileNotFoundError and PermissionError.
(cherry picked from commit 0ab917e07e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-07-02 04:02:16 -07:00
Serhiy Storchaka ecfecc2d6c
[3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21275)
(cherry picked from commit 9355868458)
2020-07-02 10:05:16 +03:00
Miss Islington (bot) df59293bf0
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() (GH-20874)
(cherry picked from commit 004e64e805)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
2020-07-01 21:06:51 -07:00
Miss Islington (bot) c84d3fe6b3
bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243) (#21244)
(cherry picked from commit 1648c99932)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-30 21:07:12 +02:00
Miss Islington (bot) 01638ce51a
bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)
(cherry picked from commit 2515a28230)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-29 17:36:46 -07:00
Miss Islington (bot) 9a646aa82d
bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033)
The __hash__() methods of classes IPv4Interface and IPv6Interface had issue
of generating constant hash values of 32 and 128 respectively causing hash collisions.
The fix uses the hash() function to generate hash values for the objects
instead of XOR operation
(cherry picked from commit b30ee26e36)

Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
2020-06-29 11:15:32 -07:00
Miss Islington (bot) 9e36b6e6c8
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
(cherry picked from commit 7f569c9bc0)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2020-06-29 05:07:31 -07:00
Miss Islington (bot) 119de0eba8
bpo-40874 Update the required libmpdec version for the decimal module (GH-21202)
(cherry picked from commit 8bea91b5e9)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-28 22:24:58 +02:00
Miss Islington (bot) d1e05e78a3
bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
Fix also a resource warning when store counts and module info.
(cherry picked from commit 04cdeb7a56)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-28 03:52:26 -07:00
Miss Islington (bot) 1497bf66f9
bpo-41144: Fix IDLE open module error (GH-21182)
Could not open os.path.

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

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-06-27 23:22:05 -07:00
Guido van Rossum 2a1ee1d970
[3.9] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21022) 2020-06-27 17:34:30 -07:00