[IPython-dev] Metaclasses in traitlets and PEP 487

Thomas Kluyver takowl at gmail.com
Mon Feb 15 09:47:33 EST 2016


On 15 February 2016 at 14:29, Martin Teichmann <lkb.teichmann at gmail.com>
wrote:

> This is currently the point of discussion. My current assumption is that
> larger projects (like IPython) will certainly want to maintain backwards
> compatibility, and are typically hesitant to add new dependencies.
>
> The backport on PyPI will just be one short file which tries to import the
> new classes in the standard library, and will fall back to an own
> implementation.
> One way would then be to add this PyPI package as a dependency to
> IPython. Another way would be to simply add that simple file to IPython,
> then we have either the backwards compatibility or the compatibility
> with other projects (if we did find the standard library classes), but not
> both.
>

I think we'd be OK with adding a small, pure-Python dependency like that.
It seems a bit silly to make a standardised metaclass to facilitate
multiple inheritance, and then make independent incompatible copies of it!

> You also mentioned situations in which you want to have compatibility
with C++ extension metaclasses. Those will only be compatible once our new
metaclass makes it into the interpreter proper. That will still take some
time, though.
Gotcha. I can still see the advantage of reducing the likelihood that
someone else will need that kind of craziness, though.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20160215/190ef97a/attachment.html>


More information about the IPython-dev mailing list