From 1fb0cf99cbda0e2d99af1883526f94d9fbc00cec Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Mon, 2 May 2016 15:03:03 +1000 Subject: [PATCH] Note ExitStack's new-style class requirement --- docs/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 71474a2..b25288b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -310,6 +310,10 @@ Functions and classes provided: foundation for higher level context managers that manipulate the exit stack in application specific ways. + Context managers used with :class:`ExitStack` must be new-style classes - + this is the default on Python 3, but requires explicitly inheriting from + :class:`object` or another new-style class in Python 2. + .. versionadded:: 0.4 Part of the standard library in Python 3.3 and later