]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-43224: typing: Add tests for pickling and copying of unpacked native tuple (GH...
Matthew Rahtz [Tue, 5 Apr 2022 02:52:42 +0000 (03:52 +0100)] 
bpo-43224: typing: Add tests for pickling and copying of unpacked native tuple (GH-32159)

3 years agocrypt docs: Fix references to `methods` attr (GH-26806)
andrei kulakov [Tue, 5 Apr 2022 02:50:13 +0000 (22:50 -0400)] 
crypt docs: Fix references to `methods` attr (GH-26806)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-32658: Regex docs: Fix metacharacter reference (GH-32230)
Mike cm [Tue, 5 Apr 2022 02:46:54 +0000 (03:46 +0100)] 
bpo-32658: Regex docs: Fix metacharacter reference (GH-32230)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-45790: List macros in same order in which fields are described (GH-29529)
rtobar [Tue, 5 Apr 2022 02:36:33 +0000 (10:36 +0800)] 
bpo-45790: List macros in same order in which fields are described (GH-29529)

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46998: Allow subclassing Any at runtime (GH-31841)
Shantanu [Tue, 5 Apr 2022 02:35:29 +0000 (19:35 -0700)] 
bpo-46998: Allow subclassing Any at runtime (GH-31841)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-47007: [doc] `str` special method lookup (GH-31863)
Vanshaj Singhania [Tue, 5 Apr 2022 02:34:28 +0000 (19:34 -0700)] 
bpo-47007: [doc] `str` special method lookup (GH-31863)

Clarify the `str()` docs to point out that `object.__str__()`
follows special method lookup.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)
yyyyyyyan [Tue, 5 Apr 2022 02:01:36 +0000 (02:01 +0000)] 
bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)

Co-authored-by: Andrew Kuchling <amk@amk.ca>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoFix "Contributed ... in bpo-bpo-45847" (GH-32299)
Oleg Iarygin [Tue, 5 Apr 2022 01:17:54 +0000 (04:17 +0300)] 
Fix "Contributed ... in bpo-bpo-45847" (GH-32299)

3 years agobpo-47097: Add documentation for TypeVarTuple (#32103)
Matthew Rahtz [Mon, 4 Apr 2022 23:37:01 +0000 (00:37 +0100)] 
bpo-47097: Add documentation for TypeVarTuple (#32103)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-40280: Add --enable-wasm-dynamic-linking (GH-32253)
Christian Heimes [Mon, 4 Apr 2022 17:31:31 +0000 (20:31 +0300)] 
bpo-40280: Add --enable-wasm-dynamic-linking (GH-32253)

3 years agobpo-46484:Add test for Calendar.iterweekdays (GH-30825)
180909 [Mon, 4 Apr 2022 17:16:56 +0000 (01:16 +0800)] 
bpo-46484:Add test for Calendar.iterweekdays (GH-30825)

3 years agobpo-47208: Allow vendors to override CTYPES_MAX_ARGCOUNT (GH-32297)
Christian Heimes [Mon, 4 Apr 2022 17:13:42 +0000 (20:13 +0300)] 
bpo-47208: Allow vendors to override CTYPES_MAX_ARGCOUNT (GH-32297)

3 years agoDemonstrate `py --list` in the quickstart section of the Windows doc page (GH-29383)
Christian Clauss [Mon, 4 Apr 2022 15:35:51 +0000 (17:35 +0200)] 
Demonstrate `py --list` in the quickstart section of the Windows doc page (GH-29383)

3 years agoRevert "bpo-44800: Document internal frame naming conventions (GH-32281)" (#32301)
Mark Shannon [Mon, 4 Apr 2022 14:09:40 +0000 (15:09 +0100)] 
Revert "bpo-44800: Document internal frame naming conventions (GH-32281)" (#32301)

This reverts commit 124227c95f310d2ecd4b567271ab1919fc7000cb.

3 years agobpo-47152: Remove unused import in re (GH-32298)
Serhiy Storchaka [Mon, 4 Apr 2022 09:00:53 +0000 (12:00 +0300)] 
bpo-47152: Remove unused import in re (GH-32298)

3 years agobpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)
Serhiy Storchaka [Mon, 4 Apr 2022 07:53:26 +0000 (10:53 +0300)] 
bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)

3 years agobpo-47000: Make `io.text_encoding()` respects UTF-8 mode (GH-32003)
Inada Naoki [Mon, 4 Apr 2022 02:46:57 +0000 (11:46 +0900)] 
bpo-47000: Make `io.text_encoding()` respects UTF-8 mode (GH-32003)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
3 years agoFollow PEP-8 guidelines in tutorial for standard library (GH-26127)
Bob Kline [Sun, 3 Apr 2022 22:31:03 +0000 (18:31 -0400)] 
Follow PEP-8 guidelines in tutorial for standard library (GH-26127)

3 years agobpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads (GH-32209)
Hood Chatham [Sun, 3 Apr 2022 20:58:52 +0000 (13:58 -0700)] 
bpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads (GH-32209)

Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
3 years agobpo-42238: [doc]: make suspicious: false positive. (GH-32292)
Julien Palard [Sun, 3 Apr 2022 20:08:29 +0000 (22:08 +0200)] 
bpo-42238: [doc]: make suspicious: false positive. (GH-32292)

3 years agobpo-46126: Restore 'descriptions' when running tests internally. (GH-32128)
Jason R. Coombs [Sun, 3 Apr 2022 19:33:28 +0000 (15:33 -0400)] 
bpo-46126: Restore 'descriptions' when running tests internally. (GH-32128)

This reverts commit a941e5927f7f2540946813606c61c6aea38db426 (GH-30194).

Automerge-Triggered-By: GH:jaraco
3 years agobpo-23689: re module, fix memory leak when a match is terminated by a signal or memor...
Ma Lin [Sun, 3 Apr 2022 16:16:20 +0000 (00:16 +0800)] 
bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure (GH-32283)

3 years agobpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285)
Christian Heimes [Sun, 3 Apr 2022 15:03:49 +0000 (18:03 +0300)] 
bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285)

3 years agobpo-47196: Fix one more PyInit function signature (GH-32280)
Hood Chatham [Sun, 3 Apr 2022 07:45:26 +0000 (00:45 -0700)] 
bpo-47196: Fix one more PyInit function signature (GH-32280)

I missed one PyInit function in #32244.

Automerge-Triggered-By: GH:tiran
3 years agobpo-44800: Document internal frame naming conventions (GH-32281)
Nick Coghlan [Sun, 3 Apr 2022 06:55:55 +0000 (16:55 +1000)] 
bpo-44800: Document internal frame naming conventions (GH-32281)

The fact interpreter frames were split out from full frame objects
rather than always being part of the eval loop implementation means
that it's tricky to infer the expected naming conventions simply
from looking at the code.

Documenting the de facto conventions in pycore_frame.h means future
readers of the code will have a clear explanation of the rationale
for those conventions (i.e. minimising non-functional code churn).

3 years agoLanguage reference: Remove duplicated text about iterable unpacking (GH-25212)
Jiashuo Li [Sun, 3 Apr 2022 02:41:16 +0000 (10:41 +0800)] 
Language reference: Remove duplicated text about iterable unpacking (GH-25212)

3 years agobpo-46033: Clarify for-statement execution (GH-30025)
Michał D [Sun, 3 Apr 2022 00:52:20 +0000 (02:52 +0200)] 
bpo-46033: Clarify for-statement execution (GH-30025)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-24563: Link encoding names to encoding declarations (GH-32274)
Terry Jan Reedy [Sun, 3 Apr 2022 00:13:37 +0000 (20:13 -0400)] 
bpo-24563: Link encoding names to encoding declarations (GH-32274)

3 years agobpo-45584: Clarify `math.trunc` documentation (GH-29183)
Arthur Milchior [Sat, 2 Apr 2022 22:11:20 +0000 (00:11 +0200)] 
bpo-45584: Clarify `math.trunc` documentation (GH-29183)

While floor/ceil 's documentation are very precise, `truncate` was not explained. I actually had to search online to understand the difference between `truncate` and `floor` (admittedly, once I remembered that numbers are signed, and that floating numbers actually uses a bit for negation symbol instead of two complement, it became obvious)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoos docs: fix typo (GH-28996)
Vitor Buxbaum Orlandi [Sat, 2 Apr 2022 21:38:33 +0000 (18:38 -0300)] 
os docs: fix typo (GH-28996)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
3 years agocodecs docs: fix grammar mistake (GH-29462)
180909 [Sat, 2 Apr 2022 21:12:32 +0000 (05:12 +0800)] 
codecs docs: fix grammar mistake (GH-29462)

3 years agobpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)
Christian Heimes [Sat, 2 Apr 2022 21:11:38 +0000 (00:11 +0300)] 
bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)

3 years agobpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
180909 [Sat, 2 Apr 2022 20:58:26 +0000 (04:58 +0800)] 
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)

3 years agobpo-47031: Improve documentation for `math.nan` (GH-32170)
Charlie Zhao [Sat, 2 Apr 2022 19:58:03 +0000 (03:58 +0800)] 
bpo-47031: Improve documentation for `math.nan` (GH-32170)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoDocument func parameter of locale.atof (GH-18183)
Kevin Locke [Sat, 2 Apr 2022 19:52:05 +0000 (19:52 +0000)] 
Document func parameter of locale.atof (GH-18183)

The second parameter (named `func`) has been present since the `locale`
module was introduced in eef1d4e8b1, but has never been documented.

This commit updates the documentation for `locale.atof` to clarify the
behavior of the function and how the `func` parameter is used.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
3 years agoMore minor fixes to C API docs (GH-31714)
Jelle Zijlstra [Sat, 2 Apr 2022 19:32:59 +0000 (12:32 -0700)] 
More minor fixes to C API docs (GH-31714)

* init_config: wording fixes

* bytearray: remove XXX, there is a good link to the buffer docs

* bytes, call, exceptions: minor wording fixes

3 years agoMore minor fixes to C API docs (GH-31525)
Jelle Zijlstra [Sat, 2 Apr 2022 19:31:05 +0000 (12:31 -0700)] 
More minor fixes to C API docs (GH-31525)

* wording fixes in type.rst

* grammar and punctuation in sys.rst

* set: grammar fixes

* structures: capitalization fix

* grammar fixes for sequence

* objects: point to Py_TYPE instead of direct object access

* numbers: add more explicit Python equivalences

* method: add missing period

* memory: grammar fix

* mapping: grammar fixes

* long: grammar fix

* iter: fix grammar for PyAIter_Check

* init: grammar fix

3 years agobpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 (GH-32241)
Zachary Ware [Sat, 2 Apr 2022 13:10:23 +0000 (08:10 -0500)] 
bpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 (GH-32241)

3 years ago[doc] fix superfluous backtick in front of role. (GH-32220)
Julien Palard [Sat, 2 Apr 2022 13:08:36 +0000 (15:08 +0200)] 
[doc] fix superfluous backtick in front of role. (GH-32220)

3 years agobpo-47152: Convert the re module into a package (GH-32177)
Serhiy Storchaka [Sat, 2 Apr 2022 08:35:13 +0000 (11:35 +0300)] 
bpo-47152: Convert the re module into a package (GH-32177)

The sre_* modules are now deprecated.

3 years agobpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238)
Christian Heimes [Sat, 2 Apr 2022 08:13:44 +0000 (11:13 +0300)] 
bpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238)

3 years agobpo-40280: Detect if WASM platform supports threading (GH-32243)
Christian Heimes [Sat, 2 Apr 2022 08:12:44 +0000 (11:12 +0300)] 
bpo-40280: Detect if WASM platform supports threading (GH-32243)

Automerge-Triggered-By: GH:tiran
3 years agobpo-47196: Fix function pointer cast in test_imp (GH-32244)
Hood Chatham [Sat, 2 Apr 2022 08:00:49 +0000 (01:00 -0700)] 
bpo-47196: Fix function pointer cast in test_imp (GH-32244)

The function PyInit_imp_dummy is declared as void f(PyObject* spec)
but called as void f(void). On wasm targets without the call
trampolines this causes a fatal error.

Automerge-Triggered-By: GH:tiran
3 years agobpo-47131: Speedup AST comparisons in test_unparse by using node traversal (GH-32132)
Jeremy Kloth [Sat, 2 Apr 2022 01:54:04 +0000 (19:54 -0600)] 
bpo-47131: Speedup AST comparisons in test_unparse by using node traversal (GH-32132)

3 years agono-issue: Add assertion to PyModule_GetName for understanding (GH-32236)
Dong-hee Na [Sat, 2 Apr 2022 00:56:30 +0000 (09:56 +0900)] 
no-issue: Add assertion to PyModule_GetName for understanding (GH-32236)

3 years agobpo-40280: Emscripten fork_exec now fails early (GH-32224)
Christian Heimes [Fri, 1 Apr 2022 19:20:56 +0000 (22:20 +0300)] 
bpo-40280: Emscripten fork_exec now fails early (GH-32224)

3 years agobpo-47089: Avoid test_compileall failures on Windows (GH-32037)
Jeremy Kloth [Fri, 1 Apr 2022 18:13:01 +0000 (12:13 -0600)] 
bpo-47089: Avoid test_compileall failures on Windows (GH-32037)

3 years agobpo-40280: Add debug Emscripten flavors (GH-32233)
Christian Heimes [Fri, 1 Apr 2022 15:24:00 +0000 (18:24 +0300)] 
bpo-40280: Add debug Emscripten flavors (GH-32233)

3 years agobpo-46023: makesetup: skip all duplicate modules (GH-32234)
Christian Heimes [Fri, 1 Apr 2022 15:23:12 +0000 (18:23 +0300)] 
bpo-46023: makesetup: skip all duplicate modules (GH-32234)

3 years agobpo-47168: Mark files generated by `make regen-limited-abi` as generated (GH-32195)
Petr Viktorin [Fri, 1 Apr 2022 15:19:05 +0000 (17:19 +0200)] 
bpo-47168: Mark files generated by `make regen-limited-abi` as generated (GH-32195)

3 years agobpo-47172: Compiler enhancements (GH-32200)
Irit Katriel [Fri, 1 Apr 2022 14:50:15 +0000 (15:50 +0100)] 
bpo-47172: Compiler enhancements (GH-32200)

* Make virtual opcodes negative.

* Make is_jump detect only actual jumps.

* Use is_block_push for the exception block setup opcodes.

3 years agobpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)
Irit Katriel [Fri, 1 Apr 2022 12:59:38 +0000 (13:59 +0100)] 
bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)

3 years agobpo-46841: Use a `bytes` object for `_co_code_adaptive` (GH-32205)
Brandt Bucher [Fri, 1 Apr 2022 11:28:50 +0000 (04:28 -0700)] 
bpo-46841: Use a `bytes` object for `_co_code_adaptive` (GH-32205)

3 years agobpo-46841: Avoid unnecessary allocations in code object comparisons (GH-32222)
Brandt Bucher [Fri, 1 Apr 2022 10:42:46 +0000 (03:42 -0700)] 
bpo-46841: Avoid unnecessary allocations in code object comparisons (GH-32222)

3 years agobpo-47009: Streamline list.append for the common case (GH-31864)
Dennis Sweeney [Fri, 1 Apr 2022 10:23:42 +0000 (06:23 -0400)] 
bpo-47009: Streamline list.append for the common case (GH-31864)

3 years agobpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API (GH-32054)
Victor Stinner [Fri, 1 Apr 2022 08:55:00 +0000 (10:55 +0200)] 
bpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API (GH-32054)

Move the private _PyFrameEvalFunction type, and private
_PyInterpreterState_GetEvalFrameFunc() and
_PyInterpreterState_SetEvalFrameFunc() functions to the internal C
API. The _PyFrameEvalFunction callback function type now uses the
_PyInterpreterFrame type which is part of the internal C API.

Update the _PyFrameEvalFunction documentation.

3 years agobpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)
Victor Stinner [Fri, 1 Apr 2022 08:17:57 +0000 (10:17 +0200)] 
bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)

Move the private undocumented _PyEval_EvalFrameDefault() function to
the internal C API. The function now uses the _PyInterpreterFrame
type which is part of the internal C API.

3 years agobpo-47167: Allow overriding a future compliance check in asyncio.Task (GH-32197)
Andrew Svetlov [Fri, 1 Apr 2022 01:25:15 +0000 (04:25 +0300)] 
bpo-47167: Allow overriding a future compliance check in asyncio.Task (GH-32197)

3 years agobpo-45099: Document asyncio internal API (GH-32166)
Andrew Svetlov [Thu, 31 Mar 2022 21:06:07 +0000 (00:06 +0300)] 
bpo-45099: Document asyncio internal API (GH-32166)

3 years agobpo-47151: Fallback to fork when vfork fails in subprocess. (GH-32186)
Gregory P. Smith [Thu, 31 Mar 2022 20:42:28 +0000 (13:42 -0700)] 
bpo-47151: Fallback to fork when vfork fails in subprocess. (GH-32186)

bpo-47151: Fallback to fork when vfork fails in subprocess. An OS kernel can specifically decide to disallow vfork() in a process. No need for that to prevent us from launching subprocesses.

3 years agobpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects (gh-32218)
Eric Snow [Thu, 31 Mar 2022 20:29:52 +0000 (14:29 -0600)] 
bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects (gh-32218)

This effectively reverts the Makefile change in gh-31637. I've added some notes so it is more clear what is going on.

We also update the "Check if generated files are up to date" job to run "make regen-deepfreeze" to ensure "make regen-global-objects" catches deepfreeze.c.

https://bugs.python.org/issue47146

3 years agobpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)
Mark Shannon [Thu, 31 Mar 2022 16:13:25 +0000 (17:13 +0100)] 
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)

3 years agobpo-47182: Fix crash by named unicode characters after interpreter reinitialization...
Christian Heimes [Thu, 31 Mar 2022 15:14:50 +0000 (18:14 +0300)] 
bpo-47182: Fix crash by named unicode characters after interpreter reinitialization (GH-32212)

Automerge-Triggered-By: GH:tiran
3 years agoRemove unnecessary registration of weakref.WeakSet to _collections_abc.Set (GH-32211)
Géry Ogam [Thu, 31 Mar 2022 14:11:35 +0000 (16:11 +0200)] 
Remove unnecessary registration of weakref.WeakSet to _collections_abc.Set (GH-32211)

3 years agobpo-14911: Corrected generator.throw() documentation (GH-32207)
Dave Goncalves [Thu, 31 Mar 2022 13:56:48 +0000 (06:56 -0700)] 
bpo-14911: Corrected generator.throw() documentation (GH-32207)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)
Irit Katriel [Thu, 31 Mar 2022 13:14:15 +0000 (14:14 +0100)] 
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)

3 years agobpo-45847: Port _tkinter to PY_STDLIB_MOD (GH-31698)
Erlend Egeberg Aasland [Thu, 31 Mar 2022 10:19:08 +0000 (12:19 +0200)] 
bpo-45847: Port _tkinter to PY_STDLIB_MOD (GH-31698)

- Remove ``--with-tclk-*`` options from `configure`
- Use pkg-config to detect `_tkinter` dependencies (Tcl/Tk, X11)
- Manual override via environment variables `TCLTK_CFLAGS` and `TCLTK_LIBS`

3 years agobpo-47164: Add _PyCFunctionObject_CAST() macr (GH-32190)
Victor Stinner [Thu, 31 Mar 2022 08:03:13 +0000 (10:03 +0200)] 
bpo-47164: Add _PyCFunctionObject_CAST() macr (GH-32190)

Add _PyCFunctionObject_CAST() and _PyCMethodObject_CAST() macros to
make macros casting their argument easier to read, but also to check
the type of their input in debug mode: assert(PyCFunction_Check(func)
and assert(PyCMethod_Check(func).

Reformat also PyCFunction_XXX() macros for readability.

3 years agobpo-47164: Add _PyCFunction_CAST() macro (GH-32192)
Victor Stinner [Thu, 31 Mar 2022 08:02:34 +0000 (10:02 +0200)] 
bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)

Use the macro in C files of the Python/ directory.

3 years agobpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191)
Victor Stinner [Thu, 31 Mar 2022 07:59:27 +0000 (09:59 +0200)] 
bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191)

Add macros to cast objects to PyASCIIObject*, PyCompactUnicodeObject*
and PyUnicodeObject*: _PyASCIIObject_CAST(),
_PyCompactUnicodeObject_CAST() and _PyUnicodeObject_CAST(). Using
these new macros make the code more readable and check their argument
with: assert(PyUnicode_Check(op)).

Remove redundant assert(PyUnicode_Check(op)) in macros using directly
or indirectly these new CAST macros.

Replacing existing casts with these macros.

3 years agobpo-47146: Avoid Using make Recursively (gh-32206)
Eric Snow [Thu, 31 Mar 2022 01:24:02 +0000 (19:24 -0600)] 
bpo-47146: Avoid Using make Recursively (gh-32206)

https://bugs.python.org/issue47146

3 years agobpo-46566: Make test_launcher more robust to a variety of installs (GH-32204)
Steve Dower [Wed, 30 Mar 2022 21:18:40 +0000 (22:18 +0100)] 
bpo-46566: Make test_launcher more robust to a variety of installs (GH-32204)

3 years agobpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203)
Steve Dower [Wed, 30 Mar 2022 20:20:38 +0000 (21:20 +0100)] 
bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203)

3 years agobpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189)
Christian Heimes [Wed, 30 Mar 2022 19:28:33 +0000 (22:28 +0300)] 
bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189)

3 years agoAdd CODEOWNERS entry for pathlib (GH-32202)
Brett Cannon [Wed, 30 Mar 2022 18:34:29 +0000 (11:34 -0700)] 
Add CODEOWNERS entry for pathlib (GH-32202)

3 years agobpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179)
Dong-hee Na [Wed, 30 Mar 2022 17:31:33 +0000 (02:31 +0900)] 
bpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179)

3 years agoReplace with_traceback() with exception chaining and reraising (GH-32074)
Oleg Iarygin [Wed, 30 Mar 2022 12:28:20 +0000 (15:28 +0300)] 
Replace with_traceback() with exception chaining and reraising (GH-32074)

3 years agobpo-39622: Interrupt the main asyncio task on Ctrl+C (GH-32105)
Andrew Svetlov [Wed, 30 Mar 2022 12:15:06 +0000 (15:15 +0300)] 
bpo-39622: Interrupt the main asyncio task on Ctrl+C (GH-32105)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoMerge deoptimization blocks in interpreter (GH-32155)
Mark Shannon [Wed, 30 Mar 2022 12:11:33 +0000 (13:11 +0100)] 
Merge deoptimization blocks in interpreter (GH-32155)

3 years agobpo-34861: Make cumtime the default sorting key for cProfile (GH-31929)
Daniël van Noord [Wed, 30 Mar 2022 11:10:10 +0000 (13:10 +0200)] 
bpo-34861: Make cumtime the default sorting key for cProfile (GH-31929)

3 years agobpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)
Hugo van Kemenade [Wed, 30 Mar 2022 11:00:27 +0000 (14:00 +0300)] 
bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)

3 years agobpo-46864: Suppress even more ob_shash deprecation warnings (GH-32176)
Christian Heimes [Wed, 30 Mar 2022 06:35:15 +0000 (09:35 +0300)] 
bpo-46864: Suppress even more ob_shash deprecation warnings (GH-32176)

3 years agobpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself...
Irit Katriel [Tue, 29 Mar 2022 22:07:15 +0000 (23:07 +0100)] 
bpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself (GH-32180)

3 years agoasyncio.Task: rename internal nested variable to don't hide another declaration from...
Andrew Svetlov [Tue, 29 Mar 2022 21:33:51 +0000 (00:33 +0300)] 
asyncio.Task: rename internal nested variable to don't hide another declaration from outer scope (GH-32181)

3 years agobpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480)
Dave Goncalves [Tue, 29 Mar 2022 21:26:27 +0000 (14:26 -0700)] 
bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480)

* bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes
* GH-25480: remove trailing whitespace in ctypes doc
* GH-25480: add news entry blurb
* GH-25480: corrected formatting error in news blurb
* GH-25480: simplified, corrected formatting in news blurb
* GH-25480: remove trailing whitespace in news blurb
* GH-25480: fixed class markup in news blurb
* GH-25480: fixed unsupported type tests and naming per review comments
* GH-25480: fixed whitepace errors
* condensed base class selection for unsupported byte order tests
* added versionadded tags for new EndianUnion classes

3 years agoUpdate glossary.rst (GH-32093)
Géry Ogam [Tue, 29 Mar 2022 21:21:56 +0000 (23:21 +0200)] 
Update glossary.rst (GH-32093)

3 years agobpo-42340: Document issues around KeyboardInterrupt (GH-23255)
benfogle [Tue, 29 Mar 2022 21:21:36 +0000 (17:21 -0400)] 
bpo-42340: Document issues around KeyboardInterrupt (GH-23255)

Update documentation to note that in some circumstances,
KeyboardInterrupt may cause code to enter an inconsistent state. Also
document sample workaround to avoid KeyboardInterrupt, if needed.

3 years agobpo-14265: Adds fully qualified test name to unittest output (GH-32138)
Sam Ezeh [Tue, 29 Mar 2022 15:02:09 +0000 (16:02 +0100)] 
bpo-14265: Adds fully qualified test name to unittest output (GH-32138)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-35859: Fix a few long-standing bugs in re engine (GH-12427)
Ma Lin [Tue, 29 Mar 2022 14:31:01 +0000 (22:31 +0800)] 
bpo-35859: Fix a few long-standing bugs in re engine (GH-12427)

In rare cases, capturing group could get wrong result.

Regular expression engines in Perl and Java have similar bugs.
The new behavior now matches the behavior of more modern
RE engines: in the regex module and in PHP, Ruby and Node.js.

3 years agobpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122)
Dennis Sweeney [Tue, 29 Mar 2022 02:07:05 +0000 (22:07 -0400)] 
bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122)

3 years agobpo-46566: Add new py.exe launcher implementation (GH-32062)
Steve Dower [Mon, 28 Mar 2022 23:21:08 +0000 (00:21 +0100)] 
bpo-46566: Add new py.exe launcher implementation (GH-32062)

3 years agobpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)
Vincent Bernat [Mon, 28 Mar 2022 21:50:26 +0000 (23:50 +0200)] 
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agobpo-47129: Add more informative messages to f-string syntax errors (32127)
Maciej Górski [Mon, 28 Mar 2022 21:08:36 +0000 (23:08 +0200)] 
bpo-47129: Add more informative messages to f-string syntax errors (32127)

* Add more informative messages to f-string syntax errors

* 📜🤖 Added by blurb_it.

* Fix whitespaces

* Change error message

* Remove the 'else' statement (as sugested in review)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agobpo-26120: make pydoc exclude __future__ imports from the data block of the module...
Irit Katriel [Mon, 28 Mar 2022 21:02:57 +0000 (22:02 +0100)] 
bpo-26120: make pydoc exclude __future__ imports from the data block of the module (GH-30888)

3 years agobpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objec...
Eric Snow [Mon, 28 Mar 2022 20:56:05 +0000 (14:56 -0600)] 
bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162)

The race likely originated with gh-32061.

https://bugs.python.org/issue47146

3 years agobpo-47138: Ensure Windows docs build uses the same pinned version as other platforms...
Steve Dower [Mon, 28 Mar 2022 20:38:31 +0000 (21:38 +0100)] 
bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161)

3 years agoFix typo in the sqlite3 docs (GH-31915)
Jonathan [Mon, 28 Mar 2022 18:44:41 +0000 (13:44 -0500)] 
Fix typo in the sqlite3 docs (GH-31915)

Co-authored-by: Jonathan <89750679+AHypnotoad@users.noreply.github.com>
3 years agobpo-47070: Add _PyBytes_Repeat() (GH-31999)
Pieter Eendebak [Mon, 28 Mar 2022 08:43:45 +0000 (10:43 +0200)] 
bpo-47070: Add _PyBytes_Repeat() (GH-31999)

Use it where appropriate: the repeat functions of `array.array`, `bytes`, `bytearray`, and `str`.

3 years agobpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636)
vidhya [Mon, 28 Mar 2022 04:31:32 +0000 (00:31 -0400)] 
bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636)

The enter_context is updated with following information: 'The :meth:`__enter__` method
      returns the ExitStack instance, and performs no additional operations.'

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoctypes docs: Fix array-length reference to "non-negative" from "positive" (GH-32097)
Yonatan Goldschmidt [Mon, 28 Mar 2022 03:12:21 +0000 (22:12 -0500)] 
ctypes docs: Fix array-length reference to "non-negative" from "positive" (GH-32097)