Commit Graph

45300 Commits

Author SHA1 Message Date
Ethan Furman 5efb1a77e7
[3.8] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22283)
fix default `_missing_` to return `None` instead of raising a `ValueError`
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>.
(cherry picked from commit c95ad7a91f)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 17:38:14 -07:00
Miss Islington (bot) 007eddad3b
_auto_called cleanup (GH-22285)
(cherry picked from commit fc23a9483e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 17:28:32 -07:00
Miss Islington (bot) 3f4012117b
bpo-41517: do not allow Enums to be extended (GH-22271)
fix bug that let Enums be extended via multiple inheritance
(cherry picked from commit 3064dbf5df)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 07:30:54 -07:00
Miss Islington (bot) 929112ef81
bpo-41789: honor object overrides in Enum classes (GH-22250)
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed.  This patch fixes that.

Automerge-Triggered-By: @ethanfurman
(cherry picked from commit 22415ad625)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-15 17:16:36 -07:00
Miss Islington (bot) 8f8ebcca95
bpo-39587: Enum - use correct mixed-in data type (GH-22263)
(cherry picked from commit bff01f3a3a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-15 16:23:57 -07:00
Ethan Furman 38c8d3930e
[3.8] bpo-37479: Enum - use correct __format__ (GH-14545)
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__.
(cherry picked from commit 2f19e82fbe)

Co-authored-by: thatneat <thatneat@users.noreply.github.com>
2020-09-13 13:47:43 -07:00
Miss Islington (bot) 530d1105ed
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
(cherry picked from commit 1b0f0e3d7d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-12 00:09:54 -07:00
Miss Islington (bot) 77901dc6c3
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
(cherry picked from commit 7e711ead26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-11 23:43:27 -07:00
Miss Islington (bot) 9133b01b58
Update idlelib/help.html to current IDLE doc (GH-22181)
(cherry picked from commit 471247150e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-09 16:10:09 -07:00
Miss Islington (bot) 9171dc2827
bpo-41525: Make the Python program help ASCII-only (GH-21836)
(cherry picked from commit 58de1dd6a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-08 17:46:41 -07:00
Mariatta 7799dd38e7
[3.8] Fix typo in typing.py (GH-22121) (GH-22158)
This is a trivial PR to fix a typo in a docstring in typing.py. From reverences -> references.
(cherry picked from commit 84ef33c511)

Co-authored-by: Graham Bleaney <gbleaney@gmail.com>

Automerge-Triggered-By: @Mariatta
2020-09-08 16:28:02 -07:00
Łukasz Langa 7c6dc8517e Python 3.8.6rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl9WV1gACgkQsmmV4xAl
 BWhaFA/+MhK/h03WVVmcmK53W3aU70AHhLLlRhftYSxN6hUgEYWt8VFupOtD8947
 56RDjlpDKxeRiErjxT2ymLCdkiLCbXSfVD2aKY2H76370On4SKMjAB2VcPa2dsA9
 cw8HPjc3CzXxSYBz1+aKc5OJsw+Bv+T+7wlfbJSlzSnP3E71Ny/Esko5bVqzwj1B
 cUT6y0Pt+Vwb0lJQEDtVaPGRNqBuJjc6yi0EScz0WIXQlBR+eialYMHb8IbNGsrR
 2FT2K8gktXltpfsMSb2eInj6YaZNsshNw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L/HyE25ZgRyc0ZVEolELx3eGZR9UyQg/l8KJpOLQI
 tMnTMIxuoLzPEBvFtHHp7L7/V11OmWl4ojW8Vl3thYbXGScjtHVEXh4GRm0dT1br
 VigswpqDx+Njj/XqNUanZo59rtWiLB6b5b6z0y4JvPxF3BX6GFRRsUOO8ILUENma
 bf0QNqrN1Q==
 =/G5i
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.6rc1' into 3.8

Python 3.8.6rc1
2020-09-08 11:38:51 +02:00
Miss Islington (bot) ebef6c0b50
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
(cherry picked from commit fd4cafd470)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-07 09:28:04 -07:00
Łukasz Langa 08bd63da6e
Python 3.8.6rc1 2020-09-07 17:52:19 +02:00
Victor Stinner 84105cbaa3
bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133) (GH-22135)
The error is exposed on non-UTF-8 locales.

(cherry picked from commit 67987acd5d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit c73ee5acc9)
2020-09-07 17:27:03 +02:00
Miss Islington (bot) 4bcff52447
bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22086)
(cherry picked from commit 54a66ade20)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-09-04 18:55:44 +09:00
Miss Islington (bot) 40e2444c36
bpo-39010: Improve test shutdown (GH-22066) (#22083)
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to GH-22017
(cherry picked from commit be435ae2b0)

Co-authored-by: Ben Darnell <ben@bendarnell.com>

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2020-09-03 13:54:36 -07:00
Miss Islington (bot) 1f5f127377
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072)
* bpo-41696: Fix handling of debug mode in asyncio.run

This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run

* 📜🤖 Added by blurb_it.

Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948c)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-09-03 13:54:06 -07:00
Miss Islington (bot) a986b061a3
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035)
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3)

Co-authored-by: Ben Darnell <ben@bendarnell.com>

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2020-09-03 12:38:34 -07:00
Pablo Galindo 77f4000ae0
[3.8] [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22046)
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95cc)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>.
(cherry picked from commit 87e91ae2e5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-01 21:40:48 +01:00
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) 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
Miss Islington (bot) 1370d9dd9f
bpo-41572: Fix grammar in BaseTransport.close docstring (GH-21914) (GH-21930)
Fix grammar in BaseTransport.close docstring.

https://bugs.python.org/issue41572

Signed-off-by: Cleber Rosa <crosa@redhat.com>
(cherry picked from commit 1afb42cfa8)

Co-authored-by: Cleber Rosa <cleber.gnu@gmail.com>
2020-08-21 17:49:58 +05:30
Frank Dana 34889a5785
[3.8] venv: Update Aspen URL in 'activate' script comment (GH-21797)
A comment in the venv `activate` script (as well as `activate.csh` and `activate.fish`) referencing Aspen magic directories lists a "further information" URL for Aspen at the zetadev.com website. zetadev.com changed ownership in 2019, and now redirects to a server in China with an expired security certificate.

Out of an abundance of caution, while not changing the _code_ for the activate scripts, this PR updates the URL in those comments to reference Aspen's new documentation home at https://aspen.io/.

No issue created, as I suspect this falls within the definition of a "trivial" change. Please let me know if I'm wrong about that, and I'll open the necessary issue(s).

While filed against the 3.8 branch, strictly speaking this is not a backported PR. The comment in question was entirely removed from the script between Python 3.8 and 3.9.

(IMHO this _should_ probably be backported to 3.7 and 3.6, as well. I'll happily file those PRs if needed.)

Automerge-Triggered-By: @vsajip
2020-08-19 12:34:50 -07:00
Miss Islington (bot) 2bcd0fe7a5
Fix typo in message from assert statement (GH-21283)
The error message was missing space between the action "acquire" and "_wait_semaphore" which is an attribute for instances of Condition.
(cherry picked from commit 99c0ee3c89)

Co-authored-by: Allen <64019758+aboddie@users.noreply.github.com>
2020-08-17 08:32:11 -07: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) 2a9f709ba2
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
Automerge-Triggered-By: @ericvsmith
(cherry picked from commit e55de68be3)

Co-authored-by: Rishav Kundu <rk@rishav.io>
2020-08-13 18:51:21 -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) 860bc0ea70
bpo-41514: Fix buggy IDLE test (GH-21808)
test_run method test_fatal_error failed when run twice, as with
python -m test -m test_fatal_error test_idle test_idle
because func.called was not reinitialized to 0.
This bug caused a failure on a refleak buildbot.
(cherry picked from commit 416f0b71ba)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-10 07:01:14 -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) 692552388d
Improve renamed test_run.RecursionLimitTest (GH-21794)
PEP 8 style and new comments.
(cherry picked from commit 8b67bf907c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-09 10:35:59 -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) 87bc22051f
bpo-41473: Skip test_gdb with gdb 9.2 to work around gdb bug (GH-21768)
gdb 9.2 on Fedora Rawhide is not reliable, see:

* https://bugs.python.org/issue41473
* https://bugzilla.redhat.com/show_bug.cgi?id=1866884
(cherry picked from commit e27a51c11e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-07 09:15:37 -07:00
Miss Islington (bot) b5789a7419
bpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736)
(cherry picked from commit 52f98424a5)

Co-authored-by: Eric L. Frederich <eric.frederich@gmail.com>
2020-08-05 14:43:16 -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) 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) 33cebe0b9a
bpo-41385: Fix test_executable_without_cwd on Windows (GH-21608)
(cherry picked from commit b1a87300a0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-26 00:38:48 -07: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
Terry Jan Reedy a667e1c66a
[3.8] bpo-37309: NEWS for #41373 (GH-21612)
Cherry-picked from  af08db7.
2020-07-25 00:33:01 -04: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