Commit Graph

47196 Commits

Author SHA1 Message Date
Miss Islington (bot) 4e0147ec50
bpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694)
(cherry picked from commit 8ed1833912)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-08-10 07:31:00 -07:00
Miss Islington (bot) d86bbe3cff
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in its context chain (GH-27626)
Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
(cherry picked from commit d5c217475c)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-08-10 06:47:23 -07:00
Miss Islington (bot) 52d481f15c
make lib2to3 parse async generators everywhere (GH-6588)
(cherry picked from commit 149addd496)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2021-08-10 06:47:11 -07:00
Miss Islington (bot) a3185da26f
bpo-41402: Fix email ContentManager calling .encode() on bytes (GH-21631)
(cherry picked from commit b33186bc43)

Co-authored-by: Johannes Reiff <mail@jreiff.de>
2021-08-09 16:44:17 -07:00
Miss Islington (bot) 8ece98a7e4
bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034)
This was causing test___all__ to fail on platforms lacking a shared
memory implementation.

Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit d097876111)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-08-09 10:39:05 -07:00
Miss Islington (bot) d5c8ad2471
bpo-32695: Docs and tests for compresslevel and preset kwargs in tarfile (GH-21470)
Co-Authored-By: Bo Bayles <bbayles@gmail.com>
(cherry picked from commit eb2d4a66ff)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-08-09 03:30:30 -07:00
Mark Shannon 762ef85f44
bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to after CFG optimization. (GH-27656) (#27673)
(cherry picked from commit b854557b49)
2021-08-09 10:54:48 +01:00
Miss Islington (bot) 7d6a0fe5b8
Upgrade bundled pip and setuptools (GH-27625)
pip is now 21.2.3
setuptools is now 57.4.0
(cherry picked from commit 738ac00a08)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-08-07 09:38:40 -07:00
Miss Islington (bot) 66dd1a0e64
bpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633) (GH-27640) 2021-08-06 15:11:44 -05:00
Miss Islington (bot) 2b1e713f87
bpo-44822: Don't truncate `str`s with embedded NULL chars returned by `sqlite3` UDF callbacks (GH-27588)
(cherry picked from commit 8f010dc920)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-08-06 10:59:51 -07:00
Miss Islington (bot) a5d9963276
bpo-40928: notify users running test_decimal on macOS of malloc warnings (GH-26783)
* When trying to allocate very large regions on macOS, malloc does not   fail silently. It sends a noisy error out to STDERR
* This provides a helper function to warn the user, and provides the warning for test_decimal, which consistently generates these warnings on macOS.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 15d3c14df3)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-08-06 10:09:06 -07:00
Miss Islington (bot) 36a2497093
bpo-44524: Fix an issue wherein `_GenericAlias._name` was not properly set for specialforms (GH-27614)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8bdf12e99a)

Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
2021-08-06 10:08:27 -07:00
Miss Islington (bot) a11158ecef
bpo-44584: Deprecate PYTHONTHREADDEBUG env var (GH-27065)
The threading debug (PYTHONTHREADDEBUG environment variable) is
deprecated in Python 3.10 and will be removed in Python 3.12. This
feature requires a debug build of Python.
(cherry picked from commit 4d77691172)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-08-06 04:32:37 -07:00
Pablo Galindo Salgado b1bd16c252
[3.10] bpo-44838: Refine the custom syntax errors for invalid 'if' expressions (GH-27615). (GH-27616)
…

(cherry picked from commit f5cbea6b1b)

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

Automerge-Triggered-By: GH:lysnikolaou
2021-08-05 11:00:19 -07:00
Miss Islington (bot) 536e35ae6a
bpo-44801: Check arguments in substitution of ParamSpec in Callable (GH-27585)
(cherry picked from commit 3875a69547)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-04 13:36:01 -07:00
Miss Islington (bot) c2593b4d06
bpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Alexander Vandenbulcke <alexander.vandenbulcke95@gmail.com>
(cherry picked from commit a8dc4893d2)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-08-04 13:03:33 -07:00
Miss Islington (bot) bc2841c7a9
bpo-44808: fixes test for interactive inspect getsource of a class (GH-27571)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 58325971de)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-08-03 06:07:59 -07:00
Miss Islington (bot) 8ce7f2f4ef
bpo-39091: Fix segfault when Exception constructor returns non-exception for gen.throw. (GH-17658) (GH-27572)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit 83ca46b778)

Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
2021-08-03 12:10:38 +02:00
Pablo Galindo cc115e5bf6
Python 3.10.0rc1 2021-08-02 20:53:59 +01:00
Miss Islington (bot) 567176249e
bpo-44792: Improve syntax errors for if expressions (GH-27506) (GH-27565)
(cherry picked from commit 28b6dc9dd5)

Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
2021-08-02 20:05:33 +01:00
Miss Islington (bot) aa7266854a
bpo-44785: Silence deprecation warnings in test_pickle (GH-27538)
(cherry picked from commit 36d952d228)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-02 10:09:05 -07:00
Miss Islington (bot) 2cc19a5463
bpo-44806: Fix __init__ in subclasses of protocols (GH-27545)
Non-protocol subclasses of protocol ignore now the __init__ method
inherited from protocol base classes.
(cherry picked from commit 043cd60abe)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-02 10:08:59 -07:00
Miss Islington (bot) a1eaa74d9d
bpo-44808: Fix test_inspect in refleak mode (GH-27544)
(cherry picked from commit 626d397cc1)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-08-02 06:41:08 -07:00
Miss Islington (bot) 1bc83eb5c8
bpo-44781: make distutils test suppress deprecation warning from import distutils (GH-27485) (GH-27540)
(cherry picked from commit a9134fa2ff)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-08-02 11:54:52 +02:00
Miss Islington (bot) 33a4010198
bpo-44667: Treat correctly lines ending with comments and no newlines in the Python tokenizer (GH-27499) (GH-27500)
(cherry picked from commit b6bde9fc42)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-08-02 11:43:45 +02:00
Miss Islington (bot) c8db292012
bpo-44793: Fix checking the number of arguments when subscribe a generic type with ParamSpec parameter. (GH-27515)
For example Callable[P, T][[int], str, float] will now raise an error.

Use also term "arguments" instead of "parameters" in error
message for too few/many arguments.
(cherry picked from commit f92b9133ef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-02 00:08:24 -07:00
Miss Islington (bot) 21d5897982
bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508) (#27510)
Addressing issues with tests under error on warnings.

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit 1cf8424a62)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-07-31 23:01:38 -04:00
Miss Islington (bot) 35035bc35a
bpo-34013: Don't consider a grouped expression when reporting legacy print syntax errors (GH-27521)
(cherry picked from commit 208a7e957b)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-31 18:31:44 -07:00
Miss Islington (bot) 76903ff9ce
bpo-44794: Merge tests for typing.Callable and collection.abc.Callable (GH-27507)
(cherry picked from commit be4cb9089a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-31 10:25:22 -07:00
Miss Islington (bot) 12073fc6fd
Trivial typo in docstring (#27504)
(cherry picked from commit 4b4227b907)

Co-authored-by: Jesús Cea <jcea@jcea.es>

Co-authored-by: Jesús Cea <jcea@jcea.es>
2021-07-31 07:04:45 +02:00
Miss Islington (bot) f468ede4a2
bpo-44648: Fix error type in inspect.getsource() in interactive session (GH-27171) (GH-27495)
(cherry picked from commit 48a62559df)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-30 19:46:42 +02:00
Miss Islington (bot) 440c9f772a
bpo-43625: Enhance csv sniffer has_headers() to be more accurate (GH-26939) (GH-27494)
(cherry picked from commit ceea579ccc)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-30 19:30:09 +02:00
Miss Islington (bot) 6f950023c6
bpo-42892: fix email multipart attribute error (GH-26903) (GH-27492)
(cherry picked from commit e3f877c32d)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-30 19:27:06 +02:00
Miss Islington (bot) 0db6c143ae
bpo-44666: Use default encoding as fallback for compile_file (GH-27236) (GH-27488)
When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
(cherry picked from commit 80f0707629)
2021-07-30 19:12:05 +02:00
Miss Islington (bot) 6e6dc25173
bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475) (GH-27487)
(cherry picked from commit 6ff8903809)
2021-07-30 17:20:59 +01:00
Miss Islington (bot) f7f1c26423
Update URLs in comments and metadata to use HTTPS (GH-27458) (GH-27478)
(cherry picked from commit be42c06bb0)

Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
2021-07-30 16:25:28 +02:00
Miss Islington (bot) 56122b0bba
bpo-44761: Change default value of NewType __module__ attr (GH-27406) (GH-27477)
(cherry picked from commit 7b975f81e4)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-30 15:48:01 +02:00
Erlend Egeberg Aasland 0cb470e622
[3.10] bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431). (GH-27472)
(cherry picked from commit 7e311e496b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-07-30 14:01:22 +02:00
Miss Islington (bot) 472997659b
bpo-44662: Add ability to annotate types.Union (GH-27214) (GH-27461)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 8182c8329c)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-30 11:31:54 +02:00
Miss Islington (bot) a438b37d9f
To fix the random failed test cases of test___xxsubinterpreters in multiprocess. (GH-27240) (GH-27452)
(cherry picked from commit 9101b39e67)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2021-07-29 19:27:24 +02:00
Miss Islington (bot) f8e13e35d1
bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433) (GH-27447)
(cherry picked from commit 6741794dd4)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-07-29 17:44:42 +02:00
Miss Islington (bot) d20f1095a6
bpo-44752: Make rlcompleter not call `@property` methods (GH-27401) (GH-27444)
* rlcompleter was calling these methods to identify whether to add
  parenthesis to the completion, based on if the attribute is callable.
* for property objects, completion with parenthesis are never desirable.
* property methods with print statements behaved very strangely, which
  was especially unfriendly to language newcomers. <tab> could suddenly
  produce output unexpectedly.
(cherry picked from commit 50de8f74f8)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-07-29 14:07:00 +02:00
Miss Islington (bot) 405f5c5491
[3.10] bpo-43897: Reject "_" captures and top-level MatchStar in the AST validator (GH-27432) (GH-27435)
(cherry picked from commit 8d0647485d)


Co-authored-by: Brandt Bucher <brandt@python.org>

Automerge-Triggered-By: GH:brandtbucher
2021-07-28 18:02:14 -07:00
Miss Islington (bot) 8789add991
bpo-27827: identify a greater range of reserved filename on Windows. (GH-26698) (GH-27421)
`pathlib.PureWindowsPath.is_reserved()` now identifies as reserved
filenames with trailing spaces or colons.

Co-authored-by: Barney Gale <barney.gale@foundry.com>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
(cherry picked from commit 56c1f6d7ed)
2021-07-28 17:01:47 +02:00
Miss Islington (bot) 5eabf246b6
Change type check to isinstance in pipes (GH-27291) (GH-27416)
(cherry picked from commit 9ffbb89946)

Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
2021-07-28 16:08:51 +02:00
Jason R. Coombs 684eb5cb80
[3.10] bpo-44461: Check early that a pdb target is valid for execution. (GH-27227) (GH-27399)
Automerge-Triggered-By: GH:jaraco
2021-07-28 06:04:38 -07:00
Miss Islington (bot) 5502ee052f
bpo-44600: Refactor new tracing tests (GH-27396) (GH-27404)
(cherry picked from commit 38ddc8beb3)

Co-authored-by: Brandt Bucher <brandt@python.org>
2021-07-28 14:38:39 +02:00
Miss Islington (bot) 68e3dca068
bpo-34013: Move the Python 2 hints from the exception constructor to the parser (GH-27392)
(cherry picked from commit ecc3c8e421)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-27 14:19:18 -07:00
Pablo Galindo Salgado b977f8510e
[3.10] bpo-34013: Generalize the invalid legacy statement error message (GH-27389). (GH-27391)
(cherry picked from commit 6948964ecf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-27 18:52:32 +01:00
Miss Islington (bot) 6fc1efa454
bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) (GH-27380)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 11749e2dc2)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-27 00:34:32 +02:00