| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
| |
(GH-127557)
(cherry picked from commit 35d37d6592d1be71ea76042165f6cbfa6c4c3a17)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
| |
PyInterpreterState Field (gh-127114)
This approach eliminates the originally reported race. It also gets rid of the deadlock reported in gh-96071, so we can remove the workaround added then.
This is mostly a cherry-pick of 1c0a104 (AKA gh-126989). The difference is we add PyInterpreterState.threads_preallocated at the end of PyInterpreterState, instead of adding PyInterpreterState.threads.preallocated. That avoids ABI disruption.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
the language reference (GH-126720) (#126885)
Docs: Miscellaneous corrections to simple statements in the language reference (GH-126720)
* Replace: The :keyword:`global` -> The :keyword:`global` statement
Add :keyword: when it's needed
* Replace repeated links with duoble backticks
(cherry picked from commit 94a7a4e22fb8f567090514785c69e65298acca42)
Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
|
| |
|
|
|
|
| |
gh-122838: Document missing opcodes (GH-123073)
(cherry picked from commit 9cba47d9f151734815a61e32391ea7fca877ea55)
Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#126334)
The CPython uses _Py_dg_dtoa(), which does rounding to nearest with half
to even tie-breaking rule.
If that functions is unavailable, PyOS_double_to_string() fallbacks to
system snprintf(). Since CPython 3.12, build requirements include C11
compiler *and* support for IEEE 754 floating point numbers (Annex F).
This means that FE_TONEAREST macro is available and, per default,
printf-like functions should use same rounding mode as _Py_dg_dtoa().
(cherry picked from commit 7d7d56d8b1147a6b85e1c09d01b164df7c5c4942)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
| |
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(#127496)
gh-127443: Fix some entries in `Doc/data/refcounts.dat` (GH-127451)
Fix incorrect entries in `Doc/data/refcounts.dat`
(cherry picked from commit 1f8267b85dda655282922ba20df90d0ac6bea634)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
| |
(GH-127357) (#127470)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
|
| |
|
| |
(cherry picked from commit 33ce8dcf791721fea563715f681dc1593a35b83b)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304)
---------
(cherry picked from commit dd3a87d2a8f8750978359a99de2c5cb2168351d1)
Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(#127423)
Link to correct class methods in asyncio primitives docs (GH-127270)
(cherry picked from commit 15d6506d175780bb29e5fcde654e3860408aa93e)
Co-authored-by: Ollanta Cuba Gyllensten <ollantaster@gmail.com>
|
| |
|
|
|
|
| |
fix param type in PyObject_HasAttrWithError (docs) (GH-127403)
(cherry picked from commit 3afb639f39e89888194d8e74cc498c8da3a58d8e)
Co-authored-by: biggus-developerus <74741815+biggus-developerus@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(#127334)
Fix indentation for contextlib.asynccontextmanager docs (GH-127333)
(cherry picked from commit 9328db7652677a23192cb51b0324a0fdbfa587c9)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
| |
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-127269)
(cherry picked from commit 26ff32b30553e1f7b0cc822835ad2da8890c180c)
Co-authored-by: funkyrailroad <funkyrailroad@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve `pathname2url()` and `url2pathname()` docs (GH-127125)
These functions have long sown confusion among Python developers. The
existing documentation says they deal with URL path components, but that
doesn't fit the evidence on Windows:
>>> pathname2url(r'C:\foo')
'///C:/foo'
>>> pathname2url(r'\\server\share')
'////server/share' # or '//server/share' as of quite recently
If these were URL path components, they would imply complete URLs like
`file://///C:/foo` and `file://////server/share`. Clearly this isn't right.
Yet the implementation in `nturl2path` is deliberate, and the
`url2pathname()` function correctly inverts it.
On non-Windows platforms, the behaviour until quite recently is to simply
quote/unquote the path without adding or removing any leading slashes. This
behaviour is compatible with *both* interpretations -- 1) the value is a
URL path component (existing docs), and 2) the value is everything
following `file:` (this commit)
The conclusion I draw is that these functions operate on everything after
the `file:` prefix, which may include an authority section. This is the
only explanation that fits both the Windows and non-Windows behaviour.
It's also a better match for the function names.
(cherry picked from commit 307c63358681d669ae39e5ecd814bded4a93443a)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 2bb7846cacb342246aada5ed92d323e54c946063)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
|
| |
|
|
|
|
|
|
| |
(GH-126934)
gh-126896: Fix docs about `asyncio.start_server()` (GH-126897)
(cherry picked from commit 0c5c80928c476ac0dcb9a053b15a562af899cfba)
Co-authored-by: beavailable <beavailable@proton.me>
|
| |
|
|
|
|
|
|
| |
(GH-126667) (#127201)
Doc: C API: Fix `Py_NewInterpreterFromConfig` example code (GH-126667)
(cherry picked from commit e3038e976b25a58f512d8c7083a752c89436eb0d)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
| |
Fix a few typos found in the docs (GH-127126)
(cherry picked from commit 39e60aeb3837f1f23d8b7f30d3b8d9faf805ef88)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-127035) (GH-127156)
* Name without a PATHEXT extension is only searched if the mode does not
include X_OK.
* Support multi-component PATHEXT extensions (e.g. ".foo.bar").
* Support files without extensions in PATHEXT contains dot-only extension
(".", "..", etc).
* Support PATHEXT extensions that end with a dot (e.g. ".foo.").
(cherry picked from commit 8899e85de100557899da05f0b37867a371a73800)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit fcfdb55465636afc256bc29781b283404d88e6ca)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
|
| |
|
|
|
| |
`ctypes` doc (GH-127099) (#127144)
(cherry picked from commit 3c770e3f0978d825c5ebea98fcd654660e7e135f)
|
| |
|
|
|
| |
It now returns multiple era description segments separated by semicolons.
Previously it only returned the first segment on platforms with Glibc.
(cherry picked from commit 4803cd0244847f286641c85591fda08b513cea52)
|
| |
|
|
|
|
|
|
| |
(GH-126536) (#127053)
Doc: C API: `PyThreadState::on_delete` was removed in v3.13 (GH-126536)
(cherry picked from commit 9bca3ef575a088d3330a2743e36423aa5f7bdad8)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
| |
(cherry picked from commit ce453e6c2ffda657d9d728ea6372121e8264418e)
Co-authored-by: Joseph Martinot-Lagarde <contrebasse@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
| |
(GH-126622) (#126709)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
| |
|
|
|
|
|
|
|
|
| |
to use with attacker controlled URLs (GH-126659) (#126888)
Added a warning to the urljoin docs, indicating that it is not safe to use with attacker controlled URLs (GH-126659)
This was flagged to me at a party today by someone who works in red-teaming as a frequently encountered footgun. Documenting the potentially unexpected behavior seemed like a good place to start.
(cherry picked from commit d6bcc154e93a0a20ab97187d3e8b726fffb14f8f)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compliance (GH-126182) (GH-126825)
gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance (GH-126182)
* gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance
This changes nothing changes for CPython supported platforms,
but hints how to deal with platforms that stick to the letter of
the spec.
It also marks `socket.getaddrinfo` as a wrapper around `getaddrinfo(3)`;
specifically, workarounds to make the function work consistently across
platforms are out of scope in its code.
Include wording similar to the POSIX's “by providing options and by
limiting the returned information”, which IMO suggests that the
hints limit the resulting list compared to the defaults, *but* can
be interpreted differently. Details are added in a note.
Specifically say that this wraps the underlying C function. So, the
details are in OS docs. The “full range of results” bit goes away.
Use `AF_UNSPEC` rather than zero for the *family* default, although
I don't think a system where it's nonzero would be very usable.
Suggest setting proto and/or type (with examples, as the appropriate
values aren't obvious). Say why you probably want to do that that
on all systems; mention the behavior on the “letter of the spec”
systems.
Suggest that the results should be tried in order, which is,
AFAIK best practice -- see RFC 6724 section 2, and its predecessor
from 2003 (which are specific to IP, but indicate how people use this):
> Well-behaved applications SHOULD iterate through the list of
> addresses returned from `getaddrinfo()` until they find a working address.
(cherry picked from commit ff0ef0a54bef26fc507fbf9b7a6009eb7d3f17f5)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-126769) (#126822)
Document that return-less user-defined functions return None (GH-126769)
(cherry picked from commit e0692f11650acb6c2eed940eb94650b4703c072e)
Co-authored-by: John Marshall <jmarshall@hey.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Doc: Recommend shlex.quote alongside pipes removal (GH-126570)
One of the most common reasons I see the old `pipes` module still in use
when porting to Python 3.13 is for the undocumented `pipes.quote`
function, which can easily be replaced with `shlex.quote`. I think it's
worth specifically calling this out, since being directed to the
`subprocess` module would be confusing in this case.
(cherry picked from commit 73e34b680852794d110cd806505b3d74d9d593db)
Co-authored-by: Colin Watson <cjwatson@debian.org>
|
| |
|
|
|
|
|
|
| |
(GH-126732) (#126818)
gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732)
(cherry picked from commit 6a93a1adbb56a64ec6d20e8aab911439998502c9)
Co-authored-by: Wulian <xiguawulian@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-124865) (gh-125709) (GH-125204)
* gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865)
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.
This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS
failures identified by gh-124785.
(cherry picked from commit f2cb39947093feda3ff85b8dc820922cc5e5f954)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-125286: Share the Main Refchain With Legacy Interpreters (gh-125709)
They used to be shared, before 3.12. Returning to sharing them resolves a failure on Py_TRACE_REFS builds.
---------
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 6e25eb15410f781f632d536d555f38879432522c)
Co-authored-by: 谭九鼎 <109224573@qq.com>
|
| |
|
|
|
|
| |
Add missing fullstop `.` to whatsnew/3.8.rst (GH-126553)
(cherry picked from commit 82269c7d580e1aad71ff11fe891cf7f97eb45703)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
documentation. (GH-126665) (#126670)
gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665)
(cherry picked from commit 25257d61cfccc3b4189f96390a5c4db73fd5302c)
Co-authored-by: vivodi <103735539+vivodi@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
the context of the 'bound' kw argument to TypeVar (GH-126584) (#126657)
(cherry picked from commit 434b29767f2fdef9f35c8e93303cf6aca4a66a80)
Co-authored-by: Pedro Fonini <fonini@protonmail.ch>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``--enable-experimental-jit`` option (GH-126648) (#126655)
gh-126647: `Doc/using/configure.rst`: Add an entry for ``--enable-experimental-jit`` option (GH-126648)
Add an entry for the ``--enable-experimental-jit`` option in ``Doc/using/configure.rst``.
This was added as an experimental option in CPython 3.13.
Possible values for it:
* `no` - don't build the JIT.
* `yes` - build the JIT.
* `yes-off` - build the JIT but disable it by default.
* `interpreter` - don't build the JIT but enable tier 2 interpreter instead.
(cherry picked from commit f435de6765e0327995850d719534be38c9b5ec49)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
(#126638)
Postpone `module.__loader__` deprecation to Python 3.16 (#126482)
(cherry picked from commit 450db61a78989c5a1f1106be01e071798c783cf9)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
| |
Windows has not accepted process handles in many releases.
(cherry picked from commit 75ffac296ef24758b7e5bd9316f32a8170ade37f)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(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 e3510bd3dd9ea8f2a30cb1128470aee3a48d8880)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 1fe67df8e373a5177143e4a310c83438e79f9b77)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
|
| |
(#126431)
Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418)
(cherry picked from commit 407c0366d9ccd2a36c6cc8bf92324856b16fd604)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
``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 d9602265479bcd96dc377d92a34556baf34ac3cd)
Co-authored-by: lit <litlighilit@foxmail.com>
|
| |
|
|
|
| |
(GH-126392) (#126403)
(cherry picked from commit eac41c5ddfadf52fbd84ee898ad56aedd5d90a41)
|
| |
|
|
|
|
|
|
| |
(GH-126396) (#126406)
Doc: Fix typo in documentation for ``MAKE_FUNCTION`` opcode (GH-126396)
(cherry picked from commit e5a4b402ae55f5eeeb44d3e7bc3f3ec39b249846)
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 0d80777981f95bbc79b146fc78b2189c82521ab9)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|