From cbe18349dff744035a5f92a31dace8f351c4d4ad 2013-11-13 20:45:14 From: Thomas Kluyver Date: 2013-11-13 20:45:14 Subject: [PATCH] Hide dynamically defined metaclass base from Sphinx. The inheritance diagram extension in Sphinx 1.2 stores class references, which Sphinx then tries to pickle. This chokes on our dynamically defined base classes from the with_metaclass function. Starting the name with an underscore makes Sphinx ignore the class. (Bug obscurity/fix simplicity) ratio is high. --- diff --git a/IPython/utils/py3compat.py b/IPython/utils/py3compat.py index 7719a79..edd7b7d 100644 --- a/IPython/utils/py3compat.py +++ b/IPython/utils/py3compat.py @@ -239,4 +239,4 @@ else: def with_metaclass(meta, *bases): """Create a base class with a metaclass.""" - return meta("NewBase", bases, {}) + return meta("_NewBase", bases, {})