From 6665115679e77ff823ed400fd7276ae5991cc823 Mon Sep 17 00:00:00 2001 From: Guo Ci Date: Sat, 7 Feb 2026 13:02:01 -0500 Subject: [PATCH 1/3] gh-84116: Add missing backslash to `_SubParsersAction.add_parser` signature (#144572) --- Doc/library/argparse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 81e5d3470c3e57..60411b0a0c9748 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1896,7 +1896,7 @@ Subcommands the main parser. -.. method:: _SubParsersAction.add_parser(name, *, help=None, aliases=None, +.. method:: _SubParsersAction.add_parser(name, *, help=None, aliases=None, \ deprecated=False, **kwargs) Create and return a new :class:`ArgumentParser` object for the From 934997218e55714003276a70090a710cb3beeb61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:36:42 +0100 Subject: [PATCH 2/3] gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (#144568) --- Doc/library/secrets.rst | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/Doc/library/secrets.rst b/Doc/library/secrets.rst index e828a3fba22276..997d1f32cccd75 100644 --- a/Doc/library/secrets.rst +++ b/Doc/library/secrets.rst @@ -62,39 +62,44 @@ The :mod:`!secrets` module provides functions for generating secure tokens, suitable for applications such as password resets, hard-to-guess URLs, and similar. -.. function:: token_bytes([nbytes=None]) +.. function:: token_bytes(nbytes=None) Return a random byte string containing *nbytes* number of bytes. - If *nbytes* is ``None`` or not supplied, a reasonable default is - used. + + If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY` + is used instead. .. doctest:: - >>> token_bytes(16) #doctest:+SKIP + >>> token_bytes(16) # doctest: +SKIP b'\xebr\x17D*t\xae\xd4\xe3S\xb6\xe2\xebP1\x8b' -.. function:: token_hex([nbytes=None]) +.. function:: token_hex(nbytes=None) Return a random text string, in hexadecimal. The string has *nbytes* - random bytes, each byte converted to two hex digits. If *nbytes* is - ``None`` or not supplied, a reasonable default is used. + random bytes, each byte converted to two hex digits. + + If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY` + is used instead. .. doctest:: - >>> token_hex(16) #doctest:+SKIP + >>> token_hex(16) # doctest: +SKIP 'f9bf78b9a18ce6d46a0cd2b0b86df9da' -.. function:: token_urlsafe([nbytes=None]) +.. function:: token_urlsafe(nbytes=None) Return a random URL-safe text string, containing *nbytes* random bytes. The text is Base64 encoded, so on average each byte results - in approximately 1.3 characters. If *nbytes* is ``None`` or not - supplied, a reasonable default is used. + in approximately 1.3 characters. + + If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY` + is used instead. .. doctest:: - >>> token_urlsafe(16) #doctest:+SKIP + >>> token_urlsafe(16) # doctest: +SKIP 'Drmhze6EPcv0fN_81Bj-nA' @@ -115,11 +120,13 @@ argument to the various ``token_*`` functions. That argument is taken as the number of bytes of randomness to use. Otherwise, if no argument is provided, or if the argument is ``None``, -the ``token_*`` functions will use a reasonable default instead. +the ``token_*`` functions uses :const:`DEFAULT_ENTROPY` instead. -.. note:: +.. data:: DEFAULT_ENTROPY + + Default number of bytes of randomness used by the ``token_*`` functions. - That default is subject to change at any time, including during + The exact value is subject to change at any time, including during maintenance releases. From e682141c495c2e52368c4341ae54eea041070356 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 7 Feb 2026 15:14:18 -0800 Subject: [PATCH 3/3] Bump pre-commit hooks (#144576) --- .pre-commit-config.yaml | 12 ++++++------ Tools/jit/_llvm.py | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed88e9ca81b49c..1dcb50e31d9a68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.0 hooks: - id: ruff-check name: Run Ruff (lint) on Apple/ @@ -52,14 +52,14 @@ repos: files: ^Tools/wasm/ - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black name: Run Black on Tools/jit/ files: ^Tools/jit/ - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.5 + rev: v1.5.6 hooks: - id: remove-tabs types: [python] @@ -83,19 +83,19 @@ repos: files: '^\.github/CODEOWNERS|\.(gram)$' - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.36.0 + rev: 0.36.1 hooks: - id: check-dependabot - id: check-github-workflows - id: check-readthedocs - repo: https://github.com/rhysd/actionlint - rev: v1.7.9 + rev: v1.7.10 hooks: - id: actionlint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.19.0 + rev: v1.22.0 hooks: - id: zizmor diff --git a/Tools/jit/_llvm.py b/Tools/jit/_llvm.py index 0b9cb5192f1b75..8b68c1e8636af7 100644 --- a/Tools/jit/_llvm.py +++ b/Tools/jit/_llvm.py @@ -10,7 +10,6 @@ import _targets - _LLVM_VERSION = "21" _EXTERNALS_LLVM_TAG = "llvm-21.1.4.0"