From 0010889f6291c74e2dc84692c5514614dd05dd95 Mon Sep 17 00:00:00 2001 From: guoci Date: Wed, 29 Oct 2025 12:40:19 -0400 Subject: [PATCH 1/4] add `enum.show_flag_values` to `enum.__all__` --- Lib/enum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/enum.py b/Lib/enum.py index 936bcea0619e7d..c6ea7ee3f7644f 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,7 +10,7 @@ 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_str', 'global_enum', 'EnumCheck', 'CONTINUOUS', 'NAMED_FLAGS', 'UNIQUE', - 'pickle_by_global_name', 'pickle_by_enum_name', + 'pickle_by_global_name', 'pickle_by_enum_name', 'show_flag_values', ] From 2413ca556802538b8b924438d8fe7fe91510fbd7 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 16:53:05 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst diff --git a/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst b/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst new file mode 100644 index 00000000000000..4b4d2df2eb7752 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst @@ -0,0 +1 @@ +Add :func:`enum.show_flag_values` to ``enum.__all__``. From 0c30a27c8d6179bcc438fcedf9f3ecfe6a97de95 Mon Sep 17 00:00:00 2001 From: guoci Date: Thu, 30 Oct 2025 09:59:05 -0400 Subject: [PATCH 3/4] Add both `bin` and `show_flag_values` to `__all__` --- Lib/enum.py | 1 + Lib/test/test_enum.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/enum.py b/Lib/enum.py index c6ea7ee3f7644f..ad782b8c41e160 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -11,6 +11,7 @@ 'global_flag_repr', 'global_enum_repr', 'global_str', 'global_enum', 'EnumCheck', 'CONTINUOUS', 'NAMED_FLAGS', 'UNIQUE', 'pickle_by_global_name', 'pickle_by_enum_name', 'show_flag_values', + 'bin', ] diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 7e509be0994248..66d78980c41cb6 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -5324,7 +5324,7 @@ def __new__(cls, value, label): class MiscTestCase(unittest.TestCase): def test__all__(self): - support.check__all__(self, enum, not_exported={'bin', 'show_flag_values'}) + support.check__all__(self, enum) @cpython_only def test_lazy_import(self): From 9f99b245df325d2fb5366c96f5a7abc8cfb1cb6d Mon Sep 17 00:00:00 2001 From: Guo Ci Date: Thu, 30 Oct 2025 10:10:12 -0400 Subject: [PATCH 4/4] Update Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst Co-authored-by: Alex Waygood --- .../next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst b/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst index 4b4d2df2eb7752..fce8dd33757aae 100644 --- a/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst +++ b/Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst @@ -1 +1 @@ -Add :func:`enum.show_flag_values` to ``enum.__all__``. +Add :func:`enum.show_flag_values` and ``enum.bin`` to ``enum.__all__``.