]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-1635741: Port _string module to multi-phase init (GH-22148)
Victor Stinner [Tue, 8 Sep 2020 13:33:08 +0000 (15:33 +0200)] 
bpo-1635741: Port _string module to multi-phase init (GH-22148)

Port the _string extension module to the multi-phase initialization
API (PEP 489).

5 years agobpo-1635741: Convert _sha256 types to heap types (GH-22134)
Mohamed Koubaa [Tue, 8 Sep 2020 09:16:14 +0000 (04:16 -0500)] 
bpo-1635741: Convert _sha256 types to heap types (GH-22134)

Convert the _sha256 extension module types to heap types.

5 years agobpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139)
Mohamed Koubaa [Tue, 8 Sep 2020 08:59:15 +0000 (03:59 -0500)] 
bpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139)

5 years agobpo-41732: add iterator to memoryview (GH-22119)
dxflores [Tue, 8 Sep 2020 07:28:45 +0000 (08:28 +0100)] 
bpo-41732: add iterator to memoryview (GH-22119)

5 years agobpo-40744: Drop support for SQLite pre 3.7.3 (GH-20909)
Erlend Egeberg Aasland [Mon, 7 Sep 2020 21:26:54 +0000 (23:26 +0200)] 
bpo-40744: Drop support for SQLite pre 3.7.3 (GH-20909)

Remove code required to support SQLite pre 3.7.3.

Co-written-by: Berker Peksag <berker.peksag@gmail.com>
Co-written-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years agobpo-41316: Make tarfile follow specs for FNAME (GH-21511)
Artem Bulgakov [Mon, 7 Sep 2020 16:46:33 +0000 (19:46 +0300)] 
bpo-41316: Make tarfile follow specs for FNAME (GH-21511)

tarfile writes full path to FNAME field of GZIP format instead of just basename if user specified absolute path. Some archive viewers may process file incorrectly. Also it creates security issue because anyone can know structure of directories on system and know username or other personal information.

RFC1952 says about FNAME:
This is the original name of the file being compressed, with any directory components removed.

So tarfile must remove directory names from FNAME and write only basename of file.

Automerge-Triggered-By: @jaraco
5 years agobpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
Serhiy Storchaka [Mon, 7 Sep 2020 15:55:22 +0000 (18:55 +0300)] 
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)

5 years agobpo-1635741 port _curses_panel to multi-phase init (PEP 489) (GH-21986)
Mohamed Koubaa [Mon, 7 Sep 2020 15:14:25 +0000 (10:14 -0500)] 
bpo-1635741 port _curses_panel to multi-phase init (PEP 489) (GH-21986)

5 years agobpo-1635741: Port _overlapped module to multi-phase init (GH-22051)
Mohamed Koubaa [Mon, 7 Sep 2020 13:12:40 +0000 (08:12 -0500)] 
bpo-1635741: Port _overlapped module to multi-phase init (GH-22051)

Port the _overlapped extension module to multi-phase initialization (PEP 489).

5 years agobpo-1635741: Port _opcode module to multi-phase init (PEP 489) (GH-22050)
Mohamed Koubaa [Mon, 7 Sep 2020 08:48:44 +0000 (03:48 -0500)] 
bpo-1635741: Port _opcode module to multi-phase init (PEP 489) (GH-22050)

5 years agobpo-1635741 port zlib module to multi-phase init (GH-21995)
Mohamed Koubaa [Mon, 7 Sep 2020 08:27:55 +0000 (03:27 -0500)] 
bpo-1635741 port zlib module to multi-phase init (GH-21995)

Port the zlib extension module to multi-phase initialization (PEP 489).

5 years ago[doc] Add link to Generic in typing (GH-22125)
Andre Delfino [Mon, 7 Sep 2020 05:29:38 +0000 (02:29 -0300)] 
[doc] Add link to Generic in typing (GH-22125)

5 years agobpo-41513: Expand comments and add references for a better understanding (GH-22123)
Raymond Hettinger [Sun, 6 Sep 2020 22:10:07 +0000 (15:10 -0700)] 
bpo-41513: Expand comments and add references for a better understanding (GH-22123)

5 years agobpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818)
Mohamed Koubaa [Sun, 6 Sep 2020 10:09:51 +0000 (05:09 -0500)] 
bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818)

Port the _sha1, _sha512, and _md5 extension modules
to multi-phase initialization API (PEP 489).

5 years agocloses bpo-41723: Fix an error in the py_compile documentation. (GH-22110)
Zackery Spytz [Sun, 6 Sep 2020 03:39:23 +0000 (21:39 -0600)] 
closes bpo-41723: Fix an error in the py_compile documentation. (GH-22110)

5 years ago[doc] Fix padding in some typing definitions (GH-22114)
Andre Delfino [Sat, 5 Sep 2020 23:40:25 +0000 (20:40 -0300)] 
[doc] Fix padding in some typing definitions (GH-22114)

Automerge-Triggered-By: @gvanrossum
5 years agoFix documented Python version for venv --upgrade-deps (GH-22113)
johnthagen [Sat, 5 Sep 2020 20:53:47 +0000 (16:53 -0400)] 
Fix documented Python version for venv --upgrade-deps (GH-22113)

Fixes incorrect Python version added for `venv` `--upgrade-deps` in #13100. This feature was added in Python 3.9 not 3.8.

Relates to:

-
- https://github.com/python/cpython/commit/1cba1c9abadf76f458ecf883a48515aa3b534dbd

Automerge-Triggered-By: @vsajip
5 years agobpo-40318: Migrate to SQLite3 trace v2 API (GH-19581)
Erlend Egeberg Aasland [Sat, 5 Sep 2020 20:43:31 +0000 (22:43 +0200)] 
bpo-40318: Migrate to SQLite3 trace v2 API (GH-19581)

Ref. https://sqlite.org/c3ref/trace_v2.html

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-41687: Fix sendfile implementation to work with Solaris (#22040)
Jakub Kulík [Sat, 5 Sep 2020 19:10:01 +0000 (21:10 +0200)] 
bpo-41687: Fix sendfile implementation to work with Solaris (#22040)

5 years agobpo-41627: Distinguish 32 and 64-bit user site packages on Windows (GH-22098)
Steve Dower [Fri, 4 Sep 2020 23:45:54 +0000 (00:45 +0100)] 
bpo-41627: Distinguish 32 and 64-bit user site packages on Windows (GH-22098)

Also fixes the error message returned when sysconfig fails to interpolate a variable correctly.

5 years agobpo-38585: Remove references to defusedexpat (GH-22095)
Zackery Spytz [Fri, 4 Sep 2020 20:57:48 +0000 (14:57 -0600)] 
bpo-38585: Remove references to defusedexpat (GH-22095)

defusedexpat is not maintained.

5 years agobpo-41721: Add xlc options (GH-22096)
Stefan Krah [Fri, 4 Sep 2020 20:33:17 +0000 (22:33 +0200)] 
bpo-41721: Add xlc options (GH-22096)

5 years agobpo-40486: Specify what happens if directory content change diring iteration (GH...
Serhiy Storchaka [Fri, 4 Sep 2020 18:19:30 +0000 (21:19 +0300)] 
bpo-40486: Specify what happens if directory content change diring iteration (GH-22025)

5 years agobpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)
Serhiy Storchaka [Fri, 4 Sep 2020 17:55:41 +0000 (20:55 +0300)] 
bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)

It contains now the name of the parameter instead of its index when parameters
are supplied as a dict.

5 years agobpo-41713: _signal doesn't use multi-phase init (GH-22087)
Victor Stinner [Fri, 4 Sep 2020 12:51:05 +0000 (14:51 +0200)] 
bpo-41713: _signal doesn't use multi-phase init (GH-22087)

Partially revert commit 71d1bd9569c8a497e279f2fea6fe47cd70a87ea3:
don't use multi-phase initialization (PEP 489) for the _signal
extension module.

5 years agobpo-41700: Skip test if the locale is not supported (GH-22081)
Dong-hee Na [Fri, 4 Sep 2020 08:47:40 +0000 (08:47 +0000)] 
bpo-41700: Skip test if the locale is not supported (GH-22081)

5 years ago[doc] Update documentation on logging optimization. (GH-22075)
Vinay Sajip [Thu, 3 Sep 2020 18:44:12 +0000 (19:44 +0100)] 
[doc] Update documentation on logging optimization. (GH-22075)

5 years agoFix 'gather' rules in the python parser generator (GH-22021)
Pablo Galindo [Thu, 3 Sep 2020 14:29:55 +0000 (15:29 +0100)] 
Fix 'gather' rules in the python parser generator (GH-22021)

Currently, empty sequences in gather rules make the conditional for
gather rules fail as empty sequences evaluate as "False". We need to
explicitly check for "None" (the failure condition) to avoid false
negatives.

5 years agobpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser...
Pablo Galindo [Thu, 3 Sep 2020 14:29:32 +0000 (15:29 +0100)] 
bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (GH-22077)

5 years ago[doc] Fix a typo in the graphlib docs (#22030)
Mario Šaško [Thu, 3 Sep 2020 10:00:10 +0000 (12:00 +0200)] 
[doc] Fix a typo in the graphlib docs (#22030)

5 years agobpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049)
Mohamed Koubaa [Thu, 3 Sep 2020 08:21:06 +0000 (03:21 -0500)] 
bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049)

5 years agobpo-39883: Use BSD0 license for code in docs (GH-17635)
Todd [Thu, 3 Sep 2020 05:22:36 +0000 (01:22 -0400)] 
bpo-39883: Use BSD0 license for code in docs (GH-17635)

The PSF board approved this use.

5 years agobpo-39010: Improve test shutdown (#22066)
Ben Darnell [Thu, 3 Sep 2020 04:58:50 +0000 (00:58 -0400)] 
bpo-39010: Improve test shutdown (#22066)

Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to GH-22017

5 years agobpo-41696: Fix handling of debug mode in asyncio.run (#22069)
Shantanu [Thu, 3 Sep 2020 04:54:46 +0000 (21:54 -0700)] 
bpo-41696: Fix handling of debug mode in asyncio.run (#22069)

* bpo-41696: Fix handling of debug mode in asyncio.run

This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run

* 📜🤖 Added by blurb_it.

Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agobpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053)
Pablo Galindo [Wed, 2 Sep 2020 16:44:19 +0000 (17:44 +0100)] 
bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053)

This program can segfault the parser by stack overflow:

```
import ast

code = "f(" + ",".join(['a' for _ in range(100000)]) + ")"
print("Ready!")
ast.parse(code)
```

the reason is that the rule for arguments has a simple recursion when collecting args:

args[expr_ty]:
    [...]
    | a=named_expression b=[',' c=args { c }] {
        [...] }

5 years agocloses bpo-41689: Preserve text signature from tp_doc in C heap type creation. (GH...
Benjamin Peterson [Wed, 2 Sep 2020 16:29:06 +0000 (11:29 -0500)] 
closes bpo-41689: Preserve text signature from tp_doc in C heap type creation. (GH-22058)

5 years agoFix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047)
Pablo Galindo [Wed, 2 Sep 2020 14:29:38 +0000 (15:29 +0100)] 
Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047)

5 years agobpo-41675: Modernize siginterrupt calls (GH-22028)
Pablo Galindo [Wed, 2 Sep 2020 14:29:12 +0000 (15:29 +0100)] 
bpo-41675: Modernize siginterrupt calls (GH-22028)

siginterrupt is deprecated:

./Modules/signalmodule.c:667:5: warning: ‘siginterrupt’ is deprecated: Use sigaction with SA_RESTART instead [-Wdeprecated-declarations]
  667 |     if (siginterrupt(signalnum, flag)<0) {

5 years agobpo-41685: Don't pin setuptools version anymore in Doc/Makefile (GH-22062)
Victor Stinner [Wed, 2 Sep 2020 11:11:21 +0000 (13:11 +0200)] 
bpo-41685: Don't pin setuptools version anymore in Doc/Makefile (GH-22062)

setuptools 50.0.2 is now compatible with Python 3.10:
https://github.com/pypa/setuptools/pull/2361

5 years agobpo-40204: Update Sphinx to version 3.2.1 in Doc/Makefile (GH-22043)
Victor Stinner [Wed, 2 Sep 2020 10:29:31 +0000 (12:29 +0200)] 
bpo-40204: Update Sphinx to version 3.2.1 in Doc/Makefile (GH-22043)

5 years agobpo-1635741: Port _sha3 module to multi-phase init (GH-21855)
Mohamed Koubaa [Wed, 2 Sep 2020 09:55:19 +0000 (04:55 -0500)] 
bpo-1635741: Port _sha3 module to multi-phase init (GH-21855)

Port the _sha3 extension module to multi-phase init (PEP 489).
Convert static types to heap types.

5 years agobpo-1635741: Port _blake2 module to multi-phase init (GH-21856)
Mohamed Koubaa [Wed, 2 Sep 2020 09:45:13 +0000 (04:45 -0500)] 
bpo-1635741: Port _blake2 module to multi-phase init (GH-21856)

Port the _blake2 extension module to the multi-phase
initialization API (PEP 489).

5 years agoFixed mistake in test for f-string error description (GH-22036) (GH-22059)
han-solo [Wed, 2 Sep 2020 08:56:37 +0000 (04:56 -0400)] 
Fixed mistake in test for f-string error description (GH-22036) (GH-22059)

5 years agoImprove hypot() accuracy with three separate accumulators (GH-22032)
Raymond Hettinger [Wed, 2 Sep 2020 05:00:50 +0000 (22:00 -0700)] 
Improve hypot() accuracy with three separate accumulators (GH-22032)

5 years agoRemove reference to Boa Constructor. (GH-22012)
Andre Delfino [Wed, 2 Sep 2020 03:22:55 +0000 (00:22 -0300)] 
Remove reference to Boa Constructor. (GH-22012)

5 years ago[doc] Remove references to PyChecker. (GH-22011)
Andre Delfino [Wed, 2 Sep 2020 03:21:12 +0000 (00:21 -0300)] 
[doc] Remove references to PyChecker. (GH-22011)

5 years agoNote the buffer slots can be set with PyType_Spec with the unlimited API. (GH-22031)
Benjamin Peterson [Wed, 2 Sep 2020 01:36:42 +0000 (20:36 -0500)] 
Note the buffer slots can be set with PyType_Spec with the unlimited API. (GH-22031)

Follow up to f7c4e236429606e1c982cacf24e10fc86ef4462f.

5 years agobpo-39349: Add cancel_futures to Executor.shutdown base class (GH-22023)
Shantanu [Tue, 1 Sep 2020 21:18:07 +0000 (14:18 -0700)] 
bpo-39349: Add cancel_futures to Executor.shutdown base class (GH-22023)

* Add cancel_futures parameter to the Executor base class, since it was missed in the original PR (https://github.com/python/cpython/pull/18057) that added cancel_futures.

5 years agobpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020)
Pablo Galindo [Tue, 1 Sep 2020 18:39:46 +0000 (19:39 +0100)] 
bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020)

When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError.

5 years agobpo-41528: Use math module in turtle (GH-21837)
Marek Madejski [Tue, 1 Sep 2020 16:42:41 +0000 (18:42 +0200)] 
bpo-41528: Use math module in turtle (GH-21837)

Use angle-related functions from math module instead of reinventing the wheel.

5 years agobpo-41617: Fix pycore_bitutils.h to support clang 3.0 (GH-22042)
Victor Stinner [Tue, 1 Sep 2020 16:25:14 +0000 (18:25 +0200)] 
bpo-41617: Fix pycore_bitutils.h to support clang 3.0 (GH-22042)

__builtin_bswap16() is not available in LLVM clang 3.0.

5 years agobpo-41681: Fix for `f-string/str.format` error description when using 2 `,` in format...
han-solo [Tue, 1 Sep 2020 14:34:29 +0000 (10:34 -0400)] 
bpo-41681: Fix for `f-string/str.format` error description when using 2 `,` in format specifier (GH-22036)

* Fixed `f-string/str.format` error description when using two `,` in format specifier.

Co-authored-by: millefalcon <hanish0019@hmail.com>
5 years ago[doc] Add link to FileHandler in logging (GH-21940)
Andre Delfino [Tue, 1 Sep 2020 12:59:46 +0000 (09:59 -0300)] 
[doc] Add link to FileHandler in logging (GH-21940)

Co-authored-by: Andrés Delfino <adelfino@onapsis.com>
5 years agobpo-41685: Temporarily pin setuptools to 49.2.1 in Docs venv. (GH-22038)
Ned Deily [Tue, 1 Sep 2020 09:40:27 +0000 (05:40 -0400)] 
bpo-41685: Temporarily pin setuptools to 49.2.1 in Docs venv. (GH-22038)

See https://github.com/pypa/setuptools/pull/2361

5 years ago[doc] Document VIRTUAL_ENV environment variable (GH-21970)
Andre Delfino [Tue, 1 Sep 2020 06:07:29 +0000 (03:07 -0300)] 
[doc] Document VIRTUAL_ENV environment variable (GH-21970)

5 years agobpo-39010: Fix errors logged on proactor loop restart (#22017)
Ben Darnell [Mon, 31 Aug 2020 19:57:52 +0000 (15:57 -0400)] 
bpo-39010: Fix errors logged on proactor loop restart (#22017)

Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.

5 years ago[doc] Fix markup in logging (GH-22008)
Andre Delfino [Sun, 30 Aug 2020 20:36:58 +0000 (17:36 -0300)] 
[doc] Fix markup in logging (GH-22008)

5 years agobpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556)
Vinay Sharma [Sun, 30 Aug 2020 19:03:11 +0000 (00:33 +0530)] 
bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556)

5 years agobpo-39994: Fix pprint handling of dict subclasses that override __repr__ (GH-21892)
Irit Katriel [Sun, 30 Aug 2020 17:29:53 +0000 (18:29 +0100)] 
bpo-39994: Fix pprint handling of dict subclasses that override __repr__ (GH-21892)

Co-authored-by: Palak Kumar Jha
5 years agoFurther improve accuracy of math.hypot() (GH-22013)
Raymond Hettinger [Sun, 30 Aug 2020 17:00:11 +0000 (10:00 -0700)] 
Further improve accuracy of math.hypot() (GH-22013)

5 years agocloses bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847)
Tony Solomonik [Sun, 30 Aug 2020 04:53:08 +0000 (07:53 +0300)] 
closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847)

Free the stack allocated in va_build_stack if do_mkstack fails
and the stack is not a small_stack

5 years agoImprove asyncio-dev 'Concurrency and Multithreading' docs (GH-20882)
Roger Iyengar [Sat, 29 Aug 2020 23:47:38 +0000 (19:47 -0400)] 
Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882)

I added some information to the `Concurrency and Multithreading` section of the `Developing with asyncio` guide.

This is all information that would have helped me when I started using asyncio. I incorrectly assumed that `loop.call_soon_threadsafe()` and `run_coroutine_threadsafe()` could be called from a thread in a process separate from the one that the event loop is running in. Explicitly stating that this will not work will probably help some people starting out with asyncio in the future.

I also added references to some other functions that can be used for inter-process communication without blocking the event loop. The section already mentions running blocking code in a ThreadPoolExecutor, but I think listing these other options in this section will also be helpful.

5 years agobpo-41513: Save unnecessary steps in the hypot() calculation (#21994)
Raymond Hettinger [Sat, 29 Aug 2020 16:11:04 +0000 (09:11 -0700)] 
bpo-41513: Save unnecessary steps in the hypot() calculation (#21994)

5 years agobpo-19521: Fix parallel build race condition on AIX (GH-21997)
Stefan Krah [Sat, 29 Aug 2020 15:00:08 +0000 (17:00 +0200)] 
bpo-19521: Fix parallel build race condition on AIX (GH-21997)

    Patch by Michael Haubenwallner.

5 years agoFix error in argparse documentation example (GH-17399)
SarahPythonista [Fri, 28 Aug 2020 18:47:58 +0000 (11:47 -0700)] 
Fix error in argparse documentation example (GH-17399)

Automerge-Triggered-By: @rhettinger
5 years agobpo-38787: Clarify docs for PyType_GetModule and warn against common mistake (GH...
Petr Viktorin [Thu, 27 Aug 2020 13:36:48 +0000 (15:36 +0200)] 
bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake (GH-20215)

5 years agobpo-41634: Fix a typo in the curses documentation (GH-21958)
Zackery Spytz [Thu, 27 Aug 2020 11:28:16 +0000 (05:28 -0600)] 
bpo-41634: Fix a typo in the curses documentation (GH-21958)

5 years agobpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845)
wmeehan [Thu, 27 Aug 2020 05:45:25 +0000 (01:45 -0400)] 
bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845)

* bpo-41524: fix pointer bug in PyOS_mystr{n}icmp

The existing implementations of PyOS_mystrnicmp and PyOS_mystricmp
can increment pointers beyond the end of a string.

This commit fixes those cases by moving the mutation out of the condition.

* 📜🤖 Added by blurb_it.

* Address comments

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
5 years agobpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935)
Irit Katriel [Thu, 27 Aug 2020 00:51:12 +0000 (01:51 +0100)] 
bpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935)

5 years agoAdd missing word (GH-21936)
Mason [Thu, 27 Aug 2020 00:49:14 +0000 (19:49 -0500)] 
Add missing word (GH-21936)

"data to lost" -> "data to be lost"

5 years agobpo-41624: fix documentation of typing.Coroutine (GH-21952)
MingZhe Hu [Thu, 27 Aug 2020 00:42:37 +0000 (08:42 +0800)] 
bpo-41624: fix documentation of typing.Coroutine (GH-21952)

5 years agobpo-33660: Fix PosixPath to resolve a relative path on root
Dong-hee Na [Tue, 12 Jun 2018 14:30:45 +0000 (23:30 +0900)] 
bpo-33660: Fix PosixPath to resolve a relative path on root

5 years agoFix typos in comment (GH-21966)
Raymond Hettinger [Wed, 26 Aug 2020 20:09:40 +0000 (13:09 -0700)] 
Fix typos in comment (GH-21966)

5 years agobpo-40077: Convert _operator to use PyType_FromSpec (GH-21954)
Dong-hee Na [Wed, 26 Aug 2020 17:22:27 +0000 (17:22 +0000)] 
bpo-40077: Convert _operator to use PyType_FromSpec (GH-21954)

5 years agobpo-37658: Fix asyncio.wait_for() to respect waited task status (#21894)
Elvis Pranskevichus [Wed, 26 Aug 2020 16:42:45 +0000 (09:42 -0700)] 
bpo-37658: Fix asyncio.wait_for() to respect waited task status (#21894)

Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running.  This is similar to a race with the timeout, which is handled
already.

5 years agobpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (#21895)
Elvis Pranskevichus [Wed, 26 Aug 2020 16:42:22 +0000 (09:42 -0700)] 
bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (#21895)

When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative.  This takes care of that.

Props to @aaliddell for noticing the inconsistency.

5 years agobpo-41513: More accurate hypot() (GH-21916)
Raymond Hettinger [Tue, 25 Aug 2020 00:40:08 +0000 (17:40 -0700)] 
bpo-41513:  More accurate hypot() (GH-21916)

5 years agoREADME: Add link to LICENSE (GH-21565)
Will Binns [Mon, 24 Aug 2020 15:00:12 +0000 (17:00 +0200)] 
README: Add link to LICENSE (GH-21565)

Thanks @wbnns for your contribution.

5 years agoDocument vars behavior when __dict__ is missing (#21466)
Andre Delfino [Fri, 21 Aug 2020 22:29:34 +0000 (19:29 -0300)] 
Document vars behavior when __dict__ is missing (#21466)

5 years agobpo-41573: Update release versions in General FAQ (GH-21915)
wyz23x2 [Fri, 21 Aug 2020 22:28:54 +0000 (06:28 +0800)] 
bpo-41573: Update release versions in General FAQ (GH-21915)

5 years agoUpdate references from travis-ci.org to travis-ci.com (GH-21919)
Ernest W. Durbin III [Fri, 21 Aug 2020 21:34:06 +0000 (17:34 -0400)] 
Update references from travis-ci.org to travis-ci.com (GH-21919)

5 years agoDoc: add a missing period (GH-21819)
Mathieu Dupuy [Thu, 20 Aug 2020 20:08:37 +0000 (22:08 +0200)] 
Doc: add a missing period (GH-21819)

5 years agobpo-41572: Fix grammar in BaseTransport.close docstring (GH-21914)
Cleber Rosa [Thu, 20 Aug 2020 12:40:01 +0000 (08:40 -0400)] 
bpo-41572: Fix grammar in BaseTransport.close docstring (GH-21914)

Fix grammar in BaseTransport.close docstring.

https://bugs.python.org/issue41572

Signed-off-by: Cleber Rosa <crosa@redhat.com>
5 years agobpo-40994: Ungroup items in collections.abc documentation for improved clarity (GH...
Sydney Pemberton [Thu, 20 Aug 2020 10:30:21 +0000 (05:30 -0500)] 
bpo-40994: Ungroup items in collections.abc documentation for improved clarity (GH-21880)

Use a less surprising document structure.

Automerge-Triggered-By: @csabella
5 years agoFix grammar in Doc/tutorial/controlflow.rst (GH-21885)
Denis Ovsienko [Wed, 19 Aug 2020 11:29:47 +0000 (12:29 +0100)] 
Fix grammar in Doc/tutorial/controlflow.rst (GH-21885)

Automerge-Triggered-By: @csabella
5 years agobpo-41568: Fix refleaks in zoneinfo subclasses (GH-21907)
Paul Ganssle [Mon, 17 Aug 2020 22:40:07 +0000 (18:40 -0400)] 
bpo-41568: Fix refleaks in zoneinfo subclasses (GH-21907)

* Fix refleak in C module __init_subclass__

This was leaking a reference to the weak cache dictionary for every
ZoneInfo subclass created.

* Fix refleak in ZoneInfo subclass's clear_cache

The previous version of the code accidentally cleared the global
ZONEINFO_STRONG_CACHE variable (and inducing `ZoneInfo` to create a new
strong cache) on calls to a subclass's `clear_cache()`. This would not
affect guaranteed behavior, but it's still not the right thing to do
(and it caused reference leaks).

5 years agobpo-1635741: Explict GC collect after PyInterpreterState_Clear() (GH-21902)
Hai Shi [Mon, 17 Aug 2020 20:36:19 +0000 (04:36 +0800)] 
bpo-1635741: Explict GC collect after PyInterpreterState_Clear() (GH-21902)

Fix a reference cycle by triggering an explicit GC collection
after calling PyInterpreterState_Clear().

5 years agobpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a...
James Weaver [Mon, 17 Aug 2020 14:19:46 +0000 (15:19 +0100)] 
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a coroutine (GH-21852)

asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.

5 years agoFix typo in message from assert statement (GH-21283)
Allen [Mon, 17 Aug 2020 13:38:55 +0000 (09:38 -0400)] 
Fix typo in message from assert statement (GH-21283)

The error message was missing space between the action "acquire" and "_wait_semaphore" which is an attribute for instances of Condition.

5 years agobpo-40204: Fix duplicated productionlist names in the doc (GH-21900)
Victor Stinner [Mon, 17 Aug 2020 06:41:42 +0000 (08:41 +0200)] 
bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

5 years agobpo-41521: Rename blacklist parameter to not_exported (GH-21824)
Victor Stinner [Mon, 17 Aug 2020 05:20:40 +0000 (07:20 +0200)] 
bpo-41521: Rename blacklist parameter to not_exported (GH-21824)

Rename "blacklist" parameter of test.support.check__all__() to
"not_exported".

5 years agoUpdate the comment of termios.c (#21886)
Soumendra Ganguly [Sun, 16 Aug 2020 15:51:00 +0000 (10:51 -0500)] 
Update the comment of termios.c (#21886)

5 years agobpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler...
Irit Katriel [Sun, 16 Aug 2020 15:10:13 +0000 (16:10 +0100)] 
bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765)

5 years agobpo-41513: Improve speed and accuracy of math.hypot() (GH-21803)
Raymond Hettinger [Sun, 16 Aug 2020 02:38:19 +0000 (19:38 -0700)] 
bpo-41513: Improve speed and accuracy of math.hypot() (GH-21803)

5 years agobpo-41540: AIX: skip test that is flaky with a default ulimit. (#21890)
Stefan Krah [Sat, 15 Aug 2020 18:19:07 +0000 (20:19 +0200)] 
bpo-41540: AIX: skip test that is flaky with a default ulimit. (#21890)

- AIX has extreme over-allocation that is in no relation to the physical
    RAM and swap.

5 years agobpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when...
Dima Tisnek [Sat, 15 Aug 2020 17:01:19 +0000 (02:01 +0900)] 
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation (GH-18772)

[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation

Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)

5 years agobpo-40878: xlc cannot handle C99 extern inline. (GH-21887)
Stefan Krah [Sat, 15 Aug 2020 14:06:21 +0000 (16:06 +0200)] 
bpo-40878: xlc cannot handle C99 extern inline. (GH-21887)

This applies to the default "extc99" mode.  Python does not compile with "stdc99".

5 years agoFix typo in typing doc (GH-21879)
Irit Katriel [Fri, 14 Aug 2020 23:01:36 +0000 (00:01 +0100)] 
Fix typo in typing doc (GH-21879)

Automerge-Triggered-By: @gvanrossum
5 years agobpo-40204: Fix reference to terms in the doc (GH-21865)
Victor Stinner [Fri, 14 Aug 2020 10:20:05 +0000 (12:20 +0200)] 
bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

5 years agobpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965)
Paul Ganssle [Fri, 14 Aug 2020 02:38:30 +0000 (22:38 -0400)] 
bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965)

Prior to this change, attempting to subclass the C implementation of
zoneinfo.ZoneInfo gave the following error:

    TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument

https://bugs.python.org/issue41025