From 3dabd1f2e750db27b362d2997bd362a6340c90d7 Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Sun, 16 Feb 2020 15:57:55 -0600 Subject: [PATCH] Modify typing.py slightly for RustPython --- Lib/typing.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Lib/typing.py b/Lib/typing.py index f2b6aaf3a9..807cc61259 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -2390,8 +2390,9 @@ class io: BinaryIO = BinaryIO -io.__name__ = __name__ + '.io' -sys.modules[io.__name__] = io +# XXX RustPython TODO: editable type.__name__ +# io.__name__ = __name__ + '.io' +sys.modules[__name__ + '.io'] = io Pattern = _TypeAlias('Pattern', AnyStr, type(stdlib_re.compile('')), @@ -2408,5 +2409,6 @@ class re: Match = Match -re.__name__ = __name__ + '.re' -sys.modules[re.__name__] = re +# XXX RustPython TODO: editable type.__name__ +# re.__name__ = __name__ + '.re' +sys.modules[__name__ + '.re'] = re