]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Serhiy Storchaka [Sat, 31 Jul 2021 17:05:45 +0000 (20:05 +0300)]
bpo-44794: Merge tests for typing.Callable and collection.abc.Callable (GH-27507)
Jack DeVries [Sat, 31 Jul 2021 16:27:55 +0000 (12:27 -0400)]
bpo-37880: for argparse add_argument with action='store_const', const now defaults to None. (GH-26707)
Jason R. Coombs [Sat, 31 Jul 2021 13:08:13 +0000 (09:08 -0400)]
bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508)
Addressing issues with tests under error on warnings.
Automerge-Triggered-By: GH:jaraco
Pablo Galindo Salgado [Sat, 31 Jul 2021 12:04:37 +0000 (13:04 +0100)]
Divide the grammar into sections to improve readability (GH-27502)
Jesús Cea [Sat, 31 Jul 2021 04:36:10 +0000 (06:36 +0200)]
Trivial typo in docstring
Pablo Galindo Salgado [Sat, 31 Jul 2021 01:17:09 +0000 (02:17 +0100)]
bpo-44667: Treat correctly lines ending with comments and no newlines in the Python tokenizer (GH-27499)
Jason R. Coombs [Sat, 31 Jul 2021 00:37:09 +0000 (20:37 -0400)]
bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. (#27497)
* bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak.
* Include new 'resources' dir in the Makefile.
andrei kulakov [Fri, 30 Jul 2021 17:17:46 +0000 (13:17 -0400)]
bpo-44648: Fix error type in inspect.getsource() in interactive session (GH-27171)
andrei kulakov [Fri, 30 Jul 2021 17:10:37 +0000 (13:10 -0400)]
bpo-43625: Enhance csv sniffer has_headers() to be more accurate (GH-26939)
andrei kulakov [Fri, 30 Jul 2021 17:05:49 +0000 (13:05 -0400)]
bpo-42892: fix email multipart attribute error (GH-26903)
andrei kulakov [Fri, 30 Jul 2021 16:52:44 +0000 (12:52 -0400)]
bpo-41911: Update docs for various expressions (GH-27470)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Stefan Hoelzl [Fri, 30 Jul 2021 16:38:42 +0000 (18:38 +0200)]
bpo-44666: Use default encoding as fallback for compile_file (GH-27236)
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>
Pablo Galindo Salgado [Fri, 30 Jul 2021 14:21:09 +0000 (15:21 +0100)]
Fail the CI if an optional module fails to compile (GH-27466)
Ori Avtalion [Fri, 30 Jul 2021 13:55:09 +0000 (16:55 +0300)]
Doc: Change errant 3.10.0 to 3.10, to match other mentions (GH-27459)
Noah Kantrowitz [Fri, 30 Jul 2021 13:54:46 +0000 (06:54 -0700)]
Update URLs in comments and metadata to use HTTPS (GH-27458)
Yurii Karabas [Fri, 30 Jul 2021 13:49:24 +0000 (16:49 +0300)]
bpo-44747: Refactor usage of sys._getframe at typing module (#27387)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Yurii Karabas [Fri, 30 Jul 2021 12:56:12 +0000 (15:56 +0300)]
bpo-44761: Change default value of NewType __module__ attr (GH-27406)
Vinay Sajip [Fri, 30 Jul 2021 11:48:50 +0000 (12:48 +0100)]
bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475)
Jason R. Coombs [Fri, 30 Jul 2021 01:05:05 +0000 (21:05 -0400)]
bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436)
* bpo-44771: Apply changes from importlib_resources@
3b24bd6307
* Add blurb
* Exclude namespacedata01 from eol conversion.
Pablo Galindo Salgado [Thu, 29 Jul 2021 21:42:21 +0000 (22:42 +0100)]
Add missing gdbm dependencies to the UNIX CI (GH-27467)
Erlend Egeberg Aasland [Thu, 29 Jul 2021 20:47:23 +0000 (22:47 +0200)]
bpo-31746: Fix broken call in GH-27431 (GH-27464)
Steve Dower [Thu, 29 Jul 2021 19:53:29 +0000 (20:53 +0100)]
bpo-44479: Do not regenerate files during a PGO build as it will invalidate the profile. (GH-27460)
Mark Shannon [Thu, 29 Jul 2021 19:50:03 +0000 (20:50 +0100)]
Minor fixes to specialization stats. (GH-27457)
* Use class, not value for fail stats for BINARY_SUBSCR.
* Fix counts for unquickened instructions.
Erlend Egeberg Aasland [Thu, 29 Jul 2021 19:45:32 +0000 (21:45 +0200)]
bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431)
Yurii Karabas [Thu, 29 Jul 2021 19:44:48 +0000 (22:44 +0300)]
bpo-44662: Add ability to annotate types.Union (#27214)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
HaeckelK [Thu, 29 Jul 2021 17:15:35 +0000 (18:15 +0100)]
Fix typo in ast.rst (GH-27449)
Co-authored-by: HaeckelK <haeckelk.github@gmail.com>
Hai Shi [Thu, 29 Jul 2021 17:05:49 +0000 (01:05 +0800)]
To fix the random failed test cases of test___xxsubinterpreters in multiprocess. (GH-27240)
Pavel [Thu, 29 Jul 2021 16:55:04 +0000 (12:55 -0400)]
bpo-44765: [doc] fix typo (GH-27430)
Irit Katriel [Thu, 29 Jul 2021 16:26:53 +0000 (17:26 +0100)]
bpo-44725 : expose specialization stats in python (GH-27192)
Jack DeVries [Thu, 29 Jul 2021 14:01:21 +0000 (10:01 -0400)]
bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433)
Jack DeVries [Thu, 29 Jul 2021 11:40:29 +0000 (07:40 -0400)]
bpo-44752: Make rlcompleter not call `@property` methods (GH-27401)
* 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.
Serhiy Storchaka [Thu, 29 Jul 2021 11:36:24 +0000 (14:36 +0300)]
bpo-44707: Fix an undefined behavior of the null pointer arithmetic (GH-27292)
Inada Naoki [Thu, 29 Jul 2021 10:46:47 +0000 (19:46 +0900)]
bpo-41103: Resurrect the old buffer protocol. (GH-27437)
Revert "bpo-41103: Remove old buffer protocol support (#21117)"
This reverts commit
6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed .
Erlend Egeberg Aasland [Thu, 29 Jul 2021 09:21:45 +0000 (11:21 +0200)]
bpo-42064: Optimise `sqlite3` state access, part 1 (GH-27273)
Prepare for module state:
- Add "get state by defining class" and "get state by module def" stubs
- Add AC defining class when needed
- Add state pointer to connection context
- Pass state as argument to utility functions
Automerge-Triggered-By: GH:encukou
Ammar Askar [Thu, 29 Jul 2021 09:10:03 +0000 (05:10 -0400)]
bpo-43565: Document PyUnicode_KIND's return type as an unsigned int (GH-25724)
Hai Shi [Thu, 29 Jul 2021 07:57:02 +0000 (15:57 +0800)]
bpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903)
Erlend Egeberg Aasland [Thu, 29 Jul 2021 07:47:56 +0000 (09:47 +0200)]
bpo-44688: Remove ASCII limitation from `sqlite3` collation names (GH-27395)
Brandt Bucher [Thu, 29 Jul 2021 00:24:18 +0000 (17:24 -0700)]
bpo-43897: Reject "_" captures and top-level MatchStar in the AST validator (GH-27432)
Ray Donnelly [Wed, 28 Jul 2021 19:58:05 +0000 (20:58 +0100)]
bpo-40263: Fixes an off-by-one error in _winapi_WaitForMultipleObjects_impl (GH-19501)
Batuhan Taskaya [Wed, 28 Jul 2021 17:14:45 +0000 (20:14 +0300)]
bpo-43897: AST validation for pattern matching nodes (GH24771)
andrei kulakov [Wed, 28 Jul 2021 16:55:03 +0000 (12:55 -0400)]
bpo-44682: Handle invalid arg to pdb's "commands" directive (#27252)
Jack DeVries [Wed, 28 Jul 2021 15:24:27 +0000 (11:24 -0400)]
bpo-44763: [doc] remove repetitive sentence from textwrap.wrap (GH-27423)
Jack DeVries [Wed, 28 Jul 2021 15:14:54 +0000 (11:14 -0400)]
bpo-44544: [doc] list all textwrap func kwargs (GH-26999)
Barney Gale [Wed, 28 Jul 2021 14:28:14 +0000 (15:28 +0100)]
bpo-27827: identify a greater range of reserved filename on Windows. (GH-26698)
`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>
Adrian Garcia Badaracco [Wed, 28 Jul 2021 14:15:07 +0000 (09:15 -0500)]
Add missing end of sentence in docs (GH-27280)
Ikko Ashimine [Wed, 28 Jul 2021 14:10:48 +0000 (23:10 +0900)]
Fix typo in sqlite3.rst (GH-27415)
preceeding -> preceding
Anton Grübel [Wed, 28 Jul 2021 13:38:06 +0000 (22:38 +0900)]
Change type check to isinstance in pipes (GH-27291)
Dennis Sweeney [Wed, 28 Jul 2021 13:31:44 +0000 (09:31 -0400)]
Spell out 's.pop() or s.pop(i)' (GH-27398)
Jack DeVries [Wed, 28 Jul 2021 13:13:28 +0000 (09:13 -0400)]
bpo-44756: in ./Doc, `make build` depends on `make html` (#27403)
- venv rule is now conditional, and only does anything if $VENVDIR does not exist
- add rule "clean-venv"
Dong-hee Na [Wed, 28 Jul 2021 13:10:36 +0000 (13:10 +0000)]
bpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)
Vinay Sajip [Wed, 28 Jul 2021 10:46:52 +0000 (11:46 +0100)]
bpo-44399: Document another example of unexpected behavior. (GH-27407)
Jason R. Coombs [Wed, 28 Jul 2021 01:51:42 +0000 (21:51 -0400)]
bpo-44461: Check early that a pdb target is valid for execution. (#27227)
* bpo-44461: Fix bug with pdb's handling of import error due to a package which does not have a __main__ module
* 📜🤖 Added by blurb_it.
* remove "else"
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* If running as a module, first check that it can run as a module. Alternate fix for bpo-44461.
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Brandt Bucher [Wed, 28 Jul 2021 00:51:49 +0000 (17:51 -0700)]
bpo-44600: Refactor new tracing tests (GH-27396)
Geoffrey Thomas [Tue, 27 Jul 2021 22:58:12 +0000 (18:58 -0400)]
closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394)
Automerge-Triggered-By: GH:benjaminp
Pablo Galindo Salgado [Tue, 27 Jul 2021 20:30:32 +0000 (21:30 +0100)]
bpo-34013: Move the Python 2 hints from the exception constructor to the parser (GH-27392)
Pablo Galindo Salgado [Tue, 27 Jul 2021 16:19:22 +0000 (17:19 +0100)]
bpo-34013: Generalize the invalid legacy statement error message (GH-27389)
Steffen Zeile [Tue, 27 Jul 2021 15:20:00 +0000 (17:20 +0200)]
bpo-44559: [Enum] correct `versionadded` to 3.11 for new features (GH-27388)
Erlend Egeberg Aasland [Tue, 27 Jul 2021 13:54:20 +0000 (15:54 +0200)]
bpo-42064: Migrate to `sqlite3_create_collation_v2` (GH-27156)
This implies that SQLite now takes care of destroying the callback
context (the PyObject callable it has been passed), so we can strip the
collation dict from the connection object.
Mariusz Felisiak [Tue, 27 Jul 2021 08:57:52 +0000 (10:57 +0200)]
bpo-44740: Make minor edits to lowercasing "internet" and "web". (GH-27385)
Follow up to
11749e2dc20ad6a76e9a39e948853e89b2b4bbed
Ken Jin [Tue, 27 Jul 2021 03:09:30 +0000 (11:09 +0800)]
Add windows build.bat counterpart for 'make regen-all' in error message (GH-26770)
Vinicius Gubiani Ferreira [Tue, 27 Jul 2021 03:01:00 +0000 (00:01 -0300)]
[doc] Fix typo in asyncio Event Loop (GH-27377)
First Pull Request to cpython, so forgive me for any mistakes
Automerge-Triggered-By: GH:Mariatta
Mariusz Felisiak [Mon, 26 Jul 2021 22:11:55 +0000 (00:11 +0200)]
bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Steffen Zeile [Mon, 26 Jul 2021 21:35:09 +0000 (23:35 +0200)]
Fix typos in `Weekday.today` example (GH-27363)
Nick Coghlan [Mon, 26 Jul 2021 20:57:17 +0000 (06:57 +1000)]
bpo-44515: handle non-refcounted GC in contextlib tests (GH-26910)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
partev [Mon, 26 Jul 2021 19:37:31 +0000 (15:37 -0400)]
docs: replace "Mac OS X" -> "macOS" (GH-27364)
"Mac OS X" has been rebranded as macOS
https://www.apple.com/macos
Jelle Zijlstra [Mon, 26 Jul 2021 16:18:19 +0000 (09:18 -0700)]
The current documentation says it returns None if the name is not found, but (GH-26785)
the implementation uses [] and will raise KeyError instead.
Noticed by @srittau in python/typeshed@5659.
Serhiy Storchaka [Mon, 26 Jul 2021 16:11:25 +0000 (19:11 +0300)]
bpo-43443: Clarify difference between shelve objects and dicts (GH-27004)
Yurii Karabas [Mon, 26 Jul 2021 16:05:55 +0000 (19:05 +0300)]
bpo-44490: Add 'Whats New' docs regarding types.Union changes (GH-27215)
T. Wouters [Mon, 26 Jul 2021 16:03:35 +0000 (18:03 +0200)]
bpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278)
Hasan [Mon, 26 Jul 2021 16:00:21 +0000 (20:00 +0400)]
bpo-44732: Rename types.Union to types.UnionType (#27342)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Elliot Waite [Mon, 26 Jul 2021 15:59:20 +0000 (08:59 -0700)]
Small text fixes for enum.rst (#27322)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Logan Jones [Mon, 26 Jul 2021 15:21:09 +0000 (11:21 -0400)]
bpo-44734: Fix precision in turtle tests (GH-27343)
thomkeh [Mon, 26 Jul 2021 12:39:45 +0000 (13:39 +0100)]
Fix typo in dataclasses documentation (#27360)
"affect" -> "effect"
Mark Shannon [Mon, 26 Jul 2021 10:22:16 +0000 (11:22 +0100)]
bpo-44590: Lazily allocate frame objects (GH-27077)
* Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it.
* Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector.
* Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation.
* Move ownership of InterpreterFrame in generator from frame object to generator object.
* Do not create frame objects for Python calls.
* Do not create frame objects for generators.
Steven Hsu [Mon, 26 Jul 2021 01:11:12 +0000 (09:11 +0800)]
bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349)
Replace sentence with confusing "pseudo-module" with two sentences
separating future statements and the __future__ module.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Charles Burkland [Sun, 25 Jul 2021 23:42:07 +0000 (16:42 -0700)]
bpo-44600: Fix line numbers for pattern matching cleanup code (GH-27346)
Batuhan Taskaya [Sun, 25 Jul 2021 22:01:44 +0000 (01:01 +0300)]
bpo-43950: support some multi-line expressions for PEP 657 (GH-27339)
This is basically something that I noticed up while fixing test runs for another issue. It is really common to have multiline calls, and when they fail the display is kind of weird since we omit the annotations. E.g;
```
$ ./python t.py
Traceback (most recent call last):
File "/home/isidentical/cpython/cpython/t.py", line 11, in <module>
frame_1()
^^^^^^^^^
File "/home/isidentical/cpython/cpython/t.py", line 5, in frame_1
frame_2(
File "/home/isidentical/cpython/cpython/t.py", line 2, in frame_2
return a / 0 / b / c
~~^~~
ZeroDivisionError: division by zero
```
This patch basically adds support for annotating the rest of the line, if the instruction covers multiple lines (start_line != end_line).
Automerge-Triggered-By: GH:isidentical
andrei kulakov [Sun, 25 Jul 2021 20:17:47 +0000 (16:17 -0400)]
bpo-42378: fixed log truncation on logging shutdown (GH-27310)
Automerge-Triggered-By: GH:vsajip
Vinay Sajip [Sun, 25 Jul 2021 17:05:39 +0000 (18:05 +0100)]
bpo-44399: Update logging cookbook to document patterns to be avoided. (GH-27348)
Vinay Sajip [Sun, 25 Jul 2021 16:36:30 +0000 (17:36 +0100)]
bpo-43184: Add information about added attribute and method. (GH-27347)
Filipe Laíns [Sat, 24 Jul 2021 22:44:46 +0000 (23:44 +0100)]
bpo-44717: improve AttributeError on circular imports of submodules (GH-27338)
Anton Grübel [Sat, 24 Jul 2021 21:54:51 +0000 (23:54 +0200)]
Fix typo in ssl documentation (GH-27329)
Serhiy Storchaka [Sat, 24 Jul 2021 18:26:02 +0000 (21:26 +0300)]
bpo-44676: Serialize the union type using only public API (GH-27323)
Remove also the _from_args() constructor.
Batuhan Taskaya [Sat, 24 Jul 2021 17:50:39 +0000 (20:50 +0300)]
bpo-43950: support long lines in traceback.py (GH-27336)
Batuhan Taskaya [Sat, 24 Jul 2021 17:49:17 +0000 (20:49 +0300)]
bpo-43950: check against the raw string, not the pyobject (GH-27337)
Pablo Galindo Salgado [Sat, 24 Jul 2021 14:25:54 +0000 (15:25 +0100)]
bpo-44676: Fix reference leaks in union_reduce (GH-27332)
Automerge-Triggered-By: GH:pablogsal
Serhiy Storchaka [Sat, 24 Jul 2021 13:34:48 +0000 (16:34 +0300)]
bpo-44731: Simplify the union type implementation (GH-27318)
Remove direct support of typing types in the C code because they are already supported by defining methods __or__ and __ror__ in the Python code.
Pablo Galindo Salgado [Sat, 24 Jul 2021 13:33:03 +0000 (14:33 +0100)]
Revert "bpo-44717: improve AttributeError on circular imports of submodules (GH-27299)" (GH-27331)
This reverts commit
8072a1181dd64135f700b44372fbf7bf91e68072 .
Batuhan Taskaya [Sat, 24 Jul 2021 12:50:19 +0000 (15:50 +0300)]
bpo-43950: ensure source_line is present when specialising the traceback (GH-27313)
Yurii Karabas [Sat, 24 Jul 2021 09:53:40 +0000 (12:53 +0300)]
bpo-44353: Improve tests covering typing.NewType pickling (GH-27302)
Filipe Laíns [Sat, 24 Jul 2021 09:50:17 +0000 (10:50 +0100)]
bpo-44717: improve AttributeError on circular imports of submodules (GH-27299)
Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Dennis Sweeney [Sat, 24 Jul 2021 09:17:19 +0000 (05:17 -0400)]
bpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ (GH-27316)
Dong-hee Na [Sat, 24 Jul 2021 09:14:08 +0000 (09:14 +0000)]
bpo-44611: Update docs for os and whatsnew 3.11 (#27314)
Ken Jin [Sat, 24 Jul 2021 08:53:49 +0000 (16:53 +0800)]
bpo-44353: Document that typing.NewType is now a class (#27319)
Serhiy Storchaka [Sat, 24 Jul 2021 07:40:08 +0000 (10:40 +0300)]
bpo-44353: Expand NewType tests for complex __qualname__. (#27311)
Make NewType pickleable by name.
Sebastian Rittau [Fri, 23 Jul 2021 18:53:29 +0000 (20:53 +0200)]
Fix a deprecation warning in typing tests (#27312)
The test was accessing typing.{io,re}.__all__, which triggered the
warning. This check isn't necessary anymore, since the objects from
typing.{io,re}.__all__ are in typing.__all__ as well, since Python 3.10.
Pablo Galindo Salgado [Fri, 23 Jul 2021 15:05:53 +0000 (16:05 +0100)]
bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271)
Yurii Karabas [Fri, 23 Jul 2021 14:28:05 +0000 (17:28 +0300)]
bpo-44353: Fix memory leak introduced by GH-27262 (GH-27305)
Dong-hee Na [Fri, 23 Jul 2021 14:04:30 +0000 (14:04 +0000)]
bpo-44611: Use BCryptGenRandom instead of CryptGenRandom on Windows (GH-27168)
Petr Viktorin [Fri, 23 Jul 2021 13:21:11 +0000 (15:21 +0200)]
bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260)
* Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG
The field is always present in the type struct, as explained
in the added comment.
* Remove Py_TPFLAGS_HAVE_AM_SEND
The flag is not needed, and since it was added in 3.10 it can be removed now.