Commit Graph

108090 Commits

Author SHA1 Message Date
Miss Islington (bot) 99d37a0ee8
bpo-33610: Edit idlelib.codecontext (GH-23773) (GH-23775)
Add sentence to module docstring and import tkinter items.
(cherry picked from commit 6f79e60b66)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-12-15 07:51:56 -05:00
Ethan Furman 9d1fff1fcd
[3.9] bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714) (GH-23772)
When creating an Enum, `type.__new__` calls `__init_subclass__`, but at that point the members have not been added.

This patch suppresses the initial call, then manually calls the ancestor `__init_subclass__` before returning the new Enum class.
(cherry picked from commit 6bd94de168)
2020-12-14 18:41:34 -08:00
Miss Islington (bot) aba12b67c1
[3.9] bpo-42517: [Enum] deprecate private name members (GH-23722) (GH-23748)
private names will raise a DeprecationWarning; in 3.10 they will become normal attributes
2020-12-14 15:56:58 -08:00
Victor Stinner 6b2ed38509
bpo-42591: Export missing Py_FrozenMain() symbol (GH-23730) (GH-23734)
Export the Py_FrozenMain() function: fix a Python 3.9.0 regression.
Python 3.9 uses -fvisibility=hidden and the function was not exported
explicitly and so not exported.

(cherry picked from commit b5c7b38f5e)
2020-12-15 00:31:54 +01:00
Miss Islington (bot) 33cbb04986
bpo-40084: Enum - dir() includes member attributes (GH-19219)
(cherry picked from commit 68526fe258)

Co-authored-by: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com>
2020-12-14 14:43:43 -08:00
Miss Islington (bot) dbb00062dc
bpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736) (GH-23747)
(cherry picked from commit 67b769f515)

Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
2020-12-14 14:33:27 -08:00
Miss Islington (bot) 20bc40ef44
bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)
Add positional only args support to lib2to3 pgen2.

This adds 3.8's PEP-570 support to lib2to3's pgen2.  lib2to3, while
being deprecated is still used by things to parse all versions of Python
code today.  We need it to support parsing modern 3.8 and 3.9 constructs.

Also add tests for complex *expr and **expr's.
(cherry picked from commit 42c9f0fd0a)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-12-14 09:38:03 -08:00
kj 33b3fedd43
[3.9] bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and typing (GH-23765)
Backport of GH-23060.
2020-12-14 08:30:45 -08:00
Karthikeyan Singaravelan 14f2a124e2
[3.9] bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH-23613) (GH-23676)
Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function
(cherry picked from commit c598a04dd2)

Co-authored-by: idanw206 <31290383+idanw206@users.noreply.github.com>
2020-12-14 11:19:16 +05:30
Miss Islington (bot) 3dcdbdeb48
bpo-42598: Fix implicit function declarations in configure (GH-23690) (GH-23756)
This is invalid in C99 and later and is an error with some compilers
(e.g. clang in Xcode 12), and can thus cause configure checks to
produce incorrect results.
(cherry picked from commit 674fa0a740)

Co-authored-by: Joshua Root <jmr@macports.org>
2020-12-13 17:01:00 -05:00
Miss Islington (bot) be9e4402db
[3.9] bpo-41879: Doc: Fix description of async for statement (GH-23548) (GH-23749)
Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables.  This fix is relevant for version 3.7 onward.
(cherry picked from commit 4b8cdfcb22)


Co-authored-by: Nick Gaya <nicholasgaya+github@gmail.com>
2020-12-12 20:24:31 -08:00
Andre Delfino c1a3f9a9cb
[3.9] [doc] Link to issue regarding logging.disable level param default value GH-23732
(cherry picked from commit 2a35137328)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-12-10 06:20:04 -08:00
Ethan Furman 4b37228823
[3.9] [Enum] reformat and add doc strings (GH-23705). (GH-23707)
* [3.9] [Enum] reformat and add doc strings (GH-23705).
2020-12-08 14:29:02 -08:00
Miss Islington (bot) 14eaa7d752
bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23703)
(cherry picked from commit 37440eef7f)
2020-12-08 11:52:24 -08:00
Terry Jan Reedy a3a4bf3b8d
[3.9] bpo-41910: move news entry (GH-23697) 2020-12-08 13:00:13 -05:00
Victor Stinner f0e42ae03c
bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642) (GH-23692)
Fix encoding name when running a ".pyc" file on Windows:
PyRun_SimpleFileExFlags() now uses the correct encoding to decode the
filename.

* Add pyrun_file() subfunction.
* Add pyrun_simple_file() subfunction.
* PyRun_SimpleFileExFlags() now calls _Py_fopen_obj() rather than
  _Py_fopen().

(cherry picked from commit b6d98c10ff)
2020-12-08 16:16:05 +01:00
Łukasz Langa 170dec3598
Post 3.9.1 2020-12-08 03:09:53 +01:00
Łukasz Langa 02e23f1a1c Python 3.9.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl/ONh8ACgkQsmmV4xAl
 BWhaoA//VV/uZGi1TYkDFLJ79qfYjPBjhFk5fbhUUJmvH86ZtX2J50m/b+Oe2cNE
 ujeG+vmvqFQQbFso8LaaSYAL1+VZUuLNA1c726yJxQ3z2DabtFigqjZw8AYGGqGd
 kUfcpzEGvq7Qog/TUq6S+ZKN4ZqQReHJcfJbMlCSwT1Fx+ikKUAd6So+3zfq7Gxf
 KuPhIwS4EQ6j+mFSHQdyQFe1kpw8JdsC1TPLg7CxyjzV1HJ4FpMR5ywRed1Js0e0
 3N0cKYCYVfk3DpiWAPQbZBRx10vL8R/OLHB14yj1pfms22romAdxj79WxFs4WFpK
 FWZWGOiOX/3oUl384W02hVUwTx3NvxgGVB75hviPIEnpKD6ZSeY2BmxvHCgq4Iux
 IewagVWGuSHjCEZJ4dJ5sQi+qyyVXle+SVFyzo9FvVSz/0Lu8dWNboUZdwBNrLe2
 kqe6L5Hbc/btdUXyNNn55O1NoXEOjNKDrmzQOF97q67vAP7/sOrA8CDvC194uXQn
 F3eJ6dEz8RxDAKRVtbA/406cHfpDfIGrP3/qnsNx0RFFA6u8E6CX8aKYGIxH4JXM
 9rwK51b/YosSEYO55BU18IKO8xneZvTw9obuPP9OAVIfqKNtMzchYN44U061nJWp
 vHI26IYNrcczZbzjDuKGGlFMqJS2AK9y8EVZaWF4SnQ9GcuFT3k=
 =QcbP
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl/O4GgQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaNOoEACamdMttppS3shIy9khA+ZdFds5ho1lSUWt
 /q4z86nkPgqiZKkHQejUVNO3otTReFfQ8TSMc307M51J6Fc9l5vxfiQWO3AAFG8p
 PArxnO7JctCQu8AMqVY57ireamcOEpJKxMpcWb65c3suHTXRunypLEMBkxhJX/xY
 HBfeyRIlVJWB4Unx6nk8JPQQ9GDY0lPWOMDnWUZlqJuuYRSE4cbVsEdJbZ+PqW6p
 TS6lY2j17KM4cA/ViN2eyvw0VODJ16kILce6snpcjdSqoCVrfkewxsx2pwUkbCij
 q4kpMrJrSD3lr5NDu+/qHMO46g1ijtukqyGAQrZ2Q/oGp8KEdTvv6Fc4Pc+TMNAz
 25z2DVM08AzJ+HBf5LeB9i8qRBNT2Q3R8T3M4LuGpAEV5pWTfXwGqk9tWOG4brb6
 roJLtrD92u5ZbRD62aPHcf3pJcg6hBhCl62YOF1uivNcxxDZ0QC4dn2VAvRvpDaR
 7RiP9MCcZ2sQw6EAn1RKFcGC/F9kBOzsTslWfN9PVGTwH2rou0fAnsII+edBeHjH
 rQn9Z4TA7Y5EtcEra0fUthcTPecvVpWkziVZ2UlYQFsgRUHcq+xlyGM3bhDg+hoj
 jaker7336cLERQA+dbP7sqcQui28SqYONrFQdPmW/9j5TzSnrgNuXJXNzbqkXG9q
 83VFvpF5Sw==
 =6vLf
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.1' into 3.9

Python 3.9.1
2020-12-08 03:09:42 +01:00
Miss Islington (bot) be52ca45d9
bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23673)
(cherry picked from commit c266736ec1)
2020-12-07 15:51:16 -08:00
Brandt Bucher 60463e8e4f
bpo-42536: GC track recycled tuples (GH-23623) (GH-23651)
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:

- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip

Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1c)
2020-12-07 20:07:48 +00:00
Miss Islington (bot) e9a6dcdefa
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match distutils (GH-22088)
(cherry picked from commit c0afb7fa0e)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2020-12-07 09:56:44 -08:00
Łukasz Langa 1e5d33e9b9
Python 3.9.1 2020-12-07 15:02:38 +01:00
Miss Islington (bot) facca72eae
bpo-38843: Document behavior of default when the attribute is already set (GH-23653) (#23668)
(cherry picked from commit 752cdf21eb)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2020-12-06 21:17:09 -08:00
Miss Islington (bot) 2a9a883d36
bpo-42508: Keep IDLE running on macOS (GH-23577) (GH-23669)
Remove obsolete workaround that prevented running files with
shortcuts when using new universal2 installers built on macOS 11.
Ignore buggy 2nd run_module_event call.
(cherry picked from commit 57e5113610)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-12-06 22:48:48 -05:00
Miss Islington (bot) 8502d46e36
[3.9] bpo-42576: Clarify only debug builds are affected in news (GH-23663) (GH-23666)
(cherry picked from commit 6a7fb9d31b)


Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>

Automerge-Triggered-By: GH:gvanrossum
2020-12-06 09:00:57 -08:00
Miss Islington (bot) d5c029b1a9
bpo-42576: Raise TypeError when passing in keyword arguments to GenericAlias (GH-23656)
Use `_PyArg_NoKeywords` instead of `_PyArg_NoKwnames` when checking the `kwds` tuple when creating `GenericAlias`. This fixes an interpreter crash when passing in keyword arguments to `GenericAlias`'s constructor.

Needs backport to 3.9.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit 804d6893b8)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
2020-12-05 08:24:38 -08:00
Miss Islington (bot) b630ca7bc1
[3.9] bpo-5054: CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed (GH-23638) (GH-23657)
(cherry picked from commit da3d2abe6b)


Co-authored-by: Senthil Kumaran <senthil@uthcode.com>

Automerge-Triggered-By: GH:orsenthil
2020-12-05 07:26:37 -08:00
Miss Islington (bot) 06002b3f0d
[3.9] bpo-41116: Fix setup.py test for macOS Tcl/Tk frameworks (GH-23649) (GH-23650)
If no explicit macOS SDK was specified, setup.py should check for
Tcl and TK frameworks in /Library/Frameworks; the previous commit
inadvertently broke that test.
(cherry picked from commit 29afab6c5f)

Co-authored-by: Ned Deily <nad@python.org>
2020-12-04 23:26:59 -05:00
Miss Islington (bot) d1f07419c7
bpo-17735: inspect.findsource now raises OSError when co_lineno is out of range (GH-23633)
This can happen when a file was edited after it was imported.
(cherry picked from commit 2e0760bb2e)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-05 00:41:58 +02:00
Miss Islington (bot) 40b92f1cc0
[3.9] bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531) (GH-23578)
(cherry picked from commit 427613f005)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-04 12:57:31 -08:00
Miss Islington (bot) 81ac030d03
bpo-42116: Fix inspect.getsource handling of trailing comments (GH-23630)
(cherry picked from commit 6e1eec71f5)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-04 12:20:05 -08:00
Miss Islington (bot) c7cf66d2fe
bpo-41473: Reenable test_gdb on gdb 9.2 and newer (GH-23637)
https://bugzilla.redhat.com/show_bug.cgi?id=1866884 is fixed in gdb
10.1 (failed to reproduce on gdb-10.1-1.fc34.aarch64).
(cherry picked from commit 066394018a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-04 07:47:44 -08:00
Miss Islington (bot) 3689c25a10
bpo-42523: Fix supported versions in "Using Python on Windows" (GH-23603)
(cherry picked from commit db68544122)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-12-03 09:46:58 -08:00
Miss Islington (bot) 9f26833ced
bpo-42553: Fix test_asyncio.test_call_later() (GH-23627)
Fix test_asyncio.test_call_later() race condition: don't measure
asyncio performance in the call_later() unit test. The test failed
randomly on the CI.
(cherry picked from commit 7e5e13d113)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-03 05:20:07 -08:00
Miss Islington (bot) ae67db6b31
bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)
(cherry picked from commit f3c3ea91a7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-03 01:10:23 -08:00
Miss Islington (bot) 09a698b474
bpo-42504: fix for MACOSX_DEPLOYMENT_TARGET=11 (GH-23556)
macOS releases numbering has changed as of macOS 11 Big Sur.  Previously, major releases were of the form 10.x, 10.x+1, 10.x+2, etc; as of Big Sur, they are now x, x+1, etc, so, for example, 10.15, 10.15.1, ..., 10.15.7, 11, 11.0.1, 11.1, ..., 12, 12.1, etc. Allow Python to build with single-digit deployment target values. Patch provided by FX Coudert.
(cherry picked from commit 5291639e61)

Co-authored-by: FX Coudert <fxcoudert@gmail.com>
2020-12-02 19:43:08 -08:00
Miss Islington (bot) 9b34f34aa9
bpo-42521: Add note about 'Python -d' only working on debug builds (GH-23607)
(cherry picked from commit 99b594404d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-12-02 14:01:23 -08:00
Miss Islington (bot) ed4614386f
bpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595)
(cherry picked from commit 1867b462de)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-01 07:54:54 -08:00
Benjamin Peterson 0955f6863d
[3.9] build(deps): bump actions/upload-artifact from v2.2.0 to v2.2.1 (GH-23597)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.0 to v2.2.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.0...726a6dcd0199f578459862705eed35cda05af50b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 8acd0e0d49)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 09:30:03 -06:00
Miss Islington (bot) d33f3347de
build(deps): bump actions/cache from v2.1.2 to v2.1.3 (23582)
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.2 to v2.1.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.2...0781355a23dac32fd3bac414512f4b903437991a)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit a43fea8857)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 07:24:20 -08:00
Miss Islington (bot) ae48dd4db5
Add GCC pragmas to silence compiler warning about ffi_prep_closure (GH-23327) (GH-23590)
(cherry picked from commit cce3f0b0c8)

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

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-12-01 15:07:50 +00:00
Miss Islington (bot) 4a44f53aa8
[3.9] bpo-17852: Doc: Fix the tutorial about closing files (GH-23135) (GH-23527)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit c8aaf71dde)


Co-authored-by: Volker-Weissmann <39418860+Volker-Weissmann@users.noreply.github.com>
2020-12-01 02:53:42 -08:00
Miss Islington (bot) aef482f7cf
Fix bz2 examples markup (GH-23580)
(cherry picked from commit 80a429eae9)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-12-01 02:04:23 -08:00
Julien Palard 7e80c0f40e
[3.9] [doc] Fix smtplib and xml.dom.minidom mark-up (GH-22769) (GH-23380) 2020-12-01 08:58:36 +01:00
Miss Islington (bot) ff51e5ec26
bpo-42508: Remove bogus idlelib.pyshell.ModifiedInterpreter attribute (GH-23570) (GH-23571)
restart_subprocess is a method of self, the pyshell.InteractiveInterpreter instance. The latter does not have an interp attribute redundantly referring to itself. (The PyShell instance does have an interp attribute, referring to the InteractiveInterpreter instance.)
(cherry picked from commit e41bfd15dd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-11-30 17:36:06 -05:00
Miss Islington (bot) b2652f2d7e
bpo-42370: Check element before making mouse click in ttk tests (GH-23491)
(cherry picked from commit b0b428510c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-30 14:34:43 -08:00
Miss Islington (bot) aab9390334
bpo-42501: Revise the usage note for Enums with the choices (GH-23563) (GH-23573) 2020-11-30 13:21:08 -08:00
Miss Islington (bot) cf22aa3bc6
bpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ (GH-23534) (GH-23569) 2020-11-30 09:07:26 -08:00
Miss Islington (bot) 03ae7e4518
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c419f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-30 00:43:59 -08:00
Irit Katriel 586bdd1add
[3.9] bpo-42474: test TracebackException comparison to non-equal instances (GH-23557) 2020-11-29 17:40:45 -08:00