Commit Graph

123403 Commits

Author SHA1 Message Date
Miss Islington (bot) 23468acac4
[3.13] gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566) (#126567)
gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566)
(cherry picked from commit 9ecd8f7f40)

Co-authored-by: Valery Fedorenko <federicovalenso@gmail.com>
2024-11-08 16:25:38 +05:30
Brett Cannon 9ecaee6a55
[3.13] GH-123877: make `wasm32-wasip1` the target triple for WASI (#126561) 2024-11-07 16:16:12 -08:00
Miss Islington (bot) 9ab3d31b66
[3.13] Doc: C API: Demote sections to subsections for consistency (GH-126535) (#126546)
Doc: C API: Demote sections to subsections for consistency (GH-126535)

The entire file should be a single section; the headings below the
first heading should be subsections.
(cherry picked from commit e3510bd3dd)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2024-11-07 15:35:41 +00:00
Miss Islington (bot) 29997c4fe5
[3.13] gh-48020: [docs] Remove the logging howto suggested future FileHandler multiprocessing support (GH-126531) (#126540)
gh-48020: [docs] Remove the logging howto suggested future FileHandler multiprocessing support (GH-126531)

Docs: Remove the logging howto potential promise of multiprocessing support in the future.

Stick to the facts and suggestions, don't provide hope where we're not going to
implement complexity that we'd rather the user implement themselves when
needed.
(cherry picked from commit 1fe67df8e3)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-11-07 10:03:58 +00:00
Miss Islington (bot) 3b05ef10c1
[3.13] gh-125679: multiprocessing Lock and RLock - fix invalid representation string on MacOSX. (GH-125680) (#126533)
gh-125679: multiprocessing Lock and RLock - fix invalid representation string on MacOSX. (GH-125680)
(cherry picked from commit 75f7cf91ec)

Co-authored-by: Duprat <yduprat@gmail.com>
2024-11-07 01:49:31 -08:00
Miss Islington (bot) 07a6aa3f8f
[3.13] gh-125631: Enable setting persistent_id and persistent_load of pickler and unpickler (GH-125752) (GH-126528)
pickle.Pickler.persistent_id and pickle.Unpickler.persistent_load can
again be overridden as instance attributes.
(cherry picked from commit 223d3dc554)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-11-07 07:21:23 +00:00
Miss Islington (bot) 59316a668e
[3.13] gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452) (#126518)
gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452)
(cherry picked from commit 5dc36dc565)

Co-authored-by: Stephen Morton <git@tungol.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-11-06 22:41:48 +00:00
Miss Islington (bot) 9e115b1015
[3.13] gh-126489: Do not call persistent_id() for a persistent id in Python pickle (GH-126490) (GH-126514)
(cherry picked from commit 8fa4dc4ba8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-11-06 22:54:48 +02:00
Miss Islington (bot) 83827ad819
[3.13] gh-126461: Fix _Unpickler_ReadFromFile() error handling (GH-126485) (#126495)
gh-126461: Fix _Unpickler_ReadFromFile() error handling (GH-126485)

Handle _Unpickler_SetStringInput() failure.
(cherry picked from commit a1c57bcfd2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-11-06 13:51:39 +00:00
Bénédikt Tran 6e9da38866
[3.13] gh-126313: Fix a crash in curses.napms() due to incorrect error handling (GH-126351) (#126493)
gh-126313: Fix a crash in curses.napms() due to incorrect error handling (GH-126351)
2024-11-06 14:33:23 +01:00
Miss Islington (bot) 6a084b9d60
[3.13] gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481) (#126486)
gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481)

Prevent creation of incomplete/invalid _ssl.SSLSocket objects when
created directly.
(cherry picked from commit b1c4ffc205)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-11-06 11:24:45 +00:00
Miss Islington (bot) 4f1584657f
[3.13] gh-122544: Change OS image in Azure pipeline to Ubuntu 24.04 (GH-125344) (#126479)
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-11-06 10:24:55 +00:00
Valery Fedorenko 8059351051
[3.13] Fix possible null pointer dereference of freevars in _PyCompile_LookupArg (gh-126238) (#126475)
[3.13] gh-126238: Fix possible null pointer dereference of freevars in _PyCompile_LookupArg (GH-126239)

* Replace Py_DECREF by Py_XDECREF

(cherry picked from commit 8525c9375f)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-11-06 08:10:04 +00:00
Miss Islington (bot) ba86632f7e
[3.13] gh-70764: inspect.getclosurevars now identifies global variables with LOAD_GLOBAL (GH-120143) (#126459)
gh-70764: inspect.getclosurevars now identifies global variables with LOAD_GLOBAL (GH-120143)
(cherry picked from commit 83ba8c2bba)

Co-authored-by: blhsing <blhsing@gmail.com>
2024-11-06 00:18:32 +00:00
Erlend E. Aasland 9dd3addc0c
[3.13] gh-89640: harden float word ordering (#125571 and #126387) (#126429)
Properly detect float word ordering on Linux (gh-125571)

autoconf-archive patch by Dan Amelang.

(cherry picked from commit 26d627779f)

Hardcode WASM float word ordering to little endian (gh-126387)

(cherry picked from commit 532fc08102)
2024-11-05 23:18:55 +01:00
Miss Islington (bot) 88e01318c2
gh-126074: Removes unnecessary DLLs from embeddable package (GH-126143)
(cherry picked from commit f51fd84034)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-11-05 21:08:44 +00:00
Miss Islington (bot) ffb44cd08c
[3.13] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126442)
gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426)

- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 75872605aa)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-11-05 12:48:18 +00:00
Alex Waygood c1e708ab07
[3.13] gh-126417: Register multiprocessing proxy types to an appropriate collections.abc class (#126419) (#126435)
Co-authored-by: Stephen Morton <github@tungol.org>
2024-11-05 11:22:44 +00:00
Miss Islington (bot) cba17e4d92
[3.13] Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418) (#126431)
Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418)
(cherry picked from commit 407c0366d9)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2024-11-05 15:31:16 +05:30
Miss Islington (bot) ce1a1a6021
[3.13] gh-126303: Fix pickling and copying of os.sched_param objects (GH-126336) (GH-126423)
(cherry picked from commit d3840503b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-11-05 06:50:33 +00:00
Miss Islington (bot) 05da4eea5a
[3.13] gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437) (#126421)
gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
(cherry picked from commit d960226547)

Co-authored-by: lit <litlighilit@foxmail.com>
2024-11-05 03:04:32 +00:00
Hugo van Kemenade cccc066241
[3.13] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (GH-126392) (#126403)
(cherry picked from commit eac41c5ddf)
2024-11-04 19:46:26 +02:00
Miss Islington (bot) 9e72a3f2e1
[3.13] Doc: Fix typo in documentation for ``MAKE_FUNCTION`` opcode (GH-126396) (#126406)
Doc: Fix typo in documentation for  ``MAKE_FUNCTION`` opcode (GH-126396)
(cherry picked from commit e5a4b402ae)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2024-11-04 17:35:12 +00:00
Miss Islington (bot) cddecf228a
[3.13] gh-125783: Add more tests to prevent regressions with the combination of ctypes and metaclasses. (GH-126126) (GH-126275)
gh-125783: Add more tests to prevent regressions with the combination of ctypes and metaclasses. (GH-126126)
(cherry picked from commit 6c67446a6e)

Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
2024-11-04 11:58:20 +01:00
Miss Islington (bot) 6245ee279d
[3.13] Docs: turn getopt examples into doctests (GH-126377) (#126385)
(cherry picked from commit 0d80777981)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-11-04 08:34:36 +00:00
Miss Islington (bot) d89d78bfdf
[3.13] gh-126165: Improve docs of function `math.isclose` (GH-126215) (#126380)
gh-126165: Improve docs of function `math.isclose` (GH-126215)
(cherry picked from commit 081706f873)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-11-04 04:14:05 +00:00
Miss Islington (bot) c095598599
[3.13] Docs: Delist sqlite3 deprecation from "Pending removal in 3.14" (GH-126370) (#126372)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-03 21:29:02 +00:00
Miss Islington (bot) 86d6c68d43
[3.13] gh-104400: Add more tests to pygettext (GH-108173) (GH-126361)
(cherry picked from commit dcae5cd6ab)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-11-03 14:30:16 +00:00
Miss Islington (bot) 7435127056
[3.13] gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101) (#126348)
gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101)

GH-113977, GH-120754: Remove unbounded reads from zipfile

Read without a size may read an unbounded amount of data + allocate
unbounded size buffers. Move to capped size reads to prevent potential
issues.

(cherry picked from commit 556dc9b8a7)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Daniel Hillier <daniel.hillier@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-11-03 05:59:00 +00:00
Donghee Na 36079f702a
[3.13] gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (gh-126322) (gh-126344)
* gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (#126322)

* Fix comprehensions comment to inlined by pep 709

* Update spacing

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>

* Add reference to PEP 709

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
(cherry picked from commit 868bfcc02e)

* Add space

---------

Co-authored-by: rimchoi <hyerimc858@gmail.com>
2024-11-03 04:10:15 +00:00
Miss Islington (bot) 2f7793196a
[3.13] gh-125761: Clarify repeated warning suppression criteria in warnings module (gh-126330)
(cherry picked from commit 10eeec2d4f)

Co-authored-by: 고병찬 <70642609+byungchanKo99@users.noreply.github.com>
2024-11-02 11:43:30 +00:00
Miss Islington (bot) 79ec946c16
[3.13] gh-125522: Remove bare except in test_zlib.test_flushes (gh-126321) (gh-126327)
gh-125522: Remove bare except in test_zlib.test_flushes (gh-126321)
(cherry picked from commit cfb1b2f0cb)

Co-authored-by: simple-is-great <103080930+simple-is-great@users.noreply.github.com>
2024-11-02 08:51:28 +00:00
Miss Islington (bot) f58d5ab881
[3.13] gh-126138: Fix use-after-free in `_asyncio.Task` by evil `__getattribute__` (GH-126305) (#126324)
gh-126138: Fix use-after-free in `_asyncio.Task` by evil `__getattribute__` (GH-126305)
(cherry picked from commit f032f6ba8f)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-11-02 08:09:18 +00:00
Miss Islington (bot) 6e4b7eadf5
[3.13] gh-125875: Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC (gh-126319) (gh-126320) 2024-11-02 05:16:24 +00:00
Miss Islington (bot) bdda85ec87
[3.13] docs: add a more precise example in enum doc (GH-121015) (#126306)
docs: add a more precise example in enum doc (GH-121015)

* docs: add a more precise example

Previous example used manual integer value assignment in class based declaration but in functional syntax has been used auto value assignment what could be confusing for the new users. Additionally documentation doesn't show how to declare new enum via functional syntax with usage of the manual value assignment.

* docs: remove whitespace characters

* refactor: change example

---------

(cherry picked from commit ff257c7843)

Co-authored-by: Filip "Ret2Me" Poplewski <37419029+Ret2Me@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-11-01 16:17:35 -07:00
Miss Islington (bot) f8a9a1ced1
[3.13] Doc: Add a single table as summary to math documentation (GH-125810) (GH-126308)
Doc: Add a single table as summary to math documentation (GH-125810)

* Summary for math module with separate tables

* Forgot remainder description

* Single table

* data instead of func

* Add arguments in the table

* Fix inconsistencies in pow documentation

* Remove full stops from the table



* Fix math.pow link

* Fix spacing

---------

(cherry picked from commit 74cf5967f3)

Co-authored-by: Joseph Martinot-Lagarde <contrebasse@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-01 16:11:40 -07:00
Miss Islington (bot) 1b9710c571
[3.13] gh-126220: Fix crash on calls to `_lsprof.Profiler` methods with 0 args (backportable) (GH-126271) (#126310)
gh-126220: Fix crash on calls to `_lsprof.Profiler` methods with 0 args (backportable) (GH-126271)
(cherry picked from commit 28b148fb32)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-11-01 22:24:06 +00:00
Miss Islington (bot) 5c04055082
[3.13] gh-122767: document "new style" formatting for complexes (GH-122848) (#126128)
gh-122767: document "new style" formatting for complexes (GH-122848)

(cherry picked from commit 0bbbe15f56)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-01 12:29:29 -07:00
Miss Islington (bot) 2e20a49cae
[3.13] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260) (#126265)
(cherry picked from commit 295262c8ec)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-11-01 07:23:11 +00:00
Miss Islington (bot) 256fc5529a
[3.13] gh-126256: Update time.rst to use the same clock as instead of the same clock than (GH-126257) (#126258)
gh-126256: Update time.rst to use the same clock as instead of the same clock than (GH-126257)

Update time.rst to use `the same clock as` instead of `the same clock than`

The time documentation uses the same clock than time.monotonic instead of the same clock as time.monotonic, which is grammatically false. This PR fixes changes two instances of `the same clock than` to `the same clock as`.
(cherry picked from commit d0abd0b826)

Co-authored-by: Alperen Keleş <alpkeles99@gmail.com>
2024-10-31 21:50:20 +00:00
Miss Islington (bot) abe64a3780
[3.13] gh-126080: fix UAF on `task->task_context` in `task_call_step_soon` due to an evil `loop.__getattribute__` (GH-126120) (#126250)
gh-126080: fix UAF on `task->task_context` in `task_call_step_soon` due to an evil `loop.__getattribute__` (GH-126120)
(cherry picked from commit 0e8665554b)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-31 19:32:47 +00:00
Miss Islington (bot) 588da2e26a
[3.13] GH-126205: Fix conversion of UNC paths to file URIs (GH-126208) (#126249)
GH-126205: Fix conversion of UNC paths to file URIs (GH-126208)

File URIs for Windows UNC paths should begin with two slashes, not four.
(cherry picked from commit 951cb2c369)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-10-31 16:58:56 +00:00
Miss Islington (bot) 80042384b4
[3.13] gh-126240: handle `NULL` returned by `_Py_asdl_expr_seq_new` (GH-126241) (#126243)
gh-126240: handle `NULL` returned by  `_Py_asdl_expr_seq_new` (GH-126241)

check return value of `_Py_asdl_expr_seq_new`
(cherry picked from commit 94639f6b71)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-31 14:57:11 +00:00
Miss Islington (bot) 89664d4d48
[3.13] gh-126223: Propagate unicode errors in `_interpreters.create()` (GH-126224) (#126242)
gh-126223: Propagate unicode errors in `_interpreters.create()` (GH-126224)
(cherry picked from commit 01415213d7)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-31 14:46:36 +00:00
Miss Islington (bot) ac00bf0e96
[3.13] gh-126083: Fix a reference leak in `asyncio.Task` when reinitializing with new non-`None` context (GH-126103) (#126229)
gh-126083: Fix a reference leak in `asyncio.Task` when reinitializing with new non-`None` context (GH-126103)
(cherry picked from commit d07dcce693)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
2024-10-31 08:14:00 +00:00
Miss Islington (bot) 57668a4be5
[3.13] gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warnings docs (GH-125823) (#126216)
gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warnings docs (GH-125823)

Change documentation
(cherry picked from commit d467d9246c)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2024-10-30 18:32:04 -07:00
Richard Hansen 2db2b5ea9c
[3.13] gh-124872: Refine contextvars documentation (GH-124773) (#125233)
[3.13] gh-124872: Refine contextvars documentation

  * Add definitions for "context", "current context", and "context
    management protocol".
  * Update related definitions to be consistent with the new
    definitions.
  * Restructure the documentation for the `contextvars.Context` class
    to prepare for adding context manager support, and for consistency
    with the definitions.
  * Use `testcode` and `testoutput` to test the `Context.run` example.

(cherry-picked from commit 99400930ac)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-30 20:48:02 +00:00
Miss Islington (bot) 5f4218418b
[3.13] Prefer "similar" over "equivalent" in tutorial (GH-125343) (GH-125372)
Prefer "similar" over "equivalent" in tutorial (GH-125343)

In the datastructures tutorial doc, some operations are described as
"equivalent to" others. This has led to some user-confusion -- at
least in the Discourse forums -- about cases in which the operations
differ.

This change doesn't systematically eliminate the word "equivalent"
from the tutorial. It just substitutes "similar to" in several cases
in which "equivalent to" could mislead users into expecting exact
equivalence.
(cherry picked from commit 4a2282b067)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
2024-10-30 13:33:20 -07:00
Miss Islington (bot) 9304416e7d
gh-125315: Avoid crashing in _wmimodule due to slow WMI calls on some Windows machines (GH-126141)
(cherry picked from commit 60c415bd53)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-10-30 20:26:14 +00:00
Miss Islington (bot) 00ff23f06d
[3.13] gh-60712: Include the "object" type in the lists of documented types (GH-103036) (GH-126197)
gh-60712: Include the "object" type in the lists of documented types (GH-103036)

* add test for the predefined object's attributes

* Include the "object" type in the lists of documented types

* remove 'or' from augment tuple

* 📜🤖 Added by blurb_it.

* Add cross-reference to news



* Fix format for the function parameter



* Add space



* add reference for the 'object'



* add reference for NotImplemented



* Change ref:`string <textseq>`  as class:`str`



* remove hyphen from `newly-created`

* Update Doc/reference/datamodel.rst

'dictionaries' to 'dict'



* Update predefined attribute types in testPredefinedAttrs

* Change `universal type` as `top type`

* Don't mention about the top type

* Update the description of richcmpfuncs

* Update Doc/library/stdtypes.rst



* Revert: Hierarchy Section in Data Model Documentation

* Revert to original explanations of __new__ and __init__ methods in datamodel.rst for improved clarity.

* Update Doc/reference/datamodel.rst



* Remove blank line



* Use ref:`str <textseq>` instead of :class:`str



* Revert changes the description of Other Built-in Types in stdtypes.rst

* Update Doc/reference/datamodel.rst



---------

(cherry picked from commit 4f826214b3)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-30 13:16:38 -07:00