New submission from Andrew Yurisich <andrew.yuris...@nbx.com>:
I wanted to return a namedtuple from a concrete implementation of an importlib.abc.Loader base class, and wasn't able to provide a __spec__ property on the underlying class behind the namedtuple. All return values from importlib.abc.Loader#create_module need to have a __spec__ property set. Similar to the namedtuple optional argument 'module', I'd like to be able to pass in a 'spec', and add this value to result.__spec__ before returning the final result. ---------- components: Library (Lib) messages: 348124 nosy: Andrew Yurisich priority: normal severity: normal status: open title: namedtuple integration for importlib.abc.Loader type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37623> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com