Commit Graph

23826 Commits

Author SHA1 Message Date
Miss Islington (bot) 3966e2ea41
bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)
(cherry picked from commit 0159e5efee)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2020-12-29 05:22:13 -08:00
Miss Islington (bot) df794406a8
Allow / character in username,password fields in _PROXY envvars. (GH-23973)
(cherry picked from commit 030a713183)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
2020-12-29 04:46:05 -08:00
Miss Islington (bot) 71d73900eb
bpo-16396: fix BPO number in changelog (GH-23951) (GH-23956)
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit 7865f516f3)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-12-29 13:52:12 +02:00
Miss Islington (bot) 578caafabe
bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)
Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.
(cherry picked from commit 1df56bc059)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-29 03:18:26 -08:00
Miss Islington (bot) 7acfe41257
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)
When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True.  This
reconciles the behavior to be consistent and adds a test to guarantee it.

Also clarifies the existing check_output documentation.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
(cherry picked from commit 64abf37344)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-12-24 21:18:37 -08:00
Miss Islington (bot) 5a6b5d8c39
bpo-42727: Fix the NEWS entry .rst (GH-23932)
It was causing CI failures.  the offending file came from https://github.com/python/cpython/pull/23917

```
python3 tools/rstlint.py ../Misc/NEWS.d/next/
[2] ../Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst:1: default role used
[2] ../Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst:2: default role used
2 problems with severity 2 found.
Makefile:204: recipe for target 'check' failed
```
(cherry picked from commit 8badadec53)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-12-24 20:53:27 -08:00
Ethan Furman f7dca9b9c8
[3.9] bpo-42727: [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917). (GH-23926)
* [3.9] [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917).
(cherry picked from commit 6ec0adefad)
2020-12-24 12:02:38 -08:00
Miss Islington (bot) 3bb85672bb
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
On Fedora 31 gdb is using python 3.7.9, calling `proxyval` on an instance with a dictionary fails because of the `dict.iteritems` usage. This PR changes the code to be compatible with py2 and py3.

This changed seemed small enough to not need an issue and news blurb, if one is required please let me know.

Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit b57ada98da)

Co-authored-by: Augusto Hack <hack.augusto@gmail.com>
2020-12-24 09:37:07 -08:00
Miss Islington (bot) 8e5c61a075
bpo-34463: Make python tracebacks identical to C tracebacks for SyntaxErrors without a lineno (GH-23427)
(cherry picked from commit 069560b117)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-22 14:12:30 -08:00
Miss Islington (bot) 409ce4a09e
bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23870)
In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural.  For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this:

    try:
        self.getInputValue()
        return True
    except (InputErrors, SomethingElse):
        return False

As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple.  However, the reference documentation was never updated to match this new restriction.  Make it clear that the definition is no longer recursive.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c95f8bc270)

Co-authored-by: Colin Watson <cjwatson@debian.org>

Co-authored-by: Colin Watson <cjwatson@debian.org>
2020-12-20 16:18:08 -05:00
Miss Islington (bot) 4b155967b3
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708) (GH-23866)
Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a44ce6c9f7)

Co-authored-by: Matti Picus <matti.picus@gmail.com>

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2020-12-20 04:54:18 +00:00
Miss Islington (bot) 6ad5fd1482
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467) (GH-23788)
(cherry picked from commit b9ced83cf4)
2020-12-19 19:28:59 +02:00
Serhiy Storchaka 87e7a14ee3
[3.9] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) (GH-23853)
* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.

(cherry picked from commit 3d569fd6dc)
2020-12-19 13:08:07 +02:00
Miss Islington (bot) 82dbfd5a04
bpo-41891: ensure asyncio.wait_for waits for task completion (GH-22461) (#23840)
(cherry picked from commit 17ef4319a3)

Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>

Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
2020-12-18 11:19:10 -08:00
Miss Islington (bot) 14619924c3
bpo-17140: Document multiprocessing's ThreadPool (GH-23812)
Up until now, the `multiprocessing.pool.ThreadPool` class has gone
undocumented, despite being a public class in multiprocessing that is
included in `multiprocessing.pool.__all__`.
(cherry picked from commit 84ebcf271a)

Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
2020-12-18 05:27:02 -08:00
Miss Islington (bot) 79c535796d
bpo-42613: Fix freeze.py config directory (GH-23792) (GH-23817)
Fix freeze.py tool to use the prope config and library directories.
(cherry picked from commit 1c653f17cb)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-17 15:29:36 +01:00
Miss Islington (bot) 8d0a01c99b
bpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23388)
Same as FreeBSD, file descriptors in /dev/fd id from 0 to 63.
(cherry picked from commit 13b865f0e1)

Co-authored-by: David CARLIER <devnexen@gmail.com>

Co-authored-by: David CARLIER <devnexen@gmail.com>
2020-12-17 12:15:20 +01:00
Miss Islington (bot) 78062e07bc
bpo-37961: Fix regression in tracemalloc.Traceback.__repr__ (GH-23805)
Regression in 8d59eb1b66.
(cherry picked from commit 051b981867)

Co-authored-by: Daniel Hahler <git@thequod.de>
2020-12-16 14:01:14 -08:00
Miss Islington (bot) 9d409d6b47
bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654)
(cherry picked from commit 8374d2ee15)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2020-12-16 09:56:10 -08:00
Miss Islington (bot) db63da7e5d
bpo-42644: Validate values in logging.disable() (GH-23786)
* bpo-42644: Validate values in logging.disable()

Technically make the value of manager a property that checks and convert
values assigned to it properly. This has the side effect of making
`logging.disable` also accept strings representing the various level of
warnings.

We want to validate the type of the disable attribute at assignment
time, as it is later compared to other levels when emitting warnings and
would generate a `TypeError: '>=' not supported between ....` in a
different part of the code base, which can make it difficult to track
down.

When assigned an incorrect value; it will raise a TypeError when the
wrong type, or ValueError if an invalid str.

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit b32d8b4f9b)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2020-12-16 02:12:08 -08:00
Serhiy Storchaka 28bf6ab61f
[3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281). (GH-23784)
(cherry picked from commit a26215db11)
2020-12-15 20:44:44 +02: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) 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 02e23f1a1c Python 3.9.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl/ONh8ACgkQsmmV4xAl
 BWhaoA//VV/uZGi1TYkDFLJ79qfYjPBjhFk5fbhUUJmvH86ZtX2J50m/b+Oe2cNE
 ujeG+vmvqFQQbFso8LaaSYAL1+VZUuLNA1c726yJxQ3z2DabtFigqjZw8AYGGqGd
 kUfcpzEGvq7Qog/TUq6S+ZKN4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+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) 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) 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) 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) 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