]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-83270: Update IDLE's credits (#95528)
Erlend Egeberg Aasland [Tue, 2 Aug 2022 04:23:42 +0000 (06:23 +0200)] 
gh-83270: Update IDLE's credits (#95528)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago gh-95191: IDLE: Include prompts when saving Shell #95554
Terry Jan Reedy [Tue, 2 Aug 2022 04:10:39 +0000 (00:10 -0400)] 
 gh-95191: IDLE: Include prompts when saving Shell #95554

3 years agogh-92219: Clarify that some options to the installer may break the install (GH-95548)
Steve Dower [Mon, 1 Aug 2022 23:57:46 +0000 (00:57 +0100)] 
gh-92219: Clarify that some options to the installer may break the install (GH-95548)

3 years agogh-90110: Get the C Analyzer Tool Working Again (gh-95545)
Eric Snow [Mon, 1 Aug 2022 23:13:23 +0000 (17:13 -0600)] 
gh-90110: Get the C Analyzer Tool Working Again (gh-95545)

3 years agoGH-95150: Use position and exception tables for code hashing and equality (GH-95509)
Brandt Bucher [Mon, 1 Aug 2022 18:02:56 +0000 (11:02 -0700)] 
GH-95150: Use position and exception tables for code hashing and equality (GH-95509)

3 years agogh-91447: Fix findtext to only give an empty string on None (GH-91486)
Eugene Triguba [Mon, 1 Aug 2022 16:52:39 +0000 (11:52 -0500)] 
gh-91447: Fix findtext to only give an empty string on None (GH-91486)

The API documentation for [findtext](https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.findtext) states that this function gives back an empty string on "no text content." With the previous implementation, this would give back a empty string even on text content values such as 0 or False. This patch attempts to resolve that by only giving back an empty string if the text attribute is set to `None`. Resolves #91447.

Automerge-Triggered-By: GH:gvanrossum
3 years agogh-95417: Quick fix for "ULONG_PTR differs in levels of indirection from void *"...
Oleg Iarygin [Mon, 1 Aug 2022 16:30:15 +0000 (19:30 +0300)] 
gh-95417: Quick fix for "ULONG_PTR differs in levels of indirection from void *" (GH-95538)

3 years agogh-95173: Add a regression test for sorting tuples containing None (#95464)
Jacob Walls [Mon, 1 Aug 2022 16:02:09 +0000 (12:02 -0400)] 
gh-95173: Add a regression test for sorting tuples containing None (#95464)

3 years agogh-95445: Ensure Windows msi uninstalls document folder successfully (GH-95465)
neonene [Mon, 1 Aug 2022 15:37:32 +0000 (00:37 +0900)] 
gh-95445: Ensure Windows msi uninstalls document folder successfully (GH-95465)

3 years agono-issue: Fix typo of "thrid" instead of "third" in dis docs (gh-95510)
Alex Hedges [Mon, 1 Aug 2022 15:06:43 +0000 (11:06 -0400)] 
no-issue: Fix typo of "thrid" instead of "third" in dis docs (gh-95510)

3 years agoGH-95245: Store object values and dict pointers in single tagged pointer. (GH-95278)
Mark Shannon [Mon, 1 Aug 2022 13:34:54 +0000 (14:34 +0100)] 
GH-95245: Store object values and dict pointers in single tagged pointer. (GH-95278)

3 years agogh-91146: More reduce allocation size of list from str.split/rsplit (gh-95493)
Dong-hee Na [Mon, 1 Aug 2022 13:15:07 +0000 (22:15 +0900)] 
gh-91146: More reduce allocation size of list from str.split/rsplit (gh-95493)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
3 years agogh-95007: Remove the NoneType return converter from Argument Clinic Doc (#95529)
Noam Cohen [Mon, 1 Aug 2022 13:07:35 +0000 (16:07 +0300)] 
gh-95007: Remove the NoneType return converter from Argument Clinic Doc (#95529)

The converter was removed in 74b5e4ce80858ac5c7d03411cb8cce7e6865f181

3 years ago gh-93649: Split heaptype tests from _testcapimodule.c (GH-95386)
Petr Viktorin [Mon, 1 Aug 2022 13:04:14 +0000 (15:04 +0200)] 
 gh-93649: Split heaptype tests from _testcapimodule.c  (GH-95386)

This removes the unused negative_dictoffset function:
the type this function would create is available as
    _testcapi.HeapCTypeWithNegativeDict

3 years agogh-77617: Add sqlite3 command-line interface (#95026)
Erlend Egeberg Aasland [Mon, 1 Aug 2022 10:25:16 +0000 (12:25 +0200)] 
gh-77617: Add sqlite3 command-line interface (#95026)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-95273: Clarify when sqlite_* attributes are added to sqlite3 exceptions (#95523)
Erlend Egeberg Aasland [Mon, 1 Aug 2022 09:15:07 +0000 (11:15 +0200)] 
gh-95273: Clarify when sqlite_* attributes are added to sqlite3 exceptions (#95523)

3 years agogh-95511: IDLE - fix Shell context menu copy-with-prompts bug (#95512)
Terry Jan Reedy [Mon, 1 Aug 2022 05:06:13 +0000 (01:06 -0400)] 
gh-95511: IDLE - fix Shell context menu copy-with-prompts bug (#95512)

If one selects whole lines, as the sidebar makes easy, do not
add an extra line.  Only move the end of a selection to the
beginning of the next line when not already at the beginning
of a line.  (Also improve the surrounding code.)

3 years agobpo-42037: Corrected request dependencies in CookieJar functions (GH-23112)
markus-sus [Mon, 1 Aug 2022 02:42:13 +0000 (04:42 +0200)] 
bpo-42037: Corrected request dependencies in CookieJar functions (GH-23112)

3 years agoIDLE: Fix docs URL in the About window (#28417)
Serhiy Storchaka [Sun, 31 Jul 2022 20:47:28 +0000 (23:47 +0300)] 
IDLE: Fix docs URL in the About window (#28417)

3 years agobpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the command...
Pablo Galindo Salgado [Sun, 31 Jul 2022 15:33:56 +0000 (16:33 +0100)] 
bpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)" (#94745)

3 years agogh-91146: Reduce allocation size of list from str.split()/rsplit() (gh-95473)
Dong-hee Na [Sun, 31 Jul 2022 03:14:53 +0000 (12:14 +0900)] 
gh-91146: Reduce allocation size of list from str.split()/rsplit() (gh-95473)

3 years agogh-95471: IDLE - Tweak Edit menu (#95481)
Terry Jan Reedy [Sun, 31 Jul 2022 01:09:07 +0000 (21:09 -0400)] 
gh-95471: IDLE - Tweak Edit menu (#95481)

Move `Select All` above  `Cut` as it is used with `Cut` and `Copy` but not `Paste`.  Add a separator between `Replace` and `Go to Line` to separate items that belong to the 'Edit-find' (above) and 'Edit-show' (below) IDLE github project topics.

3 years agogh-94635: Add Reference, How-to, and Concepts headings to sqlite3 docs (#94636)
Erlend Egeberg Aasland [Sat, 30 Jul 2022 23:24:15 +0000 (01:24 +0200)] 
gh-94635: Add Reference, How-to, and Concepts headings to sqlite3 docs (#94636)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoDoctest cleanups (GH-95436)
Zachary Ware [Sat, 30 Jul 2022 22:21:08 +0000 (17:21 -0500)] 
Doctest cleanups (GH-95436)

* GHA: Don't hide doctest output

* Enable doctests in math.rst

* Squash warnings in nntplib.rst doctests

* Squash warning in turtle.rst doctest

* Squash warnings in whatsnew/3.2.rst doctests

* Treat warnings as errors in Doc/ doctests

3 years agogh-90654: IDLE - Insert blank line in NEWS.txt (#95478)
Terry Jan Reedy [Sat, 30 Jul 2022 19:57:37 +0000 (15:57 -0400)] 
gh-90654: IDLE - Insert blank line in NEWS.txt (#95478)

Needed for backports.

3 years agogh-95454: Replace truthy/falsy with true/false (GH-95456)
Robert O'Shea [Sat, 30 Jul 2022 07:42:21 +0000 (08:42 +0100)] 
gh-95454: Replace truthy/falsy with true/false (GH-95456)

3 years agogh-94938: Fix test (GH-95396)
Serhiy Storchaka [Sat, 30 Jul 2022 06:16:22 +0000 (09:16 +0300)] 
gh-94938: Fix test (GH-95396)

3 years agogh-95411: IDLE - Enable using the module browser with .pyw files (#95397)
Erlend Egeberg Aasland [Sat, 30 Jul 2022 04:42:13 +0000 (06:42 +0200)] 
gh-95411: IDLE - Enable using the module browser with .pyw files (#95397)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agogh-95273: Relocate sqlite3 enable load extension note (#95430)
Erlend Egeberg Aasland [Fri, 29 Jul 2022 19:27:15 +0000 (21:27 +0200)] 
gh-95273: Relocate sqlite3 enable load extension note (#95430)

3 years agogh-94302: Clarify use of the 'open' operation in os.startfile (GH-95441)
Steve Dower [Fri, 29 Jul 2022 16:24:56 +0000 (17:24 +0100)] 
gh-94302: Clarify use of the 'open' operation in os.startfile (GH-95441)

3 years agogh-95415: Make availability directive consistent (GH-95416)
Christian Heimes [Fri, 29 Jul 2022 14:42:09 +0000 (16:42 +0200)] 
gh-95415: Make availability directive consistent (GH-95416)

3 years agogh-95432: Fixup sqlite3 tutorial example (#95431)
Erlend Egeberg Aasland [Fri, 29 Jul 2022 12:31:41 +0000 (14:31 +0200)] 
gh-95432: Fixup sqlite3 tutorial example (#95431)

- the insert statement should have five placeholders, not four
- missing ... in the multiline row list

3 years agogh-94512: Fix forced arg format in AC-processed resource (GH-94515)
Oleg Iarygin [Fri, 29 Jul 2022 11:48:11 +0000 (14:48 +0300)] 
gh-94512: Fix forced arg format in AC-processed resource (GH-94515)

3 years agogh-95273: Improve sqlite3 class descriptions (#95379)
Erlend Egeberg Aasland [Fri, 29 Jul 2022 09:53:23 +0000 (11:53 +0200)] 
gh-95273: Improve sqlite3 class descriptions (#95379)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-95273: Move sqlite3 executemany examples from reference to tutorial (#95351)
Erlend Egeberg Aasland [Fri, 29 Jul 2022 07:42:22 +0000 (09:42 +0200)] 
gh-95273: Move sqlite3 executemany examples from reference to tutorial (#95351)

3 years agogh-95273: Condense sqlite3 executescript example (#95383)
Erlend Egeberg Aasland [Fri, 29 Jul 2022 07:40:44 +0000 (09:40 +0200)] 
gh-95273: Condense sqlite3 executescript example (#95383)

3 years agogh-94673: Add Per-Interpreter tp_weaklist for Static Builtin Types (#95302)
Eric Snow [Fri, 29 Jul 2022 01:23:47 +0000 (19:23 -0600)] 
gh-94673: Add Per-Interpreter tp_weaklist for Static Builtin Types (#95302)

* Store tp_weaklist on the interpreter state for static builtin types.

* Factor out _PyStaticType_GET_WEAKREFS_LISTPTR().

* Add _PyStaticType_ClearWeakRefs().

* Add a comment about how _PyStaticType_ClearWeakRefs() loops.

* Document the change.

* Update Doc/whatsnew/3.12.rst

* Fix a typo.

3 years agoImprove documentation for adding datetime and timedelta (gh-95403)
BenjaminHelyer [Fri, 29 Jul 2022 00:09:51 +0000 (19:09 -0500)] 
Improve documentation for adding datetime and timedelta (gh-95403)

3 years agogh-89610: Add .pyi as a recognised extension for IDLE on macOS (#95393)
Erlend Egeberg Aasland [Thu, 28 Jul 2022 23:04:26 +0000 (01:04 +0200)] 
gh-89610: Add .pyi as a recognised extension for IDLE on macOS (#95393)

This allows opening stub files by double clicking on them in the Finder.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agogh-43414: os.get_terminal_size() now uses the actual file descriptor on Windows inste...
Raghunandan Bhat [Thu, 28 Jul 2022 22:48:33 +0000 (18:48 -0400)] 
gh-43414: os.get_terminal_size() now uses the actual file descriptor on Windows instead of mapping to standard handles (#93203)

3 years agoFix misused variable that was preventing permutations of classes from being tested...
Jingxuan He [Thu, 28 Jul 2022 22:42:51 +0000 (00:42 +0200)] 
Fix misused variable that was preventing permutations of classes from being tested (GH-93935)

3 years agogh-86128: Add warning to ThreadPoolExecutor docs about atexit behaviour (GH-94008)
[object Object] [Thu, 28 Jul 2022 22:38:56 +0000 (15:38 -0700)] 
gh-86128: Add warning to ThreadPoolExecutor docs about atexit behaviour (GH-94008)

3 years agoFix Unicode doc and replace use of macro with PyMem_New function (GH-94088)
Pamela Fox [Thu, 28 Jul 2022 22:32:16 +0000 (15:32 -0700)] 
Fix Unicode doc and replace use of macro with PyMem_New function (GH-94088)

3 years agogh-59200: Clarify `PyLong_FromString` documentation (GH-94363)
JustAnotherArchivist [Thu, 28 Jul 2022 22:12:27 +0000 (22:12 +0000)] 
gh-59200: Clarify `PyLong_FromString` documentation (GH-94363)

3 years agogh-94512: Fix forced arg format in AC-processed overlapped (GH-94516)
Oleg Iarygin [Thu, 28 Jul 2022 22:09:46 +0000 (01:09 +0300)] 
gh-94512: Fix forced arg format in AC-processed overlapped (GH-94516)

3 years agogh-95359: Fix py.exe launcher handling of per-user py.ini and command names (GH-95399)
Steve Dower [Thu, 28 Jul 2022 20:11:17 +0000 (21:11 +0100)] 
gh-95359: Fix py.exe launcher handling of per-user py.ini and command names (GH-95399)

3 years agoUpdate link to faster cpython benchmarks (GH-95391)
Ken Jin [Thu, 28 Jul 2022 16:22:24 +0000 (00:22 +0800)] 
Update link to faster cpython benchmarks (GH-95391)

3 years agoGH-95097: fix `asyncio.run` for tasks without `uncancel` method (#95211)
Kumar Aditya [Thu, 28 Jul 2022 15:47:54 +0000 (21:17 +0530)] 
GH-95097: fix `asyncio.run` for tasks without `uncancel` method (#95211)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
3 years agogh-95369: add missing decref in error case of exception group's split (GH-95370)
Irit Katriel [Thu, 28 Jul 2022 10:38:46 +0000 (11:38 +0100)] 
gh-95369: add missing decref in error case of exception group's split (GH-95370)

3 years agogh-95355: Check tokens[0] after allocating memory (GH-95356)
Honglin Zhu [Thu, 28 Jul 2022 10:00:34 +0000 (18:00 +0800)] 
gh-95355: Check tokens[0] after allocating memory (GH-95356)

#95355

Automerge-Triggered-By: GH:pablogsal
3 years agogh-95166: cancel map waited on future on timeout (GH-95169)
Thomas Grainger [Thu, 28 Jul 2022 09:20:10 +0000 (10:20 +0100)] 
gh-95166: cancel map waited on future on timeout (GH-95169)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoGH-90081: Run python tracers at full speed (GH-95328)
Mark Shannon [Thu, 28 Jul 2022 09:17:22 +0000 (10:17 +0100)] 
GH-90081: Run python tracers at full speed (GH-95328)

3 years agoDocs: Fix refs & tweak wording in sqlite3 'Using shortcut methods'
Erlend Egeberg Aasland [Thu, 28 Jul 2022 05:38:36 +0000 (07:38 +0200)] 
Docs: Fix refs & tweak wording in sqlite3 'Using shortcut methods'

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-94938: Fix errror detection of unexpected keyword arguments (GH-94999)
Serhiy Storchaka [Thu, 28 Jul 2022 04:40:36 +0000 (07:40 +0300)] 
gh-94938: Fix errror detection of unexpected keyword arguments (GH-94999)

When keyword argument name is an instance of a str subclass with
overloaded methods __eq__ and __hash__, the former code could not find
the name of an extraneous keyword argument to report an error, and
_PyArg_UnpackKeywords() returned success without setting the
corresponding cell in the linearized arguments array. But since the number
of expected initialized cells is determined as the total number of passed
arguments, this lead to reading NULL as a keyword parameter value, that
caused SystemError or crash or other undesired behavior.

3 years agogh-95174: Add pthread stubs for WASI (GH-95234)
Christian Heimes [Wed, 27 Jul 2022 18:28:06 +0000 (20:28 +0200)] 
gh-95174: Add pthread stubs for WASI (GH-95234)

Co-authored-by: Brett Cannon <brett@python.org>
3 years agogh-95339: update bundled pip to 22.2.1 (gh-95340)
Stéphane Bidoul [Wed, 27 Jul 2022 18:14:42 +0000 (20:14 +0200)] 
gh-95339: update bundled pip to 22.2.1 (gh-95340)

3 years agogh-95324: Emit a warning if an object doesn't call PyObject_GC_UnTrack during dealloc...
Pablo Galindo Salgado [Wed, 27 Jul 2022 15:03:38 +0000 (16:03 +0100)] 
gh-95324: Emit a warning if an object doesn't call PyObject_GC_UnTrack during deallocation in debug mode (#95325)

3 years agogh-95174: Move WASIX logic into wasi-env (GH-95320)
Christian Heimes [Wed, 27 Jul 2022 13:30:36 +0000 (15:30 +0200)] 
gh-95174: Move WASIX logic into wasi-env (GH-95320)

wasi-env now sets WASIX flags. This allows us to control all build
parameter for wasm32-wasi buildbot from CPython repository.

Also export and improve SYSROOT parameter.

3 years agogh-95273: Normalise sqlite3 reference wording (#95274)
Erlend Egeberg Aasland [Wed, 27 Jul 2022 13:24:13 +0000 (15:24 +0200)] 
gh-95273: Normalise sqlite3 reference wording (#95274)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoGH-93899: fix checks for eventfd flags (GH-95170)
Kumar Aditya [Wed, 27 Jul 2022 13:05:29 +0000 (18:35 +0530)] 
GH-93899: fix checks for eventfd flags  (GH-95170)

3 years agogh-94630: Fixup sqlite3 argument spec docs for connection execute* methods (#95319)
Erlend Egeberg Aasland [Wed, 27 Jul 2022 12:46:21 +0000 (14:46 +0200)] 
gh-94630: Fixup sqlite3 argument spec docs for connection execute* methods (#95319)

3 years agoGH-95045: gc untrack _lsprof.Profiler before deallocating it (GH-95315)
Kumar Aditya [Wed, 27 Jul 2022 12:03:50 +0000 (17:33 +0530)] 
GH-95045: gc untrack _lsprof.Profiler before deallocating it (GH-95315)

Automerge-Triggered-By: GH:pablogsal
3 years agogh-93963: Remove usage of deprecated interface from importlib.abc. (#95217)
Jason R. Coombs [Wed, 27 Jul 2022 08:54:31 +0000 (04:54 -0400)] 
gh-93963: Remove usage of deprecated interface from importlib.abc. (#95217)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years agogh-95005: Replace PyAccu with PyUnicodeWriter (gh-95006)
Aivars Kalvāns [Wed, 27 Jul 2022 08:43:34 +0000 (11:43 +0300)] 
gh-95005: Replace PyAccu with PyUnicodeWriter (gh-95006)

3 years agogh-95280: Fix test_get_ciphers on systems without RSA key exchange (GH-95282)
Christian Heimes [Wed, 27 Jul 2022 07:19:49 +0000 (09:19 +0200)] 
gh-95280: Fix test_get_ciphers on systems without RSA key exchange (GH-95282)

3 years agogh-95174: WASI: skip missing sockets functions (GH-95179)
Christian Heimes [Wed, 27 Jul 2022 06:19:23 +0000 (08:19 +0200)] 
gh-95174: WASI: skip missing sockets functions (GH-95179)

3 years agogh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086)
Christian Heimes [Wed, 27 Jul 2022 06:18:34 +0000 (08:18 +0200)] 
gh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086)

3 years agogh-94635: Add sqlite3 'Introduction' and 'Tutorial' doc headings (#95269)
Erlend Egeberg Aasland [Wed, 27 Jul 2022 05:43:24 +0000 (07:43 +0200)] 
gh-94635: Add sqlite3 'Introduction' and 'Tutorial' doc headings (#95269)

3 years agogh-94673: Add Per-Interpreter Storage for Static Builtin Types (#95255)
Eric Snow [Tue, 26 Jul 2022 23:26:43 +0000 (17:26 -0600)] 
gh-94673: Add Per-Interpreter Storage for Static Builtin Types (#95255)

This is the last precursor to storing tp_subclasses (and tp_weaklist) on the interpreter state for static builtin types.

Here we add per-type storage on PyInterpreterState, but only for the static builtin types.  This involves the following:

* add PyInterpreterState.types
   * move PyInterpreterState.type_cache to it
   * add a "num_builtins_initialized" field
   * add a "builtins" field (a static array big enough for all the static builtin types)
* add _PyStaticType_GetState() to look up a static builtin type's state
* (temporarily) add PyTypeObject.tp_static_builtin_index (to hold the type's index into PyInterpreterState.types.builtins)

We will be eliminating tp_static_builtin_index in a later change.

3 years agogh-95285: py.exe launcher fails with short argv0 (GH-95295)
Steve Dower [Tue, 26 Jul 2022 20:24:44 +0000 (21:24 +0100)] 
gh-95285: py.exe launcher fails with short argv0 (GH-95295)

3 years agogh-93678: Address stack exhaustion on WASI (GH-95296)
Christian Heimes [Tue, 26 Jul 2022 20:14:35 +0000 (22:14 +0200)] 
gh-93678: Address stack exhaustion on WASI (GH-95296)

3 years agogh-94801: Fix regression in configure's CPPFLAGS handling (GH-95288)
Christian Heimes [Tue, 26 Jul 2022 19:39:04 +0000 (21:39 +0200)] 
gh-94801: Fix regression in configure's CPPFLAGS handling (GH-95288)

3 years agogh-95291: Use import helper to improve sqlite3 audit tests (#95292)
Erlend Egeberg Aasland [Tue, 26 Jul 2022 19:18:16 +0000 (21:18 +0200)] 
gh-95291: Use import helper to improve sqlite3 audit tests (#95292)

Now the tests are correctly reported as skipped if sqlite3 is not available.

3 years agoFix minor docstring issues in `dataclasses.py`. (gh-93024)
Roman Novak [Tue, 26 Jul 2022 14:48:58 +0000 (07:48 -0700)] 
Fix minor docstring issues in `dataclasses.py`. (gh-93024)

Previously, when using `functools.wrap` around them (and inherit their docstrings), sphinx renders the docstrings badly and raises warnings about wrong indent.

3 years agogh-93678: extract 'struct cfg_builder' from the compiler so that the CFG can be manip...
Irit Katriel [Tue, 26 Jul 2022 13:36:30 +0000 (14:36 +0100)] 
gh-93678: extract 'struct cfg_builder' from the compiler so that the CFG can be manipulated directly (GH-95107)

3 years agogh-95259: add test for traceback with angle-bracketed filename (GH-95260)
Irit Katriel [Tue, 26 Jul 2022 13:34:46 +0000 (14:34 +0100)] 
gh-95259: add test for traceback with angle-bracketed filename (GH-95260)

3 years agogh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails (GH-95264)
Noam Cohen [Tue, 26 Jul 2022 11:34:15 +0000 (14:34 +0300)] 
gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails (GH-95264)

3 years agogh-95066: ast: Replace assert with ValueError (GH-95072)
Shantanu [Tue, 26 Jul 2022 09:43:09 +0000 (02:43 -0700)] 
gh-95066: ast: Replace assert with ValueError (GH-95072)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agogh-95174: Handle missing dup() and constants in WASI (GH-95229)
Christian Heimes [Tue, 26 Jul 2022 09:16:51 +0000 (11:16 +0200)] 
gh-95174: Handle missing dup() and constants in WASI (GH-95229)

- check for ``dup()`` libc function
- handle missing ``F_DUPFD`` in ``dup2()`` replacement function
- add workaround for WASI libc bug in MSG_TRUNC
- ESHUTDOWN is missing, use EPIPE instead
- POLLPRI is missing, define as 0 (no-op)

3 years agogh-95205: Improve WASM README.md (GH-95267)
Christian Heimes [Tue, 26 Jul 2022 09:12:42 +0000 (11:12 +0200)] 
gh-95205: Improve WASM README.md (GH-95267)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agoStatistics inv_cdf sync with corresponding random module normal distributions (#95265)
Raymond Hettinger [Tue, 26 Jul 2022 07:23:33 +0000 (02:23 -0500)] 
Statistics inv_cdf sync with corresponding random module normal distributions (#95265)

3 years agoClarifying the documentation on library/syslog (GH-92587)
Nicolas Haller [Tue, 26 Jul 2022 07:06:06 +0000 (03:06 -0400)] 
Clarifying the documentation on library/syslog (GH-92587)

3 years agogh-95235: Add explicit parameter list to some sqlite3 methods (#95240)
Erlend Egeberg Aasland [Tue, 26 Jul 2022 06:29:18 +0000 (08:29 +0200)] 
gh-95235: Add explicit parameter list to some sqlite3 methods (#95240)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-95041: Fix several minor issues in syslog.openlog() (GH-95058)
Serhiy Storchaka [Tue, 26 Jul 2022 06:12:10 +0000 (09:12 +0300)] 
gh-95041: Fix several minor issues in syslog.openlog() (GH-95058)

* syslog_get_argv() swallows exceptions, but not in all cases.
* if ident is non UTF-8 encodable, syslog.openlog() fails after setting the
  global reference to ident. Now the C string saved internally in the previous
  call to openlog() points to the freed memory.
* PySys_Audit() can crash if ident is NULL.
* There may be a race condition with syslog.syslog(), because the global
  reference to ident is decrefed before setting the new value.
* Possible use of freed memory if syslog.openlog() is called while
  the GIL is released in syslog.syslog().

3 years agogh-91247: Use memcpy for list and tuple repeat (#91482)
Pieter Eendebak [Tue, 26 Jul 2022 02:10:23 +0000 (04:10 +0200)] 
gh-91247: Use memcpy for list and tuple repeat (#91482)

* Add _Py_memory_repeat function to pycore_list

* Add _Py_RefcntAdd function to pycore_object

* Use the new functions in tuplerepeat, list_repeat, and list_inplace_repeat

3 years agoGH-92678: Expose managed dict clear and visit functions (#95246)
Mark Shannon [Mon, 25 Jul 2022 21:30:53 +0000 (22:30 +0100)] 
GH-92678: Expose managed dict clear and visit functions (#95246)

3 years agogh-94673: Always Finalize Static Builtin Types (#95153)
Eric Snow [Mon, 25 Jul 2022 20:23:41 +0000 (14:23 -0600)] 
gh-94673: Always Finalize Static Builtin Types (#95153)

Static builtin types are finalized by calling _PyStaticType_Dealloc().  Before this change, we were skipping finalizing such a type if it still had subtypes (i.e. its tp_subclasses hadn't been cleared yet).  The problem is that types hold several heap objects, which leak if we skip the type's finalization.  This change addresses that.

For context, there's an old comment (from e9e3eab0b86) that says the following:

   // If a type still has subtypes, it cannot be deallocated.
   // A subtype can inherit attributes and methods of its parent type,
   // and a type must no longer be used once it's deallocated.

However, it isn't clear that is actually still true.  Clearing tp_dict should mean it isn't a problem.

Furthermore, the only subtypes that might still be around come from extension modules that didn't clean them up when unloaded (i.e. extensions that do not implement multi-phase initialization, AKA PEP 489).  Those objects are already leaking, so this change doesn't change anything in that regard.  Instead, this change means more objects gets cleaned up that before.

3 years agogh-85454: Remove distutils.ccompiler from Tools/c-analyzer (GH-95171)
Dong-hee Na [Mon, 25 Jul 2022 19:10:30 +0000 (04:10 +0900)] 
gh-85454: Remove distutils.ccompiler from Tools/c-analyzer (GH-95171)

3 years agogh-94673: Add _PyStaticType_InitBuiltin() (#95152)
Eric Snow [Mon, 25 Jul 2022 18:47:31 +0000 (12:47 -0600)] 
gh-94673: Add _PyStaticType_InitBuiltin() (#95152)

This is the first of several precursors to storing tp_subclasses (and tp_weaklist) on the interpreter state for static builtin types.

We do the following:

* add `_PyStaticType_InitBuiltin()`
* add `_Py_TPFLAGS_STATIC_BUILTIN`
* set it on all static builtin types in `_PyStaticType_InitBuiltin()`
* shuffle some code around to be able to use _PyStaticType_InitBuiltin()
    * rename `_PyStructSequence_InitType()` to `_PyStructSequence_InitBuiltinWithFlags()`
    * add `_PyStructSequence_InitBuiltin()`.

3 years agogh-92546: Move pprint benchmark into pyperformance (GH-94613)
Oleg Iarygin [Mon, 25 Jul 2022 18:30:13 +0000 (21:30 +0300)] 
gh-92546: Move pprint benchmark into pyperformance (GH-94613)

This PR couples with https://github.com/python/pyperformance/pull/222 and supersedes https://github.com/python/cpython/pull/92560. Inspired by https://github.com/python/cpython/issues/93096#issuecomment-1134576471.

Automerge-Triggered-By: GH:ericsnowcurrently
3 years agogh-95077: [Enum] add code-based deprecation warnings for member.member access (GH...
Ethan Furman [Mon, 25 Jul 2022 18:05:10 +0000 (11:05 -0700)] 
gh-95077: [Enum] add code-based deprecation warnings for member.member access (GH-95083)

* issue deprecation warning for member.member access
* always store member property in current class
* remove __getattr__

3 years agoGH-94851: check refcnt of immortal objects after finalization (GH-95001)
Kumar Aditya [Mon, 25 Jul 2022 17:43:59 +0000 (23:13 +0530)] 
GH-94851: check refcnt of immortal objects after finalization (GH-95001)

3 years agogh-95235: Document undocumented parameters in sqlite3 functions and methods (#95236)
Erlend Egeberg Aasland [Mon, 25 Jul 2022 16:46:55 +0000 (18:46 +0200)] 
gh-95235: Document undocumented parameters in sqlite3 functions and methods (#95236)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-93963: Document importlib.abc deprecations (#94546)
Hugo van Kemenade [Mon, 25 Jul 2022 16:24:42 +0000 (19:24 +0300)] 
gh-93963: Document importlib.abc deprecations (#94546)

3 years agogh-93610: Improve docs for importlib.resources (#93611)
Petr Viktorin [Mon, 25 Jul 2022 16:16:17 +0000 (18:16 +0200)] 
gh-93610: Improve docs for importlib.resources (#93611)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years agogh-85454: Remove distutils documentation (#95239)
Christian Heimes [Mon, 25 Jul 2022 13:50:46 +0000 (15:50 +0200)] 
gh-85454: Remove distutils documentation (#95239)

Most places now refer to setuptools or link to setuptools documentation.
Some examples like zipapp need to be updated later.

3 years agogh-85454: Remove links from historical mentions of distutils (GH-95192)
Oleg Iarygin [Mon, 25 Jul 2022 10:20:09 +0000 (13:20 +0300)] 
gh-85454: Remove links from historical mentions of distutils (GH-95192)

3 years agogh-95233: Correct grp.getgrgid parameter name in documentation (gid -> id) (gh-95232)
Adam Dangoor [Mon, 25 Jul 2022 09:54:42 +0000 (11:54 +0200)] 
gh-95233: Correct grp.getgrgid parameter name in documentation (gid -> id) (gh-95232)

3 years agogh-95205: Improve wasm README (#95206)
Erlend Egeberg Aasland [Mon, 25 Jul 2022 07:42:50 +0000 (09:42 +0200)] 
gh-95205: Improve wasm README (#95206)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-95087: Fix IndexError in parsing invalid date in the email module (GH-95201)
Serhiy Storchaka [Mon, 25 Jul 2022 06:17:25 +0000 (09:17 +0300)] 
gh-95087: Fix IndexError in parsing invalid date in the email module (GH-95201)

Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>