Files
RustPython/stdlib
Daniel Watkins 9dce9bf0b9 correctly set __module__ and __name__ for builtin exceptions
In CPython's PyErr_NewException[0], the dotted "module.name" passed in is
split on that dot: the content before the dot is set as __module__ in
the created exception class, and the content after it is set as
__name__.

This commit mirrors that behaviour, by introducing a `module` argument
to `PyContext.new_class`: if Some("module_name") is passed, it will be
set as `__module__`.  All exception-creating uses of `new_class` are
updated to pass in their module and class names separately.

[0] https://github.com/python/cpython/blob/main/Python/errors.c#L1082-L1087
2021-11-02 18:28:02 -04:00
..
2021-10-01 01:54:04 +09:00
2021-10-30 19:42:35 -05:00