[issue37623] namedtuple integration for importlib.abc.Loader
Andrew Yurisich
report at bugs.python.org
Thu Jul 18 15:07:23 EDT 2019
New submission from Andrew Yurisich <andrew.yurisich at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37623>
_______________________________________
More information about the Python-bugs-list
mailing list