]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-96577: Fixes buffer overrun in _msi module (GH-96633)
Steve Dower [Wed, 7 Sep 2022 17:01:35 +0000 (18:01 +0100)] 
gh-96577: Fixes buffer overrun in _msi module (GH-96633)

3 years agoGH-96465: Cache hashes for Fraction instances (GH-96483)
Raymond Hettinger [Wed, 7 Sep 2022 15:31:50 +0000 (10:31 -0500)] 
GH-96465: Cache hashes for Fraction instances (GH-96483)

3 years agogh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in one...
Irit Katriel [Wed, 7 Sep 2022 13:01:57 +0000 (14:01 +0100)] 
gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in one place (GH-96513)

3 years agogh-94808: Improve coverage of _PyBytes_FormatEx (GH-95895)
Michael Droettboom [Wed, 7 Sep 2022 11:51:50 +0000 (07:51 -0400)] 
gh-94808: Improve coverage of _PyBytes_FormatEx (GH-95895)

There were two specific areas not covered:

- %(name) syntax
- %*s syntax

Automerge-Triggered-By: GH:iritkatriel
3 years agogh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)
Nikita Sobolev [Wed, 7 Sep 2022 11:13:07 +0000 (14:13 +0300)] 
gh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)

3 years agoGH-91432: Remove the iterator_exhausted_no_error label (GH-96517)
Brandt Bucher [Wed, 7 Sep 2022 04:07:20 +0000 (21:07 -0700)] 
GH-91432: Remove the iterator_exhausted_no_error label (GH-96517)

3 years agogh-96538: Fix refleak in _bisectmodule.c (gh-96619)
Dennis Sweeney [Tue, 6 Sep 2022 23:37:18 +0000 (19:37 -0400)] 
gh-96538: Fix refleak in _bisectmodule.c (gh-96619)

3 years agogh-96628: remove deprecated and ignored arg of sysconfig.is_python_build() (GH-96629)
Irit Katriel [Tue, 6 Sep 2022 23:24:34 +0000 (00:24 +0100)] 
gh-96628: remove deprecated and ignored arg of sysconfig.is_python_build() (GH-96629)

3 years agogh-96611: Fix error message for invalid UTF-8 in mid-multiline string (#96623)
Michael Droettboom [Tue, 6 Sep 2022 23:12:16 +0000 (19:12 -0400)] 
gh-96611: Fix error message for invalid UTF-8 in mid-multiline string (#96623)

3 years agoGH-96572: fix use after free in trace refs build mode (#96618)
Kumar Aditya [Tue, 6 Sep 2022 18:02:41 +0000 (23:32 +0530)] 
GH-96572: fix use after free in trace refs build mode (#96618)

3 years agoGH-96612: Skip incomplete frames in tracemalloc traces. (GH-96613)
Mark Shannon [Tue, 6 Sep 2022 16:37:47 +0000 (17:37 +0100)] 
GH-96612: Skip incomplete frames in tracemalloc traces. (GH-96613)

3 years agogh-96478: Fix new test when run in refleak mode (#96615)
Jelle Zijlstra [Tue, 6 Sep 2022 16:33:09 +0000 (09:33 -0700)] 
gh-96478: Fix new test when run in refleak mode (#96615)

./python.exe -m test -R : test.test_typing would fail, apparently
because the dictionary used in the @patch decorator was modified.

3 years agoGH-96569: Add two NULL checks to avoid undefined behavior. (GH-96585)
Mark Shannon [Tue, 6 Sep 2022 15:45:43 +0000 (16:45 +0100)] 
GH-96569: Add two NULL checks to avoid undefined behavior. (GH-96585)

3 years agoGH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)
Brandt Bucher [Tue, 6 Sep 2022 11:11:38 +0000 (04:11 -0700)] 
GH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)

3 years agogh-96478: Test `@overload` on C functions (#96479)
Nikita Sobolev [Mon, 5 Sep 2022 21:35:05 +0000 (00:35 +0300)] 
gh-96478: Test `@overload` on C functions (#96479)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agoargparse: Remove unused name variable when handling ArgumentTypeError (#96549)
Jonathon Reinhart [Mon, 5 Sep 2022 21:32:23 +0000 (17:32 -0400)] 
argparse: Remove unused name variable when handling ArgumentTypeError (#96549)

This removes the unused `name` variable in the block where `ArgumentTypeError` is handled.

`ArgumentTypeError` errors are handled by showing just the string of the exception; unlike `ValueError`, the name (`__name__`) of the function is not included in the error message.

Fixes #96548

3 years ago[doc] Update example in traceback doc (GH-96600)
Irit Katriel [Mon, 5 Sep 2022 21:30:51 +0000 (22:30 +0100)] 
[doc] Update example in traceback doc (GH-96600)

This Monty Python reference is of-its-time. It could seem inappropriate in the context of today's sensibilities around mental health.

Automerge-Triggered-By: GH:iritkatriel
3 years agogh-93963: Remove ResourceReaderDefaultsTests (GH-96598)
Jason R. Coombs [Mon, 5 Sep 2022 19:37:51 +0000 (15:37 -0400)] 
gh-93963: Remove ResourceReaderDefaultsTests (GH-96598)

Automerge-Triggered-By: GH:jaraco
3 years agogh-96559: Fixes Windows launcher handling of defaults using old-style tags, and adds...
Steve Dower [Mon, 5 Sep 2022 19:06:30 +0000 (20:06 +0100)] 
gh-96559: Fixes Windows launcher handling of defaults using old-style tags, and adds What's New section (GH-96595)

3 years agoAdd upstream openssl 1.1.1q patch for trivial build error on macOS (GH-96594)
Ned Deily [Mon, 5 Sep 2022 18:37:24 +0000 (14:37 -0400)] 
Add upstream openssl 1.1.1q patch for trivial build error on macOS (GH-96594)

3 years agogh-92986: Fix ast.unparse when ImportFrom.level is None (#92992)
Shantanu [Mon, 5 Sep 2022 17:14:50 +0000 (10:14 -0700)] 
gh-92986: Fix ast.unparse when ImportFrom.level is None (#92992)

This doesn't happen naturally, but is allowed by the ASDL and compiler.
We don't want to change ASDL for backward compatibility reasons
(#57645, #92987)

3 years agogh-96587: Raise `SyntaxError` for PEP654 on older `feature_version` (#96588)
Nikita Sobolev [Mon, 5 Sep 2022 16:54:09 +0000 (19:54 +0300)] 
gh-96587: Raise `SyntaxError` for PEP654 on older `feature_version` (#96588)

3 years agogh-84095: Fill documentation gap regarding user-defined objects. (GH-96574)
Vinay Sajip [Mon, 5 Sep 2022 06:47:47 +0000 (07:47 +0100)] 
gh-84095: Fill documentation gap regarding user-defined objects. (GH-96574)

3 years agogh-96538: Move some type-checking out of bisect.bisect() loops (GH-96539)
Dennis Sweeney [Mon, 5 Sep 2022 05:02:29 +0000 (01:02 -0400)] 
gh-96538: Move some type-checking out of bisect.bisect() loops (GH-96539)

3 years agogh-93973: Add all_errors to asyncio.create_connection (#93974)
Pamela Fox [Mon, 5 Sep 2022 01:33:50 +0000 (18:33 -0700)] 
gh-93973: Add all_errors to asyncio.create_connection (#93974)

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
3 years agoceval.c's GETITEM should have asserts, not set exceptions (GH-96518)
Dennis Sweeney [Sun, 4 Sep 2022 23:00:24 +0000 (19:00 -0400)] 
ceval.c's GETITEM should have asserts, not set exceptions (GH-96518)

3 years agoDocs: alphabetically order sqlite3.Cursor attrs (#96565)
Erlend E. Aasland [Sun, 4 Sep 2022 21:34:45 +0000 (23:34 +0200)] 
Docs: alphabetically order sqlite3.Cursor attrs (#96565)

3 years agogh-95778: Correctly pre-check for int-to-str conversion (#96537)
Mark Dickinson [Sun, 4 Sep 2022 16:21:18 +0000 (17:21 +0100)] 
gh-95778: Correctly pre-check for int-to-str conversion (#96537)

Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) <= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} < \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} > \frac{10}{3} > \log_2(10).$$
So
$$2^{L(s-1)} > 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
3 years agono-issue: Fix typo in 3.11.0a7.rst (gh-96547)
Ikko Ashimine [Sun, 4 Sep 2022 13:17:26 +0000 (22:17 +0900)] 
no-issue: Fix typo in 3.11.0a7.rst (gh-96547)

accross -> across

3 years agogh-68163: Correct conversion of Rational instances to float (GH-25619)
Sergey B Kirpichev [Sun, 4 Sep 2022 12:15:59 +0000 (15:15 +0300)] 
gh-68163: Correct conversion of Rational instances to float (GH-25619)

* gh-68163: Correct conversion of Rational instances to float

Also document that numerator/denominator properties are instances of Integral.

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
3 years agogh-93884: Improve test coverage of `PyNumber_ToBase` (GH-93932)
Charlie Zhao [Sun, 4 Sep 2022 10:37:04 +0000 (18:37 +0800)] 
gh-93884: Improve test coverage of `PyNumber_ToBase` (GH-93932)

Link to #93884
* Test with some large negative and positive values(out of range of a longlong,i.e.[-2\*\*63, 2\*\*63-1])
* Test with objects of non-int type

Automerge-Triggered-By: GH:mdickinson
3 years agogh-95778: remove unneeded doc note on float.as_integer_ratio (#96553)
Gregory P. Smith [Sun, 4 Sep 2022 07:04:36 +0000 (00:04 -0700)] 
gh-95778: remove unneeded doc note on float.as_integer_ratio (#96553)

Per mdickinson@'s comment on the main branch PR.

3 years agodoc typo: spell limitation (#96542)
Mehrdad Moradizadeh [Sun, 4 Sep 2022 06:23:32 +0000 (02:23 -0400)] 
doc typo: spell limitation (#96542)

3 years agogh-90195: Unset logger disabled flag when configuring it. (GH-96530)
Vinay Sajip [Sat, 3 Sep 2022 12:38:38 +0000 (13:38 +0100)] 
gh-90195: Unset logger disabled flag when configuring it. (GH-96530)

3 years agogh-89087: Update logging.QueueHandler documentation to clarify record… (GH-96527)
Vinay Sajip [Sat, 3 Sep 2022 12:02:19 +0000 (13:02 +0100)] 
gh-89087: Update logging.QueueHandler documentation to clarify record… (GH-96527)

3 years ago gh-75500: Update idlelib/help.html (#96523)
Terry Jan Reedy [Sat, 3 Sep 2022 07:38:57 +0000 (03:38 -0400)] 
 gh-75500: Update idlelib/help.html  (#96523)

3 years agoGH-96458: Statically initialize utf8 representation of static strings (#96481)
Kumar Aditya [Sat, 3 Sep 2022 06:43:08 +0000 (12:13 +0530)] 
GH-96458: Statically initialize utf8 representation of static strings (#96481)

3 years agogh-45108: Improve docstring and testing of ZipFile.testfile() (GH-96233)
Serhiy Storchaka [Sat, 3 Sep 2022 05:58:25 +0000 (08:58 +0300)] 
gh-45108: Improve docstring and testing of ZipFile.testfile() (GH-96233)

3 years ago[Enum] bump version tag on HTTP status category indicators (GH-96508)
Alexandru Mărășteanu [Fri, 2 Sep 2022 20:11:18 +0000 (23:11 +0300)] 
[Enum] bump version tag on HTTP status category indicators (GH-96508)

3 years agobpo-30419: DOC: Update missing information in bdb docs (#1687)
Cheryl Sabella [Fri, 2 Sep 2022 17:22:42 +0000 (13:22 -0400)] 
bpo-30419: DOC: Update missing information in  bdb docs (#1687)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agogh-95180: Add `TaskGroup` and `Runner` to AsyncIO API Index (#95189)
siph [Fri, 2 Sep 2022 16:36:45 +0000 (11:36 -0500)] 
gh-95180: Add `TaskGroup` and `Runner` to AsyncIO API Index (#95189)

Also rearrange some items in the list.

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
3 years agogh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)
Gregory P. Smith [Fri, 2 Sep 2022 16:35:08 +0000 (09:35 -0700)] 
gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)

Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.

3 years agoAllow whitespace around a slash in fraction string inputs (GH-96496)
Raymond Hettinger [Fri, 2 Sep 2022 16:10:58 +0000 (11:10 -0500)] 
Allow whitespace around a slash in fraction string inputs  (GH-96496)

3 years agogh-96168: Improve sqlite3 dict_factory example (#96457)
Erlend E. Aasland [Thu, 1 Sep 2022 21:47:59 +0000 (23:47 +0200)] 
gh-96168: Improve sqlite3 dict_factory example (#96457)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-93554: Conditional jump opcodes only jump forward (GH-96318)
Irit Katriel [Thu, 1 Sep 2022 20:36:47 +0000 (21:36 +0100)] 
gh-93554: Conditional jump opcodes only jump forward (GH-96318)

3 years agogh-96455: update example in exception_handling_notes.txt to the 3.11RC bytecode ...
Irit Katriel [Thu, 1 Sep 2022 13:21:39 +0000 (14:21 +0100)] 
gh-96455: update example in exception_handling_notes.txt to the 3.11RC bytecode (GH-96456)

3 years agogh-93678: apply remove_redundant_jumps in optimize_cfg (GH-96274)
Irit Katriel [Thu, 1 Sep 2022 10:03:52 +0000 (11:03 +0100)] 
gh-93678: apply remove_redundant_jumps in optimize_cfg (GH-96274)

3 years agogh-96143: subprocess API %s/universal_newlines=/text=/g. (GH-96468)
Gregory P. Smith [Thu, 1 Sep 2022 09:47:40 +0000 (02:47 -0700)] 
gh-96143: subprocess API %s/universal_newlines=/text=/g. (GH-96468)

minor missed test cleanup to use the modern API from the big review.

Automerge-Triggered-By: GH:gpshead
3 years agoGH-96079 Fix missing field name for _AnnotatedAlias (#96080)
Anh71me [Wed, 31 Aug 2022 23:02:24 +0000 (07:02 +0800)] 
GH-96079 Fix missing field name for _AnnotatedAlias (#96080)

3 years agogh-96408: Document difference between set-like view and sets. (GH-96439)
Piotr Kaznowski [Wed, 31 Aug 2022 21:23:52 +0000 (23:23 +0200)] 
gh-96408: Document difference between set-like view and sets. (GH-96439)

3 years agogh-89258: Add a getChildren() method to logging.Logger. (GH-96444)
Vinay Sajip [Wed, 31 Aug 2022 09:50:29 +0000 (10:50 +0100)] 
gh-89258: Add a getChildren() method to logging.Logger. (GH-96444)

Co-authored-by: Éric <merwok@netwok.org>
3 years agogh-96414: Inline code examples in sqlite3 docs (#96442)
Erlend E. Aasland [Wed, 31 Aug 2022 05:54:54 +0000 (07:54 +0200)] 
gh-96414: Inline code examples in sqlite3 docs (#96442)

3 years agogh-95865: Speed up urllib.parse.quote_from_bytes() (GH-95872)
Dennis Sweeney [Wed, 31 Aug 2022 01:39:51 +0000 (21:39 -0400)] 
gh-95865: Speed up urllib.parse.quote_from_bytes() (GH-95872)

3 years agoRemove the binary_subscr_dict_error label (GH-96443)
Brandt Bucher [Tue, 30 Aug 2022 22:45:24 +0000 (15:45 -0700)] 
Remove the binary_subscr_dict_error label (GH-96443)

3 years agogh-96408: Test set operation on items dict view. (GH-96438)
Filip Łajszczak [Tue, 30 Aug 2022 22:43:23 +0000 (22:43 +0000)] 
gh-96408: Test set operation on items dict view. (GH-96438)

3 years agoDocs: normalise sqlite3 placeholder how-to heading (#96413)
Erlend E. Aasland [Tue, 30 Aug 2022 20:44:14 +0000 (22:44 +0200)] 
Docs: normalise sqlite3 placeholder how-to heading (#96413)

3 years agogh-96143: Add some comments and minor fixes missed in the original PR (#96433)
Pablo Galindo Salgado [Tue, 30 Aug 2022 18:37:22 +0000 (19:37 +0100)] 
gh-96143: Add some comments and minor fixes missed in the original PR (#96433)

* gh-96132: Add some comments and minor fixes missed in the original PR

* Update Doc/using/cmdline.rst

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoAutomatically update more GitHub projects. (#94921)
Ezio Melotti [Tue, 30 Aug 2022 18:12:55 +0000 (20:12 +0200)] 
Automatically update more GitHub projects. (#94921)

* Automatically update the `asyncio` GitHub project.

* Use a matrix to add issues to projects.

* Remove trailing whitespace.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
3 years agogh-95149: Enhance `http.HTTPStatus` with properties that indicate the HTTP status...
Alexandru Mărășteanu [Tue, 30 Aug 2022 18:11:44 +0000 (21:11 +0300)] 
gh-95149: Enhance `http.HTTPStatus` with properties that indicate the HTTP status category (GH-95453)

3 years agoFix regeneration of global objects through the Windows build files (GH-96394)
Kumar Aditya [Tue, 30 Aug 2022 17:41:27 +0000 (23:11 +0530)] 
Fix regeneration of global objects through the Windows build files (GH-96394)

3 years agogh-95987: Fix `repr` of `Any` type subclasses (#96412)
Nikita Sobolev [Tue, 30 Aug 2022 17:36:16 +0000 (20:36 +0300)] 
gh-95987: Fix `repr` of `Any` type subclasses (#96412)

3 years agogh-96143: Allow Linux perf profiler to see Python calls (GH-96123)
Pablo Galindo Salgado [Tue, 30 Aug 2022 17:11:18 +0000 (18:11 +0100)] 
gh-96143: Allow Linux perf profiler to see Python calls (GH-96123)

:warning:  :warning: Note for reviewers, hackers and fellow systems/low-level/compiler engineers :warning: :warning:

If you have a lot of experience with this kind of shenanigans and want to improve the **first** version, **please make a PR against my branch** or **reach out by email** or **suggest code changes directly on GitHub**.

If you have any **refinements or optimizations** please, wait until the first version is merged before starting hacking or proposing those so we can keep this PR productive.

3 years agoGH-95245: Document use of `MANAGED` flags instead of offsets. (GH-96044)
Mark Shannon [Tue, 30 Aug 2022 15:26:08 +0000 (16:26 +0100)] 
GH-95245: Document use of `MANAGED` flags instead of offsets. (GH-96044)

3 years agogh-95337: update TypeVarTuple example (#95338)
Adrian Garcia Badaracco [Tue, 30 Aug 2022 14:57:03 +0000 (09:57 -0500)] 
gh-95337: update TypeVarTuple example (#95338)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agogh-96349: fix minor performance regression initializing threading.Event (gh-96350)
Daniel Giger [Tue, 30 Aug 2022 12:10:02 +0000 (08:10 -0400)] 
gh-96349: fix minor performance regression initializing threading.Event (gh-96350)

3 years agogh-95413: Remove references to deprecated CGI library (#95414)
partev [Tue, 30 Aug 2022 11:14:08 +0000 (07:14 -0400)] 
gh-95413: Remove references to deprecated CGI library (#95414)

3 years agoDocs: Improve clarity for bytes.hex() (#95257)
Tim Burke [Tue, 30 Aug 2022 11:09:56 +0000 (04:09 -0700)] 
Docs: Improve clarity for bytes.hex() (#95257)

3 years agoDoc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
da-woods [Tue, 30 Aug 2022 08:31:14 +0000 (09:31 +0100)] 
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)

It is now deprecated and the docs should reflect that.

3 years agogh-96385: Correctly raise error on `[*T, *V]` substitution (GH-96386)
Nikita Sobolev [Tue, 30 Aug 2022 07:34:55 +0000 (10:34 +0300)] 
gh-96385: Correctly raise error on `[*T, *V]` substitution (GH-96386)

3 years agogh-46845: clean up unused DK_IXSIZE (GH-96405)
Matthias Görgens [Tue, 30 Aug 2022 07:03:30 +0000 (15:03 +0800)] 
gh-46845: clean up unused DK_IXSIZE (GH-96405)

3 years agogh-95853: Improve WASM build script (GH-96389)
Christian Heimes [Tue, 30 Aug 2022 05:56:26 +0000 (07:56 +0200)] 
gh-95853: Improve WASM build script (GH-96389)

- pre-build Emscripten ports and system libraries
- check for broken EMSDK versions
- use EMSDK's node for wasm32-emscripten
- warn when PKG_CONFIG_PATH is set
- add support level information

3 years agogh-96320: WASI socket fixes (#96388)
Christian Heimes [Tue, 30 Aug 2022 04:36:11 +0000 (06:36 +0200)] 
gh-96320: WASI socket fixes (#96388)

* gh-96320: WASI socket fixes

- ignore missing functions in ``socket.__repr__``
- bundle network files with assets

* blurb

3 years agoDocs: normalize SQL style in sqlite3 docs (#96403)
Erlend E. Aasland [Mon, 29 Aug 2022 22:50:42 +0000 (00:50 +0200)] 
Docs: normalize SQL style in sqlite3 docs (#96403)

3 years agogh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380)
Vinay Sajip [Mon, 29 Aug 2022 21:29:22 +0000 (22:29 +0100)] 
gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380)

3 years agoGH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)
Kumar Aditya [Mon, 29 Aug 2022 18:31:11 +0000 (00:01 +0530)] 
GH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)

3 years agoImprove accuracy for Spearman's rank correlation coefficient. (#96392)
Raymond Hettinger [Mon, 29 Aug 2022 17:19:48 +0000 (12:19 -0500)] 
Improve accuracy for Spearman's rank correlation coefficient. (#96392)

3 years agogh-94682: Build and test with OpenSSL 1.1.1q (gh-94683)
Christian Heimes [Mon, 29 Aug 2022 16:19:15 +0000 (18:19 +0200)] 
gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683)

3 years agoast.parse: check `feature_version` common case first (GH-94640)
Anthony Sottile [Mon, 29 Aug 2022 14:05:24 +0000 (10:05 -0400)] 
ast.parse: check `feature_version` common case first (GH-94640)

3 years agoFix Py_INCREF() statistics in limited C API 3.10 (#96120)
Victor Stinner [Mon, 29 Aug 2022 12:55:46 +0000 (14:55 +0200)] 
Fix Py_INCREF() statistics in limited C API 3.10 (#96120)

In the limited C API with a debug build, Py_INCREF() is implemented
by calling _Py_IncRef() which calls Py_INCREF(). Only call
_Py_INCREF_STAT_INC() once.

3 years agogh-90814: Correct NEWS wording re. optional C11 features (GH-96309)
Petr Viktorin [Mon, 29 Aug 2022 11:10:52 +0000 (13:10 +0200)] 
gh-90814: Correct NEWS wording re. optional C11 features (GH-96309)

The previous wording of this entry suggests that CPython
won't work if optional compiler features are enabled.
That's not the case. The change is that we require C11 rather
than C89.

Note that PEP 7 does say "Python 3.11 and newer versions use C11
without optional features." It is correct there: that's
not a guide for users who compile Python, but for CPython devs
who must avoid the features.

3 years agogh-95432: Add doctests for the sqlite3 docs (#96225)
Erlend E. Aasland [Mon, 29 Aug 2022 08:52:39 +0000 (10:52 +0200)] 
gh-95432: Add doctests for the sqlite3 docs (#96225)

As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces

3 years agogh-96191: Update the configure file to use GitHub issue (gh-96211)
Dong-hee Na [Mon, 29 Aug 2022 05:01:37 +0000 (14:01 +0900)] 
gh-96191: Update the configure file to use GitHub issue (gh-96211)

3 years agoPrepare private _rank() function to be made public. (#96372)
Raymond Hettinger [Mon, 29 Aug 2022 04:41:58 +0000 (23:41 -0500)] 
Prepare private _rank() function to be made public. (#96372)

3 years agogh-96357: Improve `typing.get_overloads` coverage (#96358)
Nikita Sobolev [Mon, 29 Aug 2022 00:45:24 +0000 (03:45 +0300)] 
gh-96357: Improve `typing.get_overloads` coverage (#96358)

3 years agogh-95950: Add a test for both `csv.Dialect` and `kwargs` (#95951)
Nikita Sobolev [Mon, 29 Aug 2022 00:43:32 +0000 (03:43 +0300)] 
gh-95950: Add a test for both `csv.Dialect` and `kwargs` (#95951)

3 years agoGH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)
Jonathan Oberländer [Sun, 28 Aug 2022 22:48:51 +0000 (00:48 +0200)] 
GH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)

3 years agogh-69142: add %:z strftime format code (gh-95983)
TW [Sun, 28 Aug 2022 21:27:42 +0000 (23:27 +0200)] 
gh-69142: add %:z strftime format code (gh-95983)

datetime.isoformat generates the tzoffset with colons, but there
was no format code to make strftime output the same format.

for simplicity and consistency the %:z formatting behaves mostly
as %z, with the exception of adding colons. this includes the
dynamic behaviour of adding seconds and microseconds only when
needed (when not 0).

this fixes the still open "generate" part of this issue:

https://github.com/python/cpython/issues/69142

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-90467: StreamReaderProtocol - add strong reference to created task (#96323)
Kirill [Sat, 27 Aug 2022 19:32:01 +0000 (22:32 +0300)] 
gh-90467: StreamReaderProtocol - add strong reference to created task (#96323)

3 years agogh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340)
Vinay Sajip [Sat, 27 Aug 2022 12:33:24 +0000 (13:33 +0100)] 
gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340)

3 years agogh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322)
Vinay Sajip [Sat, 27 Aug 2022 11:13:19 +0000 (12:13 +0100)] 
gh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322)

3 years agofixes gh-96292: Fix Trivial Typo in cpython/Modules/atexitmodule.c (#96327)
Ansab Gillani [Sat, 27 Aug 2022 05:33:29 +0000 (10:33 +0500)] 
fixes gh-96292: Fix Trivial Typo in cpython/Modules/atexitmodule.c (#96327)

3 years agofix threading.Event.isSet() docstring (#96297)
Daniel Giger [Sat, 27 Aug 2022 05:06:26 +0000 (01:06 -0400)] 
fix threading.Event.isSet() docstring (#96297)

fixes gh-96296

3 years agoDocs: Fix count of bullets in asyncio-task.rst (#96307)
zhanpon [Sat, 27 Aug 2022 03:50:48 +0000 (12:50 +0900)] 
Docs: Fix count of bullets in asyncio-task.rst (#96307)

3 years agogh-95973: Add a new --with-dsymutil option to link debug information in macOS (GH...
Pablo Galindo Salgado [Sat, 27 Aug 2022 00:49:41 +0000 (01:49 +0100)] 
gh-95973: Add a new --with-dsymutil option to link debug information in macOS (GH-95974)

Automerge-Triggered-By: GH:pablogsal
3 years agogh-77116: Add SMTP buffering example to logging cookbook. (GH-96324)
Vinay Sajip [Fri, 26 Aug 2022 23:24:36 +0000 (00:24 +0100)] 
gh-77116: Add SMTP buffering example to logging cookbook. (GH-96324)

3 years agogh-96280: suppress deprecation warning in test_importlib (GH-96281)
Irit Katriel [Fri, 26 Aug 2022 21:44:33 +0000 (22:44 +0100)] 
gh-96280: suppress deprecation warning in test_importlib (GH-96281)

3 years agoFix documentation typo for pathlib.Path.walk (GH-96301)
Ansab Gillani [Fri, 26 Aug 2022 21:21:40 +0000 (02:21 +0500)] 
Fix documentation typo for pathlib.Path.walk (GH-96301)

3 years agogh-95994: Clarify escaped newlines. (#96066)
Ezio Melotti [Fri, 26 Aug 2022 19:05:01 +0000 (21:05 +0200)] 
gh-95994: Clarify escaped newlines. (#96066)

* gh-95994: clarify escaped newlines.

* Rephrase ambiguous sentence.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Use `<newline>` in escape sequences table.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoGH-96172 fix unicodedata.east_asian_width being wrong on unassigned code points ...
Carl Friedrich Bolz-Tereick [Fri, 26 Aug 2022 16:29:39 +0000 (18:29 +0200)] 
GH-96172 fix unicodedata.east_asian_width being wrong on unassigned code points (#96207)

3 years agobpo-33587: inspect.getsource: reorder stat on file in linecache (GH-6805)
Pankaj Pandey [Fri, 26 Aug 2022 14:20:48 +0000 (10:20 -0400)] 
bpo-33587: inspect.getsource: reorder stat on file in linecache (GH-6805)

* inspect.getsource: avoid stat on file in linecache

The check for os.path.exists() on source file is postponed in
inspect.getsourcefile() until needed avoiding an expensive filesystem
stat call and PEP 302 module loader check is moved last for performance
since it is an uncommon case.