From 2674c322c6cc5a81ce54d807c64cb0e221521786 Mon Sep 17 00:00:00 2001 From: Stelar <90330577+StelarDream@users.noreply.github.com> Date: Wed, 29 Apr 2026 01:50:53 +0200 Subject: [PATCH 1/2] gh-149119: docs: mention that sentinel does not support subclassing (#149120) Add note about sentinel objects not supporting subclassing Clarify that sentinel objects do not support subclassing. --- Doc/library/functions.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index aa99d198e436d5..06fd5cdc7be2a6 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1839,6 +1839,8 @@ are always available. They are listed here in alphabetical order. Sentinel objects are truthy and compare equal only to themselves. They are intended to be compared with the :keyword:`is` operator. + ``sentinel`` does not support subclassing. + Shallow and deep copies of a sentinel object return the object itself. Sentinels are conventionally assigned to a variable with a matching name. From d71e3bc5a0f2f7af407eb32a8a5b36acf66070aa Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 28 Apr 2026 18:59:48 -0700 Subject: [PATCH 2/2] gh-148829: bump number of static types (#149121) --- Include/internal/pycore_interp_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/pycore_interp_structs.h b/Include/internal/pycore_interp_structs.h index 01adadd1485189..fb810c82a5aa63 100644 --- a/Include/internal/pycore_interp_structs.h +++ b/Include/internal/pycore_interp_structs.h @@ -531,7 +531,7 @@ struct _py_func_state { /* For now we hard-code this to a value for which we are confident all the static builtin types will fit (for all builds). */ -#define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 202 +#define _Py_MAX_MANAGED_STATIC_BUILTIN_TYPES 203 #define _Py_MAX_MANAGED_STATIC_EXT_TYPES 10 #define _Py_MAX_MANAGED_STATIC_TYPES \ (_Py_MAX_MANAGED_STATIC_BUILTIN_TYPES + _Py_MAX_MANAGED_STATIC_EXT_TYPES)