From 38be5ce3dd9d816b18741dd0c9e3ef4ec04b34cb Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 5 Feb 2026 15:34:59 +0200 Subject: [PATCH 1/2] gh-74955: Document that __all__ must contain strings in normalization form NFKC --- Doc/reference/simple_stmts.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 643ca106548367..b366f74a8789ba 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -831,7 +831,9 @@ where the :keyword:`import` statement occurs. The *public names* defined by a module are determined by checking the module's namespace for a variable named ``__all__``; if defined, it must be a sequence -of strings which are names defined or imported by that module. The names +of strings which are names defined or imported by that module. +Names containing non-ASCII characters must be in the `normalization form`_ +NFKC; see :ref:`lexical-names-nonascii` for details. The names given in ``__all__`` are all considered public and are required to exist. If ``__all__`` is not defined, the set of public names includes all names found in the module's namespace which do not begin with an underscore character From f28b1670aae88ca6593e73c49a3aed9a92af5d45 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 5 Feb 2026 15:54:07 +0200 Subject: [PATCH 2/2] Fix an external link. --- Doc/reference/simple_stmts.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index b366f74a8789ba..36b30c9b16b0db 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -867,6 +867,8 @@ determine dynamically the modules to be loaded. .. audit-event:: import module,filename,sys.path,sys.meta_path,sys.path_hooks import +.. _normalization form: https://www.unicode.org/reports/tr15/#Norm_Forms + .. _future: Future statements