gh-81325: Support path-like objects with streaming TarFile (GH-137188)
(cherry picked from commit 3ec3d05345)
Co-authored-by: Alexander Urieles <aeurielesn@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
gh-136520: Clarify docs for _pack_ & _align_ (GH-137036)
Move docs to the reference section & reduce the “tutorial” part to a quick intro & link.
Clarify what values are accepted.
Add macro/attribute equivalents.
Discourage _align_ values that aren't powers of two.
(cherry picked from commit 8943bb722f)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-137273: Fix debug assertion failure in locale.setlocale() on Windows (GH-137300)
It happened when there were at least 16 characters after dot in the
locale name.
(cherry picked from commit 718e0c89ba)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-138779: Use the dev_t converter for st_rdev (GH-138780)
This allows to support device numbers larger than 2**63-1.
(cherry picked from commit 43013f72f0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit db53ca30d7)
Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
fix comment reference from man 7 signal to man 7 signal-safety (GH-138554)
(cherry picked from commit 2f5ace780b)
docs: fix comment reference from man 7 signal to man 7 signal-safety
Co-authored-by: mqudah <mohghq@gmail.com>
gh-129368: In PyRun C API docs, clarify what a "start token" is (GH-129935)
(cherry picked from commit e1eca8b308)
Co-authored-by: Rajhans Jadhao <rajhans.jadhao@gmail.com>
Unify documentation for all backends, enumerate all not implemented mapping
methods, document particularities of implemented mapping methods.
(cherry picked from commit 8700404f86)
gh-135944: Add a "Runtime Components" Section to the Execution Model Docs (gh-135945)
The section provides a brief overview of the Python runtime's execution environment. It is meant to be implementation agnostic,
(cherry picked from commit 46a1f0a9ff)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
gh-133467: fix data race in `type_set_name` (GH-137302)
Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading.
(cherry picked from commit e99bc7fd44)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-135729: Store reference to globals in `Interpreter._decref` (GH-139104)
(cherry picked from commit 571210b8f3)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
gh-137025: Include ``python.worker.mjs`` in the Emscripten Web Example (GH-137236)
(cherry picked from commit d5191ba99b)
Co-authored-by: adam j hartz <hz@mit.edu>
gh-137390: Add missing line continuation character in configure.ac (GH-137391)
(cherry picked from commit 001461a292)
Co-authored-by: markmcclain <markmcclain@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
gh-131885: Use positional-only markers for ``max()`` and ``min()`` (GH-131868)
(cherry picked from commit dd079db4b9)
Co-authored-by: Evan Kohilas <ekohilas@users.noreply.github.com>
gh-135629: rewrite language reference section on except* to improve clarity (GH-136150)
(cherry picked from commit a651ec9524)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
gh-139436: Remove ``dist-pdf`` from the docs archives rebuild target (GH-139437)
(cherry picked from commit 0e2cdd313b)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Call backtrace() once when installing the signal handler to ensure that
libgcc is dynamically loaded outside the signal handler.
This fixes a "signal-unsafe call inside of a signal" TSan error from
test_faulthandler.test_enable_fd.
(cherry picked from commit 11a8652e25)
Co-authored-by: Sam Gross <colesbury@gmail.com>
gh-135444: fix `asyncio.DatagramTransport.sendto` to account for datagram header size when data cannot be sent (GH-135445)
(cherry picked from commit e3ea861351)
Co-authored-by: Justin Bronder <jsbronder@cold-front.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
(cherry picked from commit 81268a3e2a)
Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
A runtime check is needed to support cross-compiling.
Remove the _Py_NORMALIZE_CENTURY macro.
Remove _pydatetime.py's _can_support_c99.
(cherry picked from commit 719e5c3f71)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-136823: Update documentation on excluded headers in Python.h (GH-136824)
(cherry picked from commit c2428ca9ea)
Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
gh-136516: Mention installation artifacts as de-facto resources (GH-136419)
Files like NUL on windows are, from `importlib.resources` point of
view, an artifact caused by installing to a filesystem directory.
Mention these.
(cherry picked from commit fac4964fdb)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-139698: Fix typo in What's New 3.14 (GH-139699)
(cherry picked from commit d396a32b3d)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
There were a few thread-safety issues when profiling or tracing all
threads via PyEval_SetProfileAllThreads or PyEval_SetTraceAllThreads:
* The loop over thread states could crash if a thread exits concurrently
(in both the free threading and default build)
* The modification of `c_profilefunc` and `c_tracefunc` wasn't
thread-safe on the free threading build.
(cherry picked from commit a10152f8fd)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>