Issue #10859: Make `contextlib.GeneratorContextManager` officially
private by renaming it to `_GeneratorContextManager`.
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index e37fde8..4633cff 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -17,7 +17,7 @@
return inner
-class GeneratorContextManager(ContextDecorator):
+class _GeneratorContextManager(ContextDecorator):
"""Helper for @contextmanager decorator."""
def __init__(self, gen):
@@ -92,7 +92,7 @@
"""
@wraps(func)
def helper(*args, **kwds):
- return GeneratorContextManager(func(*args, **kwds))
+ return _GeneratorContextManager(func(*args, **kwds))
return helper