| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
downstream (GH-124810) (#124817)
gh-124309: Revert eager task factory fix to prevent breaking downstream (GH-124810)
* Revert "GH-124639: add back loop param to staggered_race (GH-124700)"
This reverts commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7.
* Revert "gh-124309: Modernize the `staggered_race` implementation to support eager task factories (GH-124390)"
This reverts commit de929f353c413459834a2a37b2d9b0240673d874.
(cherry picked from commit 133e929a791d209b578b4822a7a07f4570b3803b)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
| |
immortal interned strings. (gh-124541)" (#124814)
Revert "[3.12] gh-116510: Fix a crash due to shared immortal interned strings. (gh-124541)"
This reverts commit 5dd07ebc0c27e2fffdfd041401c8cc7f0cda0dfc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.12] Docs: Update and proofread `library/venv.rst` (GH-124121)
(cherry picked from commit 23e812b84ae688a56a1011ed69a0d178c70e35ea)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Remove 3.13 docs
---------
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-124591) (#124660)
Docs: for for/else clarify that return or raise also skip the else (GH-124591)
(cherry picked from commit 5329d1b74a86b3a22ff36f7976bfe720ee06d10d)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-123231) (#124527)
gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231)
(cherry picked from commit 828583a7855f15edc96e6721c226ace098ba463b)
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
gh-116810: fix memory leak in ssl module (GH-123249)
Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the :attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and write access to said property by no longer unnecessarily cloning session objects via serialization.
(cherry picked from commit 7e7223e18f58ec48fb36a68fb75b5c5b7a45042a)
Co-authored-by: Jeffrey R. Van Voorst <jeff.vanvoorst@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
| |
|
|
|
|
| |
Doc: Run HTML and non-HTML daily builds separately (GH-124493)
(cherry picked from commit cce1125574f7b74343afda4bd0030706f67e13df)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
| |
(cherry picked from commit 23fb9f0777b054526b3b32f58e60b2a03132bf45)
|
| |
|
| |
Co-authored-by: Ned Deily <nad@python.org>
|
| |
|
|
|
|
| |
Docs: improve generic `typing.NamedTuple` example (GH-124739)
(cherry picked from commit 76fbee642e78eacf3866102f31e0ac969b57f1e6)
Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
parent parser and subparsers in argparse (GH-124631) (GH-124759)
Check for ambiguous options if the option is consumed, not when it is
parsed.
(cherry picked from commit 3f27153e077d7e9448e2f081275931968b40cc74)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
dict (GH-124667) (GH-124758)
It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.
(cherry picked from commit 95e92ef6c74e973ea13d15180190d0fa2af82fbf)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-124578) (GH-124756)
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e2993e584610851ac004c8b0599b323)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
argparse (GH-124428) (GH-124754)
(cherry picked from commit 61180446eee2aef07b042c7e8892c45afabd1499)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-124519) (GH-124752)
type() no longer called for SUPPRESS.
This only affects positional arguments with nargs='?'.
(cherry picked from commit 9bcadf589ab6f7b9d309290de7a80156b6905d35)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-124340) (GH-124750)
(cherry picked from commit 49e105f9488de18d3d92948232fcbd956cbe0c6e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
GH-124639: add back loop param to staggered_race (GH-124700)
(cherry picked from commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
- Move "versionchanged" notes that apply to the whole class to the
end of the class docs
- Remove or move notes next to the method list that apply to individual
methods.
- Mark up parameters using the appropriate syntax
- Do not capitalize "boolean"
- Shorten some text
(cherry picked from commit c976d789a98047ae7ddec6d13c9ea7086d9fa3f9)
|
| |
|
|
|
|
|
|
|
|
|
| |
Doc: Fix default ``latex_elements['papersize']`` (GH-124525)
https://www.sphinx-doc.org/en/master/latex.htmlGH-the-latex-elements-configuration-setting
It should be 'letterpaper' or 'a4paper' not 'letter' or 'a4'
(not to be confused with PAPER env variable).
(cherry picked from commit fae5058ec13aa3b4f1acc549fadfbbbc2628f1e9)
Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
|
| |
|
|
|
|
| |
type hints (GH-116544) (#124711)
Co-authored-by: Matt Delengowski <matt.delengowski@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH-121903, GH-122303) (#123065)
This backports several PRs for gh-113993, making interned strings mortal so they can be garbage-collected when no longer needed.
* Allow interned strings to be mortal, and fix related issues (GH-120520)
* Add an InternalDocs file describing how interning should work and how to use it.
* Add internal functions to *explicitly* request what kind of interning is done:
- `_PyUnicode_InternMortal`
- `_PyUnicode_InternImmortal`
- `_PyUnicode_InternStatic`
* Switch uses of `PyUnicode_InternInPlace` to those.
* Disallow using `_Py_SetImmortal` on strings directly.
You should use `_PyUnicode_InternImmortal` instead:
- Strings should be interned before immortalization, otherwise you're possibly
interning a immortalizing copy.
- `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to
`SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in
backports, as they are now part of public API and version-specific ABI.
* Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery.
Make sure the statically allocated string singletons are unique. This means these sets are now disjoint:
- `_Py_ID`
- `_Py_STR` (including the empty string)
- one-character latin-1 singletons
Now, when you intern a singleton, that exact singleton will be interned.
* Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic).
* Intern `_Py_STR` singletons at startup.
* Beef up the tests. Cover internal details (marked with `@cpython_only`).
* Add lots of assertions
* Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364)
* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs
* Document immortality in some functions that take `const char *`
This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.
Always point out a non-immortalizing alternative.
* Don't immortalize user-provided attr names in _ctypes
* Immortalize names in code objects to avoid crash (GH-121903)
* Intern latin-1 one-byte strings at startup (GH-122303)
There are some 3.12-specific changes, mainly to allow statically allocated strings in deepfreeze. (In 3.13, deepfreeze switched to the general `_Py_ID`/`_Py_STR`.)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
| |
(cherry picked from commit 09aebb1fbc0c1d771d4942844d5e2077fcdf56c9)
|
| |
|
| |
gh-124487: Update Windows API version to Windows 8.1
|
| |
|
|
|
|
|
|
| |
(GH-121329) (#124508)
gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329)
(cherry picked from commit 38a887dc3ec52c4a7222279bf4b3ca2431b86de9)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
|
| |
(gh-124679)
gh-89683: add tests for `deepcopy` on frozen dataclasses (gh-123098)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(#124662)
(cherry picked from commit b79a21ea429844e84509430e636d808ea9cff244)
Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
|
| |
|
|
|
|
|
| |
(#124655)
(cherry picked from commit 08e1bbe4a329e5961716f030c6ccfe92c736bf28)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(gh-124541)
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.
|
| |
|
|
|
| |
Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules. Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter shutdown.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-115528: Update language reference for PEP 646 (GH-121181)
To recap: the objective is to make starred expressions valid in `subscription`,
which is used for generics: `Generic[...]`, `list[...]`, etc.
What _is_ gramatically valid in such contexts? Seemingly any of the following.
(At least, none of the following throw `SyntaxError` in a 3.12.3 REPL.)
Generic[x]
Generic[*x]
Generic[*x, y]
Generic[y, *x]
Generic[x := 1]
Generic[x := 1, y := 2]
So introducting
flexible_expression: expression | assignment_expression | starred_item
end then switching `subscription` to use `flexible_expression` sorts that.
But then we need to field `yield` - for which any of the following are
apparently valid:
yield x
yield x,
yield x, y
yield *x,
yield *x, *y
Introducing a separate `yield_list` is the simplest way I've been figure out to
do this - separating out the special case of `starred_item ,`.
(cherry picked from commit 7d3497f617edf77cb6ead6f5e62bce98d77b9ab8)
Co-authored-by: Matthew Rahtz <matthew.rahtz@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
| |
delegation (GH-124617) (#124625)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
| |
(cherry picked from commit fb6bd31cb74d2f7e7b525ee4fe9f45475fc94ce9)
Co-authored-by: Zachary Ware <zach@python.org>
Co-authored-by: Marc Culler <culler@users.noreply.github.com>
|
| |
|
|
|
|
| |
Doc: Use the short version for daily downloads (GH-124602)
(cherry picked from commit 2c472d36b776636fb00881a717f69e43672588b1)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
`type_params=()` (GH-124499) (#124604)
gh-124498: Fix `TypeAliasType` not to be generic, when `type_params=()` (GH-124499)
(cherry picked from commit abe5f799e6ce1d177f79554f1b84d348b6141045)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(GH-123561) (#124597)
gh-123560: Correct docs for "empty" format type for floats (GH-123561)
(cherry picked from commit 274d9ab619b8150a613275835234ea9ef935f21f)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
| |
|
|
|
|
| |
gh-124234: Improve docs for `Mock.reset_mock` (GH-124237)
(cherry picked from commit 19fed6cf6eb51044fd0c02c6338259e2dd7fd462)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
| |
``shutil.which()`` (GH-124494) (#124576)
|
| |
|
|
|
|
| |
Using a standard library class makes this test difficult to maintain
as other tests and other parts of the stdlib may create subclasses,
which may still be alive when this test runs depending on GC timing.
(cherry picked from commit 08a467b537b3d9b499d060697e79b3950374ab0f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
e… (#124574)
gh-124309: Modernize the `staggered_race` implementation to support eager task factories (#124390)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
(cherry picked from commit de929f353c413459834a2a37b2d9b0240673d874)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
| |
(cherry picked from commit ffdc80e93d9d947531fa0123e5b392c6f1fd9136)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
|
|
| |
(#124562)
Closes GH-123242. The real criterion is that the attribute does not
exist on heap types, but I don't think we should discuss heap vs.
static types in the language reference.
(cherry picked from commit 99b23c64de301c9e77add6b0d8e60118ef807840)
|
| |
|
|
| |
section of the data model docs (#124480) (#124558)
|
| |
|
|
|
|
|
|
| |
filenames (GH-124489) (#124535)
Doc: Use ``major.minor`` for documentation distribution archive filenames (GH-124489)
(cherry picked from commit 6318ffcba21f8fc155f5558237ab03aa45f0e174)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#123957)
gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837)
We don't want to add another API, since the recipe is straightforward and rarely needed.
The advantage is that we could backport this to the earliest Python version that has taskgroups (3.11, alas in security mode already, so we'll just do 3.12 and 3.13).
(cherry picked from commit ef05801ba0cbf090034df17e2a0420fb42c2d538)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
ArgumentParser.add_subparsers() (GH-27667) (GH-124505)
Call _() on literal strings only.
(cherry picked from commit d3c76dff444046504754a437dceebc9a9c87ef18)
Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
attributes (GH-123483) (#124501)
gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483)
(cherry picked from commit 8447c933da308939b06e33544ca9abc9fc46aa8b)
Co-authored-by: Mat S <mscull@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
version (GH-124482)
(cherry picked from commit 54dd77fb8c880d7655fffab934978e277b4275fe)
Authored-by: Zachary Ware <zach@python.org>
|
| |
|
|
|
|
| |
(#124011)
|