]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44657: Fix instancemethod_call to use PyInstanceMethod_GET_FUNCTION (GH-27202)
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)

4 years agobpo-44399: Document another example of unexpected behavior. (GH-27407)
Vinay Sajip [Wed, 28 Jul 2021 10:46:52 +0000 (11:46 +0100)] 
bpo-44399: Document another example of unexpected behavior. (GH-27407)

4 years agobpo-44461: Check early that a pdb target is valid for execution. (#27227)
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>
4 years agobpo-44600: Refactor new tracing tests (GH-27396)
Brandt Bucher [Wed, 28 Jul 2021 00:51:49 +0000 (17:51 -0700)] 
bpo-44600: Refactor new tracing tests (GH-27396)

4 years agocloses bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394)
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
4 years agobpo-34013: Move the Python 2 hints from the exception constructor to the parser ...
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)

4 years agobpo-34013: Generalize the invalid legacy statement error message (GH-27389)
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)

4 years agobpo-44559: [Enum] correct `versionadded` to 3.11 for new features (GH-27388)
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)

4 years agobpo-42064: Migrate to `sqlite3_create_collation_v2` (GH-27156)
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.

4 years agobpo-44740: Make minor edits to lowercasing "internet" and "web". (GH-27385)
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

4 years agoAdd windows build.bat counterpart for 'make regen-all' in error message (GH-26770)
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)

4 years ago[doc] Fix typo in asyncio Event Loop (GH-27377)
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
4 years agobpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)
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>
4 years agoFix typos in `Weekday.today` example (GH-27363)
Steffen Zeile [Mon, 26 Jul 2021 21:35:09 +0000 (23:35 +0200)] 
Fix typos in `Weekday.today` example (GH-27363)

4 years agobpo-44515: handle non-refcounted GC in contextlib tests (GH-26910)
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>
4 years agodocs: replace "Mac OS X" -> "macOS" (GH-27364)
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

4 years agoThe current documentation says it returns None if the name is not found, but (GH...
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.

4 years agobpo-43443: Clarify difference between shelve objects and dicts (GH-27004)
Serhiy Storchaka [Mon, 26 Jul 2021 16:11:25 +0000 (19:11 +0300)] 
bpo-43443: Clarify difference between shelve objects and dicts (GH-27004)

4 years agobpo-44490: Add 'Whats New' docs regarding types.Union changes (GH-27215)
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)

4 years agobpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278)
T. Wouters [Mon, 26 Jul 2021 16:03:35 +0000 (18:03 +0200)] 
bpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278)

4 years agobpo-44732: Rename types.Union to types.UnionType (#27342)
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>
4 years agoSmall text fixes for enum.rst (#27322)
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>
4 years agobpo-44734: Fix precision in turtle tests (GH-27343)
Logan Jones [Mon, 26 Jul 2021 15:21:09 +0000 (11:21 -0400)] 
bpo-44734: Fix precision in turtle tests (GH-27343)

4 years agoFix typo in dataclasses documentation (#27360)
thomkeh [Mon, 26 Jul 2021 12:39:45 +0000 (13:39 +0100)] 
Fix typo in dataclasses documentation (#27360)

"affect" -> "effect"

4 years agobpo-44590: Lazily allocate frame objects (GH-27077)
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.

4 years agobpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349)
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>
4 years agobpo-44600: Fix line numbers for pattern matching cleanup code (GH-27346)
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)

4 years agobpo-43950: support some multi-line expressions for PEP 657 (GH-27339)
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
4 years agobpo-42378: fixed log truncation on logging shutdown (GH-27310)
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
4 years agobpo-44399: Update logging cookbook to document patterns to be avoided. (GH-27348)
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)

4 years agobpo-43184: Add information about added attribute and method. (GH-27347)
Vinay Sajip [Sun, 25 Jul 2021 16:36:30 +0000 (17:36 +0100)] 
bpo-43184: Add information about added attribute and method. (GH-27347)

4 years agobpo-44717: improve AttributeError on circular imports of submodules (GH-27338)
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)

4 years agoFix typo in ssl documentation (GH-27329)
Anton Grübel [Sat, 24 Jul 2021 21:54:51 +0000 (23:54 +0200)] 
Fix typo in ssl documentation (GH-27329)

4 years agobpo-44676: Serialize the union type using only public API (GH-27323)
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.

4 years agobpo-43950: support long lines in traceback.py (GH-27336)
Batuhan Taskaya [Sat, 24 Jul 2021 17:50:39 +0000 (20:50 +0300)] 
bpo-43950: support long lines in traceback.py (GH-27336)

4 years agobpo-43950: check against the raw string, not the pyobject (GH-27337)
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)

4 years agobpo-44676: Fix reference leaks in union_reduce (GH-27332)
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
4 years agobpo-44731: Simplify the union type implementation (GH-27318)
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.

4 years agoRevert "bpo-44717: improve AttributeError on circular imports of submodules (GH-27299...
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.

4 years agobpo-43950: ensure source_line is present when specialising the traceback (GH-27313)
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)

4 years agobpo-44353: Improve tests covering typing.NewType pickling (GH-27302)
Yurii Karabas [Sat, 24 Jul 2021 09:53:40 +0000 (12:53 +0300)] 
bpo-44353: Improve tests covering typing.NewType pickling (GH-27302)

4 years agobpo-44717: improve AttributeError on circular imports of submodules (GH-27299)
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>
4 years agobpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ (GH-27316)
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)

4 years agobpo-44611: Update docs for os and whatsnew 3.11 (#27314)
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)

4 years agobpo-44353: Document that typing.NewType is now a class (#27319)
Ken Jin [Sat, 24 Jul 2021 08:53:49 +0000 (16:53 +0800)] 
bpo-44353: Document that typing.NewType is now a class (#27319)

4 years agobpo-44353: Expand NewType tests for complex __qualname__. (#27311)
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.

4 years agoFix a deprecation warning in typing tests (#27312)
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.

4 years agobpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write...
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)

4 years agobpo-44353: Fix memory leak introduced by GH-27262 (GH-27305)
Yurii Karabas [Fri, 23 Jul 2021 14:28:05 +0000 (17:28 +0300)] 
bpo-44353: Fix memory leak introduced by GH-27262 (GH-27305)

4 years agobpo-44611: Use BCryptGenRandom instead of CryptGenRandom on Windows (GH-27168)
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)

4 years agobpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make Py_TPFLAGS_HAVE_VERSION_TAG no...
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.

4 years agoImprove consistency of colorsys.rgb_to_hsv (GH-27277)
seb-hub [Fri, 23 Jul 2021 12:59:30 +0000 (14:59 +0200)] 
Improve consistency of colorsys.rgb_to_hsv (GH-27277)

Cache repeated difference to make code easier to read and consistent with colorsys.rgb_to_hls.

4 years agobpo-29298: Fix crash with required subparsers without dest (GH-3680)
Anthony Sottile [Fri, 23 Jul 2021 12:49:04 +0000 (08:49 -0400)] 
bpo-29298: Fix crash with required subparsers without dest (GH-3680)

Automerge-Triggered-By: GH:encukou
4 years agobpo-44676: Add ability to serialize types.Union (GH-27244)
Yurii Karabas [Fri, 23 Jul 2021 09:47:00 +0000 (12:47 +0300)] 
bpo-44676: Add ability to serialize types.Union (GH-27244)

4 years agobpo-44713: [doc fix]: typo in subprocess.rst (GH-27297)
Jack DeVries [Thu, 22 Jul 2021 23:06:18 +0000 (19:06 -0400)] 
bpo-44713: [doc fix]: typo in subprocess.rst (GH-27297)

This fixes a small typo. The code fragment should not be quoted. Thank you
@merwok for the feedback.

4 years agobpo-44653: Support typing types in parameter substitution in the union type. (GH...
Serhiy Storchaka [Thu, 22 Jul 2021 21:57:06 +0000 (00:57 +0300)] 
bpo-44653: Support typing types in parameter substitution in the union type. (GH-27247)

4 years agobpo-44353: Implement typing.NewType __call__ method in C (#27262)
Yurii Karabas [Thu, 22 Jul 2021 21:06:54 +0000 (00:06 +0300)] 
bpo-44353: Implement typing.NewType __call__ method in C (#27262)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Denis Laxalde <denis@laxalde.org>
4 years agobpo-44708: Only re-run test methods that match names of previously failing test metho...
Łukasz Langa [Thu, 22 Jul 2021 18:25:58 +0000 (20:25 +0200)] 
bpo-44708: Only re-run test methods that match names of previously failing test methods (GH-27287)

* Move to a static argparse.Namespace subclass
* Roughly annotate runtest.py
* Refactor libregrtest to use lossless test result objects
* Only re-run test methods that match names of previously failing test methods
* Adopt tests to cover test method name matching

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
4 years agobpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell...
Jack DeVries [Thu, 22 Jul 2021 18:23:29 +0000 (14:23 -0400)] 
bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) (GH-26755)

4 years agobpo-44651: delete entry of "coercion" in Doc/glossary.rst (GH-27226)
Steven Hsu [Thu, 22 Jul 2021 12:18:07 +0000 (20:18 +0800)] 
bpo-44651: delete entry of "coercion" in Doc/glossary.rst (GH-27226)

bpo 44651: delete entry of "coercion".

4 years agoSpeed up test_urlsplit_normalization (GH-26688)
Jacob Walls [Thu, 22 Jul 2021 07:45:53 +0000 (03:45 -0400)] 
Speed up test_urlsplit_normalization (GH-26688)

4 years agoFix typo in collections.rst (#27270)
Elliot Waite [Thu, 22 Jul 2021 07:31:22 +0000 (00:31 -0700)] 
Fix typo in collections.rst (#27270)

4 years agobpo-44704: Make Set._hash consistent with frozenset.__hash__ (GH-27281)
Dennis Sweeney [Wed, 21 Jul 2021 23:49:03 +0000 (19:49 -0400)] 
bpo-44704: Make Set._hash consistent with frozenset.__hash__ (GH-27281)

4 years agobpo-44686 replace unittest.mock._importer with pkgutil.resolve_name (GH-18544)
Thomas Grainger [Wed, 21 Jul 2021 11:47:44 +0000 (12:47 +0100)] 
bpo-44686 replace unittest.mock._importer with pkgutil.resolve_name (GH-18544)

Automerge-Triggered-By: GH:cjw296
4 years agobpo-30511: Add note on thread safety to shutil.make_archive() (#26933)
andrei kulakov [Wed, 21 Jul 2021 08:33:11 +0000 (04:33 -0400)] 
bpo-30511: Add note on thread safety to shutil.make_archive() (#26933)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44539: Support recognizing JPEG files without JFIF or Exif markers (GH-26964)
Mohamad Mansour [Tue, 20 Jul 2021 18:56:57 +0000 (21:56 +0300)] 
bpo-44539: Support recognizing JPEG files without JFIF or Exif markers (GH-26964)

Co-authored-by: moemansour03@gmail.com <m.mansour@tecfrac.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-43219: skip Solaris in the test as well (GH-27257)
Jakub Kulík [Tue, 20 Jul 2021 18:16:23 +0000 (20:16 +0200)] 
bpo-43219: skip Solaris in the test as well (GH-27257)

4 years agobpo-44566: resolve differences between asynccontextmanager and contextmanager (#27024)
Thomas Grainger [Tue, 20 Jul 2021 18:15:07 +0000 (19:15 +0100)] 
bpo-44566: resolve differences between asynccontextmanager and contextmanager (#27024)

4 years agobpo-44631: Make the repr() of the _Environ class more readable. (#27128)
Leonardo Freua [Tue, 20 Jul 2021 17:15:45 +0000 (14:15 -0300)] 
bpo-44631: Make the repr() of the _Environ class more readable. (#27128)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoUpdate macOS build-installer script comments for 3.10 and remove unused pre-10.5...
Ned Deily [Tue, 20 Jul 2021 17:09:30 +0000 (13:09 -0400)] 
Update macOS build-installer script comments for 3.10 and remove unused pre-10.5 vestiges. (GH-27253)

4 years agobpo-43950: Distinguish errors happening on character offset decoding (GH-27217)
Batuhan Taskaya [Tue, 20 Jul 2021 15:42:12 +0000 (18:42 +0300)] 
bpo-43950: Distinguish errors happening on character offset decoding (GH-27217)

4 years agobpo-44353: Add test to cover __or__ of two NewType (#27259)
Yurii Karabas [Tue, 20 Jul 2021 14:48:05 +0000 (17:48 +0300)] 
bpo-44353: Add test to cover __or__ of two NewType (#27259)

4 years agobpo-44353: Refactor typing.NewType into callable class (GH-27250)
Yurii Karabas [Tue, 20 Jul 2021 13:20:38 +0000 (16:20 +0300)] 
bpo-44353: Refactor typing.NewType into callable class (GH-27250)

4 years agobpo-42064: Finalise establishing sqlite3 global state (GH-27155)
Erlend Egeberg Aasland [Tue, 20 Jul 2021 10:59:18 +0000 (12:59 +0200)] 
bpo-42064: Finalise establishing sqlite3 global state (GH-27155)

With this, all sqlite3 static globals have been moved to the global state.
There are a couple of global static strings left, but there should be no need for adding them to the state.

https://bugs.python.org/issue42064

4 years agobpo-44678: Separate error message for discontinuous padding in binascii.a2b_base64...
Idan Moral [Mon, 19 Jul 2021 22:42:19 +0000 (01:42 +0300)] 
bpo-44678: Separate error message for discontinuous padding in binascii.a2b_base64 strict mode (GH-27249)

* Renamed assertLeadingPadding function to match logic
* Added a separate error message for discontinuous padding
* Updated the tests for discontinuous padding

4 years agocorrect spelling (GH-27076)
Sondre Lillebø Gundersen [Mon, 19 Jul 2021 20:46:42 +0000 (22:46 +0200)] 
correct spelling (GH-27076)

4 years agobpo-44524: Add missed __name__ and __qualname__ to typing module objects (#27237)
Yurii Karabas [Mon, 19 Jul 2021 17:22:12 +0000 (20:22 +0300)] 
bpo-44524: Add missed __name__ and __qualname__ to typing module objects (#27237)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-27513: email.utils.getaddresses() now handles Header objects (#13797)
Zackery Spytz [Mon, 19 Jul 2021 16:07:54 +0000 (09:07 -0700)] 
bpo-27513: email.utils.getaddresses() now handles Header objects (#13797)

getaddresses() should be able to handle a Header object if passed
one.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoClean up comma usage in Doc/library/functions.rst (#27083)
α∂мιηιχтяαтσя [Mon, 19 Jul 2021 16:02:23 +0000 (17:02 +0100)] 
Clean up comma usage in Doc/library/functions.rst (#27083)

4 years agobpo-42238: Fix small rst issue in NEWS.d/. (#27238)
Julien Palard [Mon, 19 Jul 2021 14:34:48 +0000 (16:34 +0200)] 
bpo-42238: Fix small rst issue in NEWS.d/. (#27238)

4 years agobpo-41972: Tweak fastsearch.h string search algorithms (GH-27091)
Dennis Sweeney [Mon, 19 Jul 2021 10:58:32 +0000 (06:58 -0400)] 
bpo-41972: Tweak fastsearch.h string search algorithms (GH-27091)

4 years agobpo-44340: Add support for building with clang full/thin lto (GH-27231)
Dong-hee Na [Mon, 19 Jul 2021 10:52:56 +0000 (19:52 +0900)] 
bpo-44340: Add support for building with clang full/thin lto (GH-27231)

4 years agobpo-44661: Update property_descr_set to use vectorcall if possible. (GH-27206)
Dong-hee Na [Mon, 19 Jul 2021 10:13:27 +0000 (19:13 +0900)] 
bpo-44661: Update property_descr_set to use vectorcall if possible. (GH-27206)

4 years agobpo-44645: Check for interrupts on any potentially backwards edge (GH-27216)
Mark Shannon [Mon, 19 Jul 2021 10:10:21 +0000 (11:10 +0100)] 
bpo-44645: Check for interrupts on any potentially backwards edge (GH-27216)

4 years agobpo-41546: make pprint (like print) not write to stdout when it is None (GH-26810)
Irit Katriel [Mon, 19 Jul 2021 09:19:02 +0000 (10:19 +0100)] 
bpo-41546: make pprint (like print) not write to stdout when it is None (GH-26810)

4 years agobpo-44554: refactor pdb targets (and internal tweaks) (GH-26992)
Jason R. Coombs [Mon, 19 Jul 2021 01:00:35 +0000 (21:00 -0400)] 
bpo-44554: refactor pdb targets (and internal tweaks) (GH-26992)

- Refactor module/script handling to share an interface (check method).
- Import functools and adjust tests for the new line number for find_function.
- Use cached_property for details.
- Add blurb.

Automerge-Triggered-By: GH:jaraco
4 years agobpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)
Idan Moral [Mon, 19 Jul 2021 00:45:19 +0000 (03:45 +0300)] 
bpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)

binascii.a2b_base64 gains a strict_mode= parameter. When enabled it will raise an
error on input that deviates from the base64 spec in any way.  The default remains
False for backward compatibility.

Code reviews and minor tweaks by: Gregory P. Smith <greg@krypto.org> [Google]

4 years agobpo-44561: Update hyperlinks in Doc/distributing/index.rst (#27032)
Steven Hsu [Mon, 19 Jul 2021 00:10:48 +0000 (08:10 +0800)] 
bpo-44561: Update hyperlinks in Doc/distributing/index.rst (#27032)

* Update hyperlinks in Doc/distributing/index.rst

Update three expired hyperlinks.

Closes bpo-44561.

4 years agobpo-42355: symtable.get_namespace() now checks whether there are multiple or any...
Batuhan Taskaya [Sun, 18 Jul 2021 12:56:09 +0000 (15:56 +0300)] 
bpo-42355: symtable.get_namespace() now checks whether there are multiple or any namespaces found (GH-23278)

4 years agobpo-44654: Do not export the union type related symbols (GH-27223)
Serhiy Storchaka [Sun, 18 Jul 2021 12:55:20 +0000 (15:55 +0300)] 
bpo-44654: Do not export the union type related symbols (GH-27223)

4 years agobpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218)
Serhiy Storchaka [Sun, 18 Jul 2021 09:10:19 +0000 (12:10 +0300)] 
bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218)

A TypeError is now raised instead of returning NotImplemented.

4 years agobpo-44654: Refactor and clean up the union type implementation (GH-27196)
Serhiy Storchaka [Sat, 17 Jul 2021 19:44:10 +0000 (22:44 +0300)] 
bpo-44654: Refactor and clean up the union type implementation (GH-27196)

4 years agobpo-20291: Fix MSVC warnings in getargs.c (GH-27211)
Ken Jin [Sat, 17 Jul 2021 11:09:18 +0000 (19:09 +0800)] 
bpo-20291: Fix MSVC warnings in getargs.c (GH-27211)

* Fix MSVC warnings in getargs.c

* apply suggestions

Co-Authored-By: Batuhan Taskaya <batuhan@python.org>
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
4 years agobpo-42095: plistlib: Add tests that compare with plutil(1) (#27173)
Hasan [Sat, 17 Jul 2021 10:11:04 +0000 (14:11 +0400)] 
bpo-42095: plistlib: Add tests that compare with plutil(1) (#27173)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-43425: Remove test2to3 from Tools (#26981)
Dong-hee Na [Sat, 17 Jul 2021 10:10:43 +0000 (19:10 +0900)] 
bpo-43425: Remove test2to3 from Tools (#26981)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoReplace @ilevkivskyi with @Fidget-Spinner as typing code owner (#27210)
Łukasz Langa [Sat, 17 Jul 2021 09:21:31 +0000 (11:21 +0200)] 
Replace @ilevkivskyi with @Fidget-Spinner as typing code owner (#27210)

4 years agobpo-41249: Fix postponed annotations for TypedDict (GH-27017)
Germán Méndez Bravo [Sat, 17 Jul 2021 03:49:30 +0000 (20:49 -0700)] 
bpo-41249: Fix postponed annotations for TypedDict (GH-27017)

This fixes TypedDict to work with get_type_hints and postponed evaluation of annotations across modules.

This is done by adding the module name to ForwardRef at the time the object is created and using that to resolve the globals during the evaluation.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-44490: Improve typing module compatibility with types.Union (GH-27048)
Yurii Karabas [Sat, 17 Jul 2021 03:33:40 +0000 (06:33 +0300)] 
bpo-44490: Improve typing module compatibility with types.Union (GH-27048)

4 years agobpo-44655: Include the name of the type in unset __slots__ attribute errors (GH-27199)
Pablo Galindo Salgado [Fri, 16 Jul 2021 23:34:46 +0000 (00:34 +0100)] 
bpo-44655: Include the name of the type in unset __slots__ attribute errors (GH-27199)

4 years agobpo-44655: Don't include suggestions for attributes that are the same as the missing...
Pablo Galindo Salgado [Fri, 16 Jul 2021 20:58:21 +0000 (21:58 +0100)] 
bpo-44655: Don't include suggestions for attributes that are the same as the missing one (GH-27197)