]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions...
Serhiy Storchaka [Sun, 8 Aug 2021 05:49:44 +0000 (08:49 +0300)] 
bpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions. (GH-27654)

* MemoryError is now raised instead of sqlite3.Warning when
  memory is not enough for encoding a statement to UTF-8
  in Connection.__call__() and Cursor.execute().
* UnicodEncodeError is now raised instead of sqlite3.Warning when
  the statement contains surrogate characters
  in Connection.__call__() and Cursor.execute().
* TypeError is now raised instead of ValueError for non-string
  script argument in Cursor.executescript().
* ValueError is now raised for script containing the null
  character instead of truncating it in Cursor.executescript().
* Correctly handle exceptions raised when getting boolean value
  of the result of the progress handler.
* Add many tests covering different corner cases.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44830 - Remove the broken Broken Mozilla devguide link. (GH-27664)
Senthil Kumaran [Sun, 8 Aug 2021 03:18:10 +0000 (20:18 -0700)] 
bpo-44830 - Remove the broken Broken Mozilla devguide link. (GH-27664)

4 years agobpo-44856: Possible reference leak in error paths of update_bases() and __build_class...
Pablo Galindo Salgado [Sat, 7 Aug 2021 10:10:14 +0000 (11:10 +0100)] 
bpo-44856: Possible reference leak in error paths of update_bases() and __build_class__ (GH-27647)

4 years agobpo-42971: Add errno.EQFULL (macOS) (GH-24419)
Ronald Oussoren [Fri, 6 Aug 2021 21:35:13 +0000 (23:35 +0200)] 
bpo-42971: Add errno.EQFULL (macOS) (GH-24419)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-41576: document BaseException in favor of bare except (GH-21917)
Thomas Grainger [Fri, 6 Aug 2021 20:44:15 +0000 (21:44 +0100)] 
bpo-41576: document BaseException in favor of bare except (GH-21917)

4 years agobpo-27752: improve documentation of csv.Dialect (GH-26795)
Jack DeVries [Fri, 6 Aug 2021 20:05:16 +0000 (16:05 -0400)] 
bpo-27752: improve documentation of csv.Dialect (GH-26795)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633)
Raymond Hettinger [Fri, 6 Aug 2021 19:33:30 +0000 (14:33 -0500)] 
bpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633)

4 years agobpo-44839: Raise more specific errors in sqlite3 (GH-27613)
Serhiy Storchaka [Fri, 6 Aug 2021 18:28:47 +0000 (21:28 +0300)] 
bpo-44839: Raise more specific errors in sqlite3 (GH-27613)

MemoryError raised in user-defined functions will now preserve
its type. OverflowError will now be converted to DataError.
Previously both were converted to OperationalError.

4 years agoUpgrade bundled pip and setuptools (#27625)
Tzu-ping Chung [Fri, 6 Aug 2021 18:22:48 +0000 (02:22 +0800)] 
Upgrade bundled pip and setuptools (#27625)

pip is now 21.2.3
setuptools is now 57.4.0

4 years agobpo-44756: [docs] revert automated virtual environment creation on `make html` (GH...
Łukasz Langa [Fri, 6 Aug 2021 18:13:59 +0000 (20:13 +0200)] 
bpo-44756: [docs] revert automated virtual environment creation on `make html` (GH-27635)

It turned out to be disruptive for downstream distributors.

4 years agobpo-44524: Fix an issue wherein `_GenericAlias._name` was not properly set for specia...
Bas van Beek [Fri, 6 Aug 2021 13:36:35 +0000 (15:36 +0200)] 
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>
4 years agobpo-44849: Fix os.set_inheritable() on FreeBSD 14 with O_PATH (GH-27623)
Victor Stinner [Fri, 6 Aug 2021 13:15:10 +0000 (15:15 +0200)] 
bpo-44849: Fix os.set_inheritable() on FreeBSD 14 with O_PATH (GH-27623)

Fix the os.set_inheritable() function on FreeBSD 14 for file
descriptor opened with the O_PATH flag: ignore the EBADF error on
ioctl(), fallback on the fcntl() implementation.

4 years agobpo-40928: notify users running test_decimal on macOS of malloc warnings (GH-26783)
Jack DeVries [Fri, 6 Aug 2021 12:50:56 +0000 (08:50 -0400)] 
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>
4 years agobpo-44584: Deprecate PYTHONTHREADDEBUG env var (GH-27065)
Victor Stinner [Fri, 6 Aug 2021 11:11:12 +0000 (13:11 +0200)] 
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.

4 years agobpo-44679: [doc] fix typo in unittest.mock.rst (GH-27618)
Jack DeVries [Thu, 5 Aug 2021 20:48:18 +0000 (16:48 -0400)] 
bpo-44679: [doc] fix typo in unittest.mock.rst (GH-27618)

4 years agobpo-44838: Refine the custom syntax errors for invalid 'if' expressions (GH-27615)
Pablo Galindo Salgado [Thu, 5 Aug 2021 17:28:57 +0000 (18:28 +0100)] 
bpo-44838: Refine the custom syntax errors for invalid 'if' expressions (GH-27615)

4 years agobpo-44291: Fix reconnection in logging.handlers.SysLogHandler (GH-26490)
Kirill Pinchuk [Thu, 5 Aug 2021 13:58:16 +0000 (16:58 +0300)] 
bpo-44291: Fix reconnection in logging.handlers.SysLogHandler (GH-26490)

4 years agobpo-44822: Don't truncate `str`s with embedded NULL chars returned by `sqlite3` UDF...
Erlend Egeberg Aasland [Thu, 5 Aug 2021 07:22:08 +0000 (09:22 +0200)] 
bpo-44822: Don't truncate `str`s with embedded NULL chars returned by `sqlite3` UDF callbacks (GH-27588)

4 years agoplatform: Import subprocess in function. (GH-27610)
Inada Naoki [Thu, 5 Aug 2021 05:04:01 +0000 (14:04 +0900)] 
platform: Import subprocess in function. (GH-27610)

4 years agobpo-41706: Fix special method invocation docs to mention using type() (GH-22084)
William Chargin [Wed, 4 Aug 2021 20:43:06 +0000 (13:43 -0700)] 
bpo-41706: Fix special method invocation docs to mention using type() (GH-22084)

4 years agobpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166)
andrei kulakov [Wed, 4 Aug 2021 19:39:45 +0000 (15:39 -0400)] 
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>
4 years ago[doc] bpo-43066: zipfile - add note on leading slash in the filename arg (GH-26899)
andrei kulakov [Wed, 4 Aug 2021 19:34:34 +0000 (15:34 -0400)] 
[doc] bpo-43066: zipfile - add note on leading slash in the filename arg (GH-26899)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoFix typo in 'xml.dom.minidom' documentation (GH-27602)
Cristián Maureira-Fredes [Wed, 4 Aug 2021 19:29:01 +0000 (21:29 +0200)] 
Fix typo in 'xml.dom.minidom' documentation (GH-27602)

4 years agobpo-44564 Move formatted assertion under deprecation warning context (GH-27090)
Brandon Schabell [Wed, 4 Aug 2021 19:01:30 +0000 (14:01 -0500)] 
bpo-44564 Move formatted assertion under deprecation warning context (GH-27090)

4 years agoFix 404 link to the pyporting mailing list (GH-27320)
Rohit Nishad [Wed, 4 Aug 2021 18:53:58 +0000 (00:23 +0530)] 
Fix 404 link to the pyporting mailing list (GH-27320)

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44801: Check arguments in substitution of ParamSpec in Callable (GH-27585)
Serhiy Storchaka [Wed, 4 Aug 2021 18:07:01 +0000 (21:07 +0300)] 
bpo-44801: Check arguments in substitution of ParamSpec in Callable (GH-27585)

4 years agoNote that tp_clear and m_clear are not always called (GH-27581)
Petr Viktorin [Wed, 4 Aug 2021 18:01:31 +0000 (20:01 +0200)] 
Note that tp_clear and m_clear are not always called (GH-27581)

4 years agoFix hyperlink conflict in turtle docs (GH-27592)
Harry [Wed, 4 Aug 2021 17:46:30 +0000 (18:46 +0100)] 
Fix hyperlink conflict in turtle docs (GH-27592)

4 years agobpo-41117: Cleanup subtract_refs() (GH-27593)
Victor Stinner [Wed, 4 Aug 2021 16:09:14 +0000 (18:09 +0200)] 
bpo-41117: Cleanup subtract_refs() (GH-27593)

subtract_refs() reuses the 'op' variable rather than calling the
FROM_GC() macro twice.

Issue reported by William Pickard.

4 years agobpo-44821: Eagerly assign __dict__ for new objects. (GH-27589)
Mark Shannon [Wed, 4 Aug 2021 15:41:14 +0000 (16:41 +0100)] 
bpo-44821: Eagerly assign __dict__ for new objects. (GH-27589)

4 years agoAdd option to write specialization stats to files and script to summarize. (GH-27575)
Mark Shannon [Wed, 4 Aug 2021 10:39:52 +0000 (11:39 +0100)] 
Add option to write specialization stats to files and script to summarize. (GH-27575)

* Add option to write stats to random file in a directory.

* Add script to summarize stats.

4 years agobpo-41886: Fix documented type of PyType_Type (GH-22454)
da-woods [Tue, 3 Aug 2021 17:21:25 +0000 (18:21 +0100)] 
bpo-41886: Fix documented type of PyType_Type (GH-22454)

4 years agoEnsure LICENSE.txt file is generated even in PGO builds (GH-27580)
Steve Dower [Tue, 3 Aug 2021 15:52:45 +0000 (16:52 +0100)] 
Ensure LICENSE.txt file is generated even in PGO builds (GH-27580)

4 years agobpo-44808: fixes test for interactive inspect getsource of a class (GH-27571)
andrei kulakov [Tue, 3 Aug 2021 12:47:30 +0000 (08:47 -0400)] 
bpo-44808: fixes test for interactive inspect getsource of a class (GH-27571)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-41737: expand doc for NotADirectoryError (GH-27471)
andrei kulakov [Tue, 3 Aug 2021 11:28:09 +0000 (07:28 -0400)] 
bpo-41737: expand doc for NotADirectoryError (GH-27471)

4 years agobpo-27275: Change popitem() and pop() methods of collections.OrderedDict (GH-27530)
Serhiy Storchaka [Tue, 3 Aug 2021 11:00:55 +0000 (14:00 +0300)] 
bpo-27275: Change popitem() and pop() methods of collections.OrderedDict (GH-27530)

* Unify the C and Python implementations of OrderedDict.popitem().

The C implementation no longer calls ``__getitem__`` and ``__delitem__``
methods of the OrderedDict subclasses.

* Change popitem() and pop() methods of collections.OrderedDict

For consistency with dict both implementations (pure Python and C)
of these methods in OrderedDict no longer call __getitem__ and
__delitem__ methods of the OrderedDict subclasses.

Previously only the Python implementation of popitem() did not
call them.

4 years agocloses bpo-39091: Fix segfault when Exception constructor returns non-exception for...
Noah [Tue, 3 Aug 2021 02:17:18 +0000 (21:17 -0500)] 
closes bpo-39091: Fix segfault when Exception constructor returns non-exception for gen.throw. (#17658)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
4 years agobpo-44782: Improve OrderedDict recipe for LRU cache variants (GH-27536)
Raymond Hettinger [Mon, 2 Aug 2021 18:15:45 +0000 (13:15 -0500)] 
bpo-44782: Improve OrderedDict recipe for LRU cache variants (GH-27536)

4 years agobpo-44792: Improve syntax errors for if expressions (GH-27506)
Miguel Brito [Mon, 2 Aug 2021 17:11:37 +0000 (18:11 +0100)] 
bpo-44792: Improve syntax errors for if expressions (GH-27506)

4 years agobpo-35183: Add typical examples to os.path.splitext docs (GH-27286)
Jake Stockwin [Mon, 2 Aug 2021 17:01:53 +0000 (18:01 +0100)] 
bpo-35183: Add typical examples to os.path.splitext docs (GH-27286)

4 years agoDocument PyMember_GetOne and PyMember_SetOne (GH-27555)
Ken Jin [Mon, 2 Aug 2021 16:26:57 +0000 (00:26 +0800)] 
Document PyMember_GetOne and PyMember_SetOne (GH-27555)

4 years agobpo-44806: Fix __init__ in subclasses of protocols (GH-27545)
Serhiy Storchaka [Mon, 2 Aug 2021 16:23:22 +0000 (19:23 +0300)] 
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.

4 years agobpo-44785: Silence deprecation warnings in test_pickle (#27538)
Serhiy Storchaka [Mon, 2 Aug 2021 16:11:12 +0000 (19:11 +0300)] 
bpo-44785: Silence deprecation warnings in test_pickle (#27538)

4 years agobuild(deps): bump actions/stale from 3 to 4 (#27526)
dependabot[bot] [Mon, 2 Aug 2021 16:04:18 +0000 (18:04 +0200)] 
build(deps): bump actions/stale from 3 to 4 (#27526)

Bumps [actions/stale](https://github.com/actions/stale) from 3 to 4.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3...v4)

Signed-off-by: dependabot[bot] <support@github.com>
4 years agobpo-44206: Make sure that dict-keys's version is set to zero when value is popped...
Mark Shannon [Mon, 2 Aug 2021 13:54:23 +0000 (14:54 +0100)] 
bpo-44206: Make sure that dict-keys's version is set to zero when value is popped (GH-27542)

4 years agobpo-44808: Fix test_inspect in refleak mode (GH-27544)
Pablo Galindo Salgado [Mon, 2 Aug 2021 11:54:20 +0000 (12:54 +0100)] 
bpo-44808: Fix test_inspect in refleak mode (GH-27544)

4 years agodoc: "Mac OS X" -> "macOS" (GH-27535)
partev [Mon, 2 Aug 2021 09:40:40 +0000 (05:40 -0400)] 
doc: "Mac OS X" -> "macOS" (GH-27535)

4 years agodoc: "Mac OS " -> "macOS" (GH-27534)
partev [Mon, 2 Aug 2021 09:39:56 +0000 (05:39 -0400)] 
doc: "Mac OS " -> "macOS" (GH-27534)

4 years agobpo-44781: make distutils test suppress deprecation warning from import distutils...
Irit Katriel [Mon, 2 Aug 2021 09:34:55 +0000 (10:34 +0100)] 
bpo-44781: make distutils test suppress deprecation warning from import distutils (GH-27485)

4 years agobpo-44793: Fix checking the number of arguments when subscribe a generic type with...
Serhiy Storchaka [Mon, 2 Aug 2021 06:17:46 +0000 (09:17 +0300)] 
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.

4 years agobpo-34013: Don't consider a grouped expression when reporting legacy print syntax...
Pablo Galindo Salgado [Sun, 1 Aug 2021 01:10:50 +0000 (02:10 +0100)] 
bpo-34013: Don't consider a grouped expression when reporting legacy print syntax errors (GH-27521)

4 years agobpo-33671 fix orphaned comment in shutil.copyfileobj (GH-27516)
Anthony Sottile [Sat, 31 Jul 2021 19:15:45 +0000 (15:15 -0400)] 
bpo-33671 fix orphaned comment in shutil.copyfileobj (GH-27516)

4 years agobpo-44794: Merge tests for typing.Callable and collection.abc.Callable (GH-27507) 27473/head
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)

4 years agobpo-37880: for argparse add_argument with action='store_const', const now defaults...
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)

4 years agobpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508)
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
4 years agoDivide the grammar into sections to improve readability (GH-27502)
Pablo Galindo Salgado [Sat, 31 Jul 2021 12:04:37 +0000 (13:04 +0100)] 
Divide the grammar into sections to improve readability (GH-27502)

4 years agoTrivial typo in docstring
Jesús Cea [Sat, 31 Jul 2021 04:36:10 +0000 (06:36 +0200)] 
Trivial typo in docstring

4 years agobpo-44667: Treat correctly lines ending with comments and no newlines in the Python...
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)

4 years agobpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. (#27497)
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.

4 years agobpo-44648: Fix error type in inspect.getsource() in interactive session (GH-27171)
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)

4 years agobpo-43625: Enhance csv sniffer has_headers() to be more accurate (GH-26939)
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)

4 years agobpo-42892: fix email multipart attribute error (GH-26903)
andrei kulakov [Fri, 30 Jul 2021 17:05:49 +0000 (13:05 -0400)] 
bpo-42892: fix email multipart attribute error (GH-26903)

4 years agobpo-41911: Update docs for various expressions (GH-27470)
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>
4 years agobpo-44666: Use default encoding as fallback for compile_file (GH-27236)
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>
4 years agoFail the CI if an optional module fails to compile (GH-27466)
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)

4 years agoDoc: Change errant 3.10.0 to 3.10, to match other mentions (GH-27459)
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)

4 years agoUpdate URLs in comments and metadata to use HTTPS (GH-27458)
Noah Kantrowitz [Fri, 30 Jul 2021 13:54:46 +0000 (06:54 -0700)] 
Update URLs in comments and metadata to use HTTPS (GH-27458)

4 years agobpo-44747: Refactor usage of sys._getframe at typing module (#27387)
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>
4 years agobpo-44761: Change default value of NewType __module__ attr (GH-27406)
Yurii Karabas [Fri, 30 Jul 2021 12:56:12 +0000 (15:56 +0300)] 
bpo-44761: Change default value of NewType __module__ attr (GH-27406)

4 years agobpo-44753: Don't use logfile extension when determining old files to be deleted ...
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)

4 years agobpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436)
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.

4 years agoAdd missing gdbm dependencies to the UNIX CI (GH-27467)
Pablo Galindo Salgado [Thu, 29 Jul 2021 21:42:21 +0000 (22:42 +0100)] 
Add missing gdbm dependencies to the UNIX CI (GH-27467)

4 years agobpo-31746: Fix broken call in GH-27431 (GH-27464)
Erlend Egeberg Aasland [Thu, 29 Jul 2021 20:47:23 +0000 (22:47 +0200)] 
bpo-31746: Fix broken call in GH-27431 (GH-27464)

4 years agobpo-44479: Do not regenerate files during a PGO build as it will invalidate the profi...
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)

4 years agoMinor fixes to specialization stats. (GH-27457)
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.

4 years agobpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431)
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)

4 years agobpo-44662: Add ability to annotate types.Union (#27214)
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>
4 years agoFix typo in ast.rst (GH-27449)
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>
4 years agoTo fix the random failed test cases of test___xxsubinterpreters in multiprocess....
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)

4 years agobpo-44765: [doc] fix typo (GH-27430)
Pavel [Thu, 29 Jul 2021 16:55:04 +0000 (12:55 -0400)] 
bpo-44765: [doc] fix typo (GH-27430)

4 years agobpo-44725 : expose specialization stats in python (GH-27192)
Irit Katriel [Thu, 29 Jul 2021 16:26:53 +0000 (17:26 +0100)] 
bpo-44725 : expose specialization stats in python (GH-27192)

4 years agobpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433)
Jack DeVries [Thu, 29 Jul 2021 14:01:21 +0000 (10:01 -0400)] 
bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433)

4 years agobpo-44752: Make rlcompleter not call `@property` methods (GH-27401)
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.

4 years agobpo-44707: Fix an undefined behavior of the null pointer arithmetic (GH-27292)
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)

4 years agobpo-41103: Resurrect the old buffer protocol. (GH-27437)
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.

4 years agobpo-42064: Optimise `sqlite3` state access, part 1 (GH-27273)
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
4 years agobpo-43565: Document PyUnicode_KIND's return type as an unsigned int (GH-25724)
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)

4 years agobpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903)
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)

4 years agobpo-44688: Remove ASCII limitation from `sqlite3` collation names (GH-27395)
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)

4 years agobpo-43897: Reject "_" captures and top-level MatchStar in the AST validator (GH-27432)
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)

4 years agobpo-40263: Fixes an off-by-one error in _winapi_WaitForMultipleObjects_impl (GH-19501)
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)

4 years agobpo-43897: AST validation for pattern matching nodes (GH24771)
Batuhan Taskaya [Wed, 28 Jul 2021 17:14:45 +0000 (20:14 +0300)] 
bpo-43897: AST validation for pattern matching nodes (GH24771)

4 years agobpo-44682: Handle invalid arg to pdb's "commands" directive (#27252)
andrei kulakov [Wed, 28 Jul 2021 16:55:03 +0000 (12:55 -0400)] 
bpo-44682: Handle invalid arg to pdb's "commands" directive (#27252)

4 years agobpo-44763: [doc] remove repetitive sentence from textwrap.wrap (GH-27423)
Jack DeVries [Wed, 28 Jul 2021 15:24:27 +0000 (11:24 -0400)] 
bpo-44763: [doc] remove repetitive sentence from textwrap.wrap (GH-27423)

4 years agobpo-44544: [doc] list all textwrap func kwargs (GH-26999)
Jack DeVries [Wed, 28 Jul 2021 15:14:54 +0000 (11:14 -0400)] 
bpo-44544: [doc] list all textwrap func kwargs (GH-26999)

4 years agobpo-27827: identify a greater range of reserved filename on Windows. (GH-26698)
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>
4 years agoAdd missing end of sentence in docs (GH-27280)
Adrian Garcia Badaracco [Wed, 28 Jul 2021 14:15:07 +0000 (09:15 -0500)] 
Add missing end of sentence in docs (GH-27280)

4 years agoFix typo in sqlite3.rst (GH-27415)
Ikko Ashimine [Wed, 28 Jul 2021 14:10:48 +0000 (23:10 +0900)] 
Fix typo in sqlite3.rst (GH-27415)

preceeding -> preceding

4 years agoChange type check to isinstance in pipes (GH-27291)
Anton Grübel [Wed, 28 Jul 2021 13:38:06 +0000 (22:38 +0900)] 
Change type check to isinstance in pipes (GH-27291)

4 years agoSpell out 's.pop() or s.pop(i)' (GH-27398)
Dennis Sweeney [Wed, 28 Jul 2021 13:31:44 +0000 (09:31 -0400)] 
Spell out 's.pop() or s.pop(i)' (GH-27398)