Eric Snow added the comment: (my browser farted the half finished report into existence :P )
The __eq__() implementation of the path-based loaders in importlib is just the stock one that compares object identity. So two that are effectively the same compare unequal. This has a material impact on ModuleSpec. ModuleSpec.__eq__() does a comparision of its various attributes, one of them being the loader. Thus most specs will compare unequal even though they are effectively equal. I recommend that we provide a better implementation for SourceFileLoader and friends. Larry: would such a feature addition be okay? ---------- nosy: +larry title: Path-based loaders lack a meaningful __eq__() implementation.ModuleSpec.__eq__() is highly sensitive to loader.__eq__() -> Path-based loaders lack a meaningful __eq__() implementation. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19927> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com