Files
RustPython/stdlib/src
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
2021-10-01 01:54:04 +09:00
2021-10-11 16:10:01 +09:00
2021-10-21 19:56:20 +03:00
2021-10-11 01:05:38 +09:00
2021-10-21 18:04:13 +09:00
2021-10-12 01:22:36 +09:00
2021-10-01 01:54:04 +09:00
2021-10-12 01:22:36 +09:00
2021-10-22 10:17:28 +03:00
2021-10-12 01:22:36 +09:00
2021-10-06 20:15:13 +09:00