gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)
(cherry picked from commit 945bf8ce1b)
Co-authored-by: Robsdedude <dev@rouvenbauer.de>
For `enum.bin`, update versionadded directive from 3.10 to 3.11 (GH-144574)
(cherry picked from commit d73634935c)
Co-authored-by: Guo Ci <zguoci@gmail.com>
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 934997218e)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449)
(cherry picked from commit 0e7c06a858)
Co-authored-by: kovan <xaum.io@gmail.com>
(cherry picked from commit 2fb9cde118)
Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.
(cherry picked from commit 67ddba9aa9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683)
Use getLogger() to get root logger in logging cookbook
(cherry picked from commit 53fecbe6e1)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
gh-143919: Reject control characters in http cookies
(cherry picked from commit 95746b3a13)
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
It does not support an ASCII string.
Also add more tests.
(cherry picked from commit 25a10b60b0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-141004: Mark up constants for `PyOS_double_to_string` (GH-143867)
This ensures they show up as C macros in search and the Sphinx inventory.
(cherry picked from commit fb690c38ca)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-141004: Mark up docs of old PyMem macros (GH-143783)
These had a docs-only deprecation notice since the first version of the docs in this repo. Nowadays we call things “soft deprecated” if there's just a note in the docs.
The deprecated directive needs a version, I went with the first one that had the notice (2.0; it's not in 1.6):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html
Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.
(cherry picked from commit a009e78b79)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-143774 - Improve IDLE Format Paragraph doc (GH-143775)
Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.
(Also fix a couple case errors in cross references.)
(cherry picked from commit fa3abf5a51)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Use more relevant terminology instead of "master"/"slave" widgets where possible.
(cherry picked from commit 813fc7a291)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
For vectorcall API, the underscore-prefixed provisional names
continue to be available per PEP 590:
https://peps.python.org/pep-0590/#finalizing-the-api
Use `versionadded`, `versionchanged`, and `:no-typesetting:`
to mark this up.
For PyCode API, use `:no-typesetting:` rather than `index::` so that
these are semantically documented as C functions.
(cherry picked from commit 7e8a1b5061)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Add a note to the readline module documentation stating that
Python 3.13 and later no longer supports readline in the default REPL,
as per gh-118840. Includes workaround using PYTHON_BASIC_REPL.
Update tutorial to remove the reference, and use a different key to
test things out.
(cherry picked from commit 971f387bbb)
Signed-off-by: Kuang Yu Heng <yuheng3107@gmail.com>
Co-authored-by: Kuang Yu Heng <yuheng3107@gmail.com>
Copy net new text in idle.rst from main to 3.13.
Make 3.13 docs and copy-strip idle.html to idlelib/help.html.
See https://github.com/python/cpython/issues/139707#issuecomment-3737374788
and PR #143718 message for more.
* Revert url to 'main' from '3.13'
The branch in the source links in the revised help.html
become '3.13' instead of 'main' because the html
was generated from an edited 3.13 version of idle.rst
instead being backported from main. This reversion
avoids the possibility of future backport merge conflicts.
The version makes no difference to the Help/IDLE doc display as
the url is currently neither displayed nor linked to the link title
-- 'Lib/idlelib'. If we do make the links live, we can use
sys.version_info to replace 'main' when main is no longer the source branch.
gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (GH-143288)
(cherry picked from commit a9ca49d9c6)
Co-authored-by: AN Long <aisk@users.noreply.github.com>