From 0892e54a638e674bf0773290832179f4e65bef5a Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Tue, 1 Jun 2021 17:42:39 -0400 Subject: [PATCH] Comment out sections of typing.py that don't work They will be fixed later. --- Lib/typing.py | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/Lib/typing.py b/Lib/typing.py index bc476438e..caa61289b 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -73,13 +73,13 @@ __all__ = [ # Structural checks, a.k.a. protocols. 'Reversible', - 'SupportsAbs', + # 'SupportsAbs', # TODO: RUSTPYTHON 'SupportsBytes', 'SupportsComplex', 'SupportsFloat', 'SupportsIndex', 'SupportsInt', - 'SupportsRound', + # 'SupportsRound', # TODO: RUSTPYTHON # Concrete collection types. 'ChainMap', @@ -1570,24 +1570,26 @@ class SupportsIndex(Protocol): pass -@runtime_checkable -class SupportsAbs(Protocol[T_co]): - """An ABC with one abstract method __abs__ that is covariant in its return type.""" - __slots__ = () - - @abstractmethod - def __abs__(self) -> T_co: - pass - - -@runtime_checkable -class SupportsRound(Protocol[T_co]): - """An ABC with one abstract method __round__ that is covariant in its return type.""" - __slots__ = () - - @abstractmethod - def __round__(self, ndigits: int = 0) -> T_co: - pass +# TODO: RUSTPYTHON, sort out the method resolution order nonsense +# +# @runtime_checkable +# class SupportsAbs(Protocol[T_co]): +# """An ABC with one abstract method __abs__ that is covariant in its return type.""" +# __slots__ = () +# +# @abstractmethod +# def __abs__(self) -> T_co: +# pass +# +# +# @runtime_checkable +# class SupportsRound(Protocol[T_co]): +# """An ABC with one abstract method __round__ that is covariant in its return type.""" +# __slots__ = () +# +# @abstractmethod +# def __round__(self, ndigits: int = 0) -> T_co: +# pass def _make_nmtuple(name, types):