]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-140766: [Enum] add `show_flag_values` and `bin` to `enum.__all__` (GH-140765)
authorGuo Ci <zguoci@gmail.com>
Thu, 30 Oct 2025 17:32:55 +0000 (13:32 -0400)
committerGitHub <noreply@github.com>
Thu, 30 Oct 2025 17:32:55 +0000 (10:32 -0700)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2025-10-29-16-53-00.gh-issue-140766.CNagKF.rst [new file with mode: 0644]

index 936bcea0619e7dbea9b512a745d85700f27e70ba..ad782b8c41e1607616bea8e9a54bc650c746d38d 100644 (file)
@@ -10,7 +10,8 @@ __all__ = [
         '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',
+        'bin',
         ]
 
 
index 7e509be099424885b5692f891fe55a9522b5ff5f..66d78980c41cb68d82883a3760125239f1680bfd 100644 (file)
@@ -5324,7 +5324,7 @@ class TestStdLib(unittest.TestCase):
 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):
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 (file)
index 0000000..fce8dd3
--- /dev/null
@@ -0,0 +1 @@
+Add :func:`enum.show_flag_values` and ``enum.bin`` to ``enum.__all__``.