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>
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>
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>
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>
[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>
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>
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)
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
[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>
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>
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>