From 16919e21936179e53df2f376c8b59b5fc44bd2dd Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 15 Jan 2021 09:22:52 -0500 Subject: [PATCH] Fix for Python 3.9+. Fixes . Based on an idea in https://github.com/ilevkivskyi/typing_inspect/issues/60#issuecomment-683187584. --- typing_inspect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typing_inspect.py b/typing_inspect.py index 1ca68ed..31d05ee 100644 --- a/typing_inspect.py +++ b/typing_inspect.py @@ -21,7 +21,7 @@ LEGACY_TYPING = False if NEW_TYPING: from typing import ( - Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, ForwardRef + Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, _SpecialGenericAlias, ForwardRef ) from typing_extensions import Literal else: @@ -75,7 +75,7 @@ def is_generic_type(tp): """ if NEW_TYPING: return (isinstance(tp, type) and issubclass(tp, Generic) or - isinstance(tp, _GenericAlias) and + (isinstance(tp, _GenericAlias) or isinstance(tp, _SpecialGenericAlias)) and tp.__origin__ not in (Union, tuple, ClassVar, collections.abc.Callable)) return (isinstance(tp, GenericMeta) and not isinstance(tp, (CallableMeta, TupleMeta))) -- 2.29.2 39b'>commitdiff
AgeCommit message (Expand)Author
2019-04-26installer: Take 'guix system init' exit code into account....This allows the installer to distinguish success from failure, and also ensures the shell that runs 'guix system init' exits upon completion. * gnu/installer/utils.scm (run-shell-command)[pause]: New procedure. Add "exec" before COMMAND in the script. Guard 'invoke' call and handle 'invoke-error?'. Add call to 'pause' on completion. * gnu/installer/final.scm (install-system): Remove 'false-if-exception'. Ludovic Courtès
2019-04-23installer: Run 'guix system init' with the right locale....* gnu/installer/utils.scm (run-shell-command): Add #:locale and honor it. * gnu/installer/newt/final.scm (run-install-shell): Add 'locale' parameter; pass it to 'install-system'. (run-final-page): Obtain locale from RESULT; pass it to 'run-install-shell'. * gnu/installer/final.scm (install-system): Add 'locale' parameter; pass it to 'run-shell-command'. Ludovic Courtès
2019-01-17installer: Add new utils....* gnu/installer/utils.scm (nearest-exact-integer): New exported procedure, (read-percentage): ditto, (run-shell-command): ditto. Mathieu Othacehe
2019-01-17gnu: Add graphical installer support....* configure.ac: Require that guile-newt is available. * gnu/installer.scm: New file. * gnu/installer/aux-files/logo.txt: New file. * gnu/installer/build-installer.scm: New file. * gnu/installer/connman.scm: New file. * gnu/installer/keymap.scm: New file. * gnu/installer/locale.scm: New file. * gnu/installer/newt.scm: New file. * gnu/installer/newt/ethernet.scm: New file. * gnu/installer/newt/hostname.scm: New file. * gnu/installer/newt/keymap.scm: New file. * gnu/installer/newt/locale.scm: New file. * gnu/installer/newt/menu.scm: New file. * gnu/installer/newt/network.scm: New file. * gnu/installer/newt/page.scm: New file. * gnu/installer/newt/timezone.scm: New file. * gnu/installer/newt/user.scm: New file. * gnu/installer/newt/utils.scm: New file. * gnu/installer/newt/welcome.scm: New file. * gnu/installer/newt/wifi.scm: New file. * gnu/installer/steps.scm: New file. * gnu/installer/timezone.scm: New file. * gnu/installer/utils.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add previous files. * gnu/system.scm: Export %root-account. * gnu/system/install.scm (%installation-services): Use kmscon instead of linux VT for all tty. (installation-os)[users]: Add the graphical installer as shell of the root account. [packages]: Add font related packages. * po/guix/POTFILES.in: Add installer files. Mathieu Othacehe