diff --git a/Lib/enum.py b/Lib/enum.py index 936bcea0619e7d..ad782b8c41e160 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,7 +10,8 @@ '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', ] 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): 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..fce8dd33757aae --- /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` and ``enum.bin`` to ``enum.__all__``.