Commit Graph

108136 Commits

Author SHA1 Message Date
Lysandros Nikolaou 2b800ef809
bpo-42374: Allow unparenthesized walrus in genexps (GH-23319) (GH-23329)
This fixes a regression that was introduced by the new parser.

(cherry picked from commit cb3e5ed071)
2020-11-17 01:38:58 +02:00
Miss Islington (bot) cf70854f10
bpo-42350: Fix Thread._reset_internal_locks() (GH-23268)
Fix the threading.Thread class at fork: do nothing if the thread is
already stopped (ex: fork called at Python exit). Previously, an
error was logged in the child process.
(cherry picked from commit 5909a494cd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-11-16 07:17:17 -08:00
Miss Islington (bot) 7c4d8fa82a
bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297)
The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
(cherry picked from commit aa01011003)

Co-authored-by: Yash Shete <universeyash4@gmail.com>
2020-11-15 21:27:03 -08:00
Miss Islington (bot) ec0788c7c9
More updates to the descriptor howto guide (GH-23238) (GH-23308) 2020-11-15 18:27:56 -08:00
Miss Islington (bot) 2369759a47
bpo-42317: Improve docs of typing.get_args concerning Union (GH-23254)
(cherry picked from commit c3b9592244)

Co-authored-by: Dominik1123 <15989985+Dominik1123@users.noreply.github.com>
2020-11-15 17:52:22 -08:00
Miss Islington (bot) 2837241f22
fix typo in ThreadedChildWatcher docs (GH-23277)
(cherry picked from commit 8836574a0f)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2020-11-14 04:24:21 -08:00
Miss Islington (bot) faadc52e75
bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271)
(cherry picked from commit 9b6934230c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-13 14:47:27 -08:00
Miss Islington (bot) 4defeb0071
bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) (GH-23270)
(cherry picked from commit bbeb2d266d)

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
2020-11-13 13:19:05 -05:00
Dong-hee Na 0f4dd87a31
[3.9] bpo-42042: Use ids attribute instead of names attribute (GH-22739) (GH-23265)
(cherry picked from commit 09490a109f)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2020-11-14 00:45:02 +09:00
Victor Stinner ec306a2fd9
bpo-41617: Add _Py__has_builtin() macro (GH-23260) (GH-23262)
Fix building pycore_bitutils.h internal header on old clang version
without __builtin_bswap16() (ex: Xcode 4.6.3 on Mac OS X 10.7).

Add a new private _Py__has_builtin() macro to check for availability
of a preprocessor builtin function.

Co-Authored-By: Joshua Root <jmr@macports.org>

Co-authored-by: Joshua Root <jmr@macports.org>
(cherry picked from commit b3b98082c5)
2020-11-13 16:38:06 +01:00
Miss Islington (bot) e5729aef6f
bpo-42296: On Windows, fix CTRL+C regression (GH-23257)
On Windows, fix a regression in signal handling which prevented to
interrupt a program using CTRL+C. The signal handler can be run in a
thread different than the Python thread, in which case the test
deciding if the thread can handle signals is wrong.

On Windows, _PyEval_SignalReceived() now always sets eval_breaker to
1 since it cannot test _Py_ThreadCanHandleSignals(), and
  eval_frame_handle_pending() always calls
  _Py_ThreadCanHandleSignals() to recompute eval_breaker.
(cherry picked from commit d96a7a8313)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-11-13 06:11:38 -08:00
Miss Islington (bot) bc77704783
[3.9] bpo-42086: Document AST operator nodes acts as a singleton (GH-22896) (GH-22897)
Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit b37c994e5a)


Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2020-11-13 01:05:41 -08:00
Miss Islington (bot) 7ae19ef5cf
bpo-42237: Fix os.sendfile() on illumos (GH-23154)
(cherry picked from commit fd4ed57674)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2020-11-12 02:14:03 -08:00
Miss Islington (bot) 33922cb0aa
bpo-42140: Improve asyncio.wait function (GH-22938)
GH- Improve asyncio.wait function

The original code creates the futures set two times.
We can create this set before, avoiding the second creation.

This new behaviour [breaks the aiokafka library](https://github.com/aio-libs/aiokafka/pull/672), because it gives an iterator to that function, so the second iteration become empty.

Automerge-Triggered-By: GH:1st1
(cherry picked from commit 7e5ef0a571)

Co-authored-by: Diogo Dutra <diogodutradamata@gmail.com>
2020-11-10 15:10:57 -08:00
Zackery Spytz f8bea0a44d
[3.9] bpo-4bpo-42314: Fix the documentation for venv --upgrade-deps (GH-22113) (GH-23232)
It was added in 3.9, not 3.8.
2020-11-10 23:06:34 +00:00
Miss Islington (bot) 14a343a9af
bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585)
The onerror is supposed to be called with failed function, but in this case lstat is wrongly used instead of open.

Not sure if this needs bug or not...

Automerge-Triggered-By: GH:hynek
(cherry picked from commit e59b2deffd)

Co-authored-by: Michal Čihař <michal@cihar.com>
2020-11-10 08:29:35 -08:00
Miss Islington (bot) 90115a2cf7
bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020)
The overflow occurs under some circumstances when a task or future
recursively returns itself.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 42d873c63a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2020-11-10 06:20:52 -08:00
Miss Islington (bot) 2a86ade9e3
Fix typo in unicodeobject.c (GH-23180)
exeeds -> exceeds

Automerge-Triggered-By: GH:Mariatta
(cherry picked from commit 38811d68ca)

Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
2020-11-09 22:18:34 -08:00
Miss Islington (bot) 371c33567a
bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075)
It is not clear why this can happen, but several users have mentioned
getting this exception on macOS.
(cherry picked from commit 23831a7a90)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-08 02:07:44 -08:00
Miss Islington (bot) 2e5bd4f677
Minor wording change in concurrent.futures. (GH-23194)
Fixes a grammar problem by adding a missing "as", and clarifies the wording of the valid ranges for max_workers.
(cherry picked from commit fd6f6fa403)

Co-authored-by: Don Kirkby <donkirkby@users.noreply.github.com>
2020-11-08 01:45:45 -08:00
Miss Islington (bot) e81e09bfc8
bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081)
Noticed by @serhiy-storchaka in the bpo.  `typing`'s types were not showing the parameterized generic.
Eg. previously:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict, list]'
```
Now:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict[str, float], list[int]]'
```

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit 1f7dfb277e)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
2020-11-07 08:46:08 -08:00
Raymond Hettinger 4c239a3222
Minor grammar edits for the descriptor howto guide (GH-#23175) (GH-23186) 2020-11-06 16:46:10 -08:00
Miss Islington (bot) 6255296c50
Remove outdated reference to pywin32 from platform module (GH-22005)
(cherry picked from commit 7c01f1540f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-11-06 11:22:00 -08:00
Miss Islington (bot) e74fb2d766
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)
(cherry picked from commit bde33e428d)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-11-05 19:05:57 -08:00
Miss Islington (bot) 3997a4e6bc
Disable peg generator tests when building with PGO (GH-23141)
Otherwise, when running the testsuite, test_peg_generator tries to compile C
code using the optimized flags and fails because it cannot find the profile
data.
(cherry picked from commit 100964e031)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
2020-11-04 15:22:13 -08:00
Miss Skeleton (bot) 72bb4c6c1f
bpo-35455: Fix thread_time for Solaris OS (GH-11118) (GH-23130)
(cherry picked from commit 9568622c99)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2020-11-04 13:16:28 +00:00
Miss Skeleton (bot) e899c016ec
Enable signing of nuget.org packages and update to supported timestamp server (GH-23132)
(cherry picked from commit db6434c474)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-03 14:52:41 -08:00
Miss Skeleton (bot) 9bc07874e3
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
(cherry picked from commit 212d32f45c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-03 13:32:59 -08:00
Miss Skeleton (bot) 6b7a90db36
bpo-42180: fix plural in arguments and control (GH-23015) (GH-23114)
https://bugs.python.org/issue42180
(cherry picked from commit b76a840021)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2020-11-03 01:08:38 +00:00
Miss Skeleton (bot) e277cb7698
bpo-42103: Improve validation of Plist files. (GH-22882)
* Prevent some possible DoS attacks via providing invalid Plist files
  with extremely large number of objects or collection sizes.
* Raise InvalidFileException for too large bytes and string size instead of returning garbage.
* Raise InvalidFileException instead of ValueError for specific invalid datetime (NaN).
* Raise InvalidFileException instead of TypeError for non-hashable dict keys.
* Add more tests for invalid Plist files.
(cherry picked from commit 34637a0ce2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-02 13:34:46 -08:00
Lysandros Nikolaou 723e21a8e7
bpo-42224: Fix test_format when locale does not expect number grouping (GH-23067)
(cherry picked from commit 301822859b)
2020-11-02 17:51:56 +02:00
Miss Skeleton (bot) ff852aabf2
bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables (GH-23073)
People call wait() and as_completed() with various non-set iterables,
a list should be the most common but there are others as well[1].

Considering typeshed also documents wait()[2] and as_completed()[3]
as accepting arbitrary iterables I think it's a good idea to document
the status quo better.

[1] https://github.com/aio-libs/aiokafka/pull/672
[2] 620989bac5/stdlib/3/asyncio/tasks.pyiGH-L161
[3] 620989bac5/stdlib/3/asyncio/tasks.pyiGH-L40
(cherry picked from commit 3d86d090dc)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2020-11-02 03:19:45 -08:00
Miss Skeleton (bot) 27c72ba45a
Minor formatting edits to the descriptor howto guide (GH-23092) (GH-23095) 2020-11-01 20:55:57 -08:00
Miss Skeleton (bot) 79e9f06149
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
They were occurring with both repeated 'force-calltip' invocations and by typing parentheses
 in expressions, strings, and comments in the argument code.

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

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2020-11-01 20:49:39 -08:00
Miss Skeleton (bot) d4cfbfe9a2
Add member objects to the descriptor howto guide (GH-23084) (GH-23090) 2020-11-01 18:27:58 -08:00
Miss Skeleton (bot) 81dd2c0914
Expand and clarify the "Invoking Descriptors" section of the Descriptor HowTo (GH-23078) (GH-23080) 2020-11-01 10:09:46 -08:00
Miss Skeleton (bot) 0312efcd2b
bpo-37483: Add PyObject_CallOneArg() in the What's New in Python 3.9 (GH-23062)
(cherry picked from commit 7feb54a634)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2020-11-01 05:27:01 -08:00
Miss Skeleton (bot) 3defcbac2c
[3.9] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) (GH-23071)
[[bpo-29566]()]() notes that binhex.binhex uses inconsistent line endings (both Unix and MacOS9 line endings are used). This PR changes this to use the MacOS9 line endings everywhere.
(cherry picked from commit 2165cea548)


Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

Automerge-Triggered-By: GH:ronaldoussoren
2020-11-01 01:39:26 -08:00
Lysandros Nikolaou cfcb952e30
[3.9] bpo-42218: Correctly handle errors in left-recursive rules (GH-23065) (GH-23066)
Left-recursive rules need to check for errors explicitly, since
even if the rule returns NULL, the parsing might continue and lead
to long-distance failures.

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

Automerge-Triggered-By: GH:lysnikolaou
2020-10-31 12:06:03 -07:00
kj dbaa07db67
[3.9] bpo-42198: Document __new__ for types.GenericAlias (GH-23039) (GH-23061)
(cherry picked from commit bcbf758476)
2020-10-31 08:05:36 -07:00
Pablo Galindo ddcd57e3ea
[3.9] bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the barry_as_flufl rule (GH-23048) (GH-23051)
(cherry picked from commit 06f8c3328d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-31 00:40:42 +00:00
Miss Skeleton (bot) 09c6120be8
bpo-42208: GitHub Action: Add gdb to posix dependencies (GH-23043) (GH-23047)
Sort also dependencies and remove duplicates (liblzma-dev).
(cherry picked from commit 6e03c0ad15)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-10-30 23:16:17 +01:00
Miss Skeleton (bot) a39068bf48
bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)
Follow up to 7cdf30fff3 and 4173320920. This addresses the point "1. Update links in typing, subscription and union to point to GenericAlias." in the bpo for this PR.
(cherry picked from commit 9129af6050)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
2020-10-29 21:23:33 -07:00
Miss Skeleton (bot) b626d2218c
bpo-42061: Document __format__ for IP addresses (GH-23018)
Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 3317466061)

Co-authored-by: Teugea Ioan-Teodor <teodor.teugea@gmail.com>
2020-10-29 15:38:12 -07:00
Miss Skeleton (bot) 60324d26b5
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the func object (GH-22953) (GH-23021)
func_dealloc() does not handle partially-created objects. Best not to give it any.
(cherry picked from commit 350526105f)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
2020-10-29 13:02:50 +02:00
kj 577d7c4e62
[3.9] bpo-41805: Documentation for PEP 585 (GH-22615) (GH-23016)
Backport of #22615 to 3.9 since that couldn't be auto-merged due to conflicts.
2020-10-28 08:33:36 -07:00
Lysandros Nikolaou 24a7c298d4
[3.9] bpo-42123: Run the parser two times and only enable invalid rules on the second run (GH-22111) (GH-23011)
* Implement running the parser a second time for the errors messages

The first parser run is only responsible for detecting whether
there is a `SyntaxError` or not. If there isn't the AST gets returned.
Otherwise, the parser is run a second time with all the `invalid_*`
rules enabled so that all the customized error messages get produced.

(cherry picked from commit bca7014032)
2020-10-28 02:14:15 +02:00
Lysandros Nikolaou c4b58cea47
[3.9] bpo-41659: Disallow curly brace directly after primary (GH-22996) (#23006)
(cherry picked from commit 15acc4eaba)
2020-10-28 00:38:42 +02:00
Lysandros Nikolaou 8aee019d71
[3.9] Remove git conflict lines from test_parse_directory in peg_generator (GH-23007) 2020-10-28 00:37:36 +02:00
Miss Skeleton (bot) 2cb259fcf3
bpo-6761: Enhance __call__ documentation (GH-7987)
(cherry picked from commit 95f710c557)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-27 09:42:36 -07:00