diff --git a/src/betterproto/enum.py b/src/betterproto/enum.py index 5302d45c4..f5f14dccb 100644 --- a/src/betterproto/enum.py +++ b/src/betterproto/enum.py @@ -1,6 +1,5 @@ from __future__ import annotations -import sys from enum import ( EnumMeta, IntEnum, @@ -90,15 +89,8 @@ def __call__(cls, value: int) -> Enum: def __iter__(cls) -> Generator[Enum, None, None]: yield from cls._member_map_.values() - if sys.version_info >= (3, 8): # 3.8 added __reversed__ to dict_values - - def __reversed__(cls) -> Generator[Enum, None, None]: - yield from reversed(cls._member_map_.values()) - - else: - - def __reversed__(cls) -> Generator[Enum, None, None]: - yield from reversed(tuple(cls._member_map_.values())) + def __reversed__(cls) -> Generator[Enum, None, None]: + yield from reversed(cls._member_map_.values()) def __getitem__(cls, key: str) -> Enum: return cls._member_map_[key] diff --git a/tests/grpc/test_grpclib_client.py b/tests/grpc/test_grpclib_client.py index 10254f0fe..f64351c71 100644 --- a/tests/grpc/test_grpclib_client.py +++ b/tests/grpc/test_grpclib_client.py @@ -1,5 +1,4 @@ import asyncio -import sys import uuid import grpclib @@ -91,9 +90,6 @@ async def test_trailer_only_error_stream_unary( @pytest.mark.asyncio -@pytest.mark.skipif( - sys.version_info < (3, 8), reason="async mock spy does works for python3.8+" -) async def test_service_call_mutable_defaults(mocker): async with ChannelFor([ThingService()]) as channel: client = ThingServiceClient(channel)