Skip to content

Commit

Permalink
drop python<=3.7 support
Browse files Browse the repository at this point in the history
According to https://endoflife.date/python python 3.7 has been
EOSed 27 Jun 2023.
Filter all code over `pyupgracde --py38-plus`.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
  • Loading branch information
kloczek committed Aug 20, 2024
1 parent d8faa05 commit cedbb8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
8 changes: 2 additions & 6 deletions tests/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,8 @@ async def test_recv_json_cancelled(push_pull):
obj = dict(a=5)
await a.send_json(obj)
# CancelledError change in 3.8 https://bugs.python.org/issue32528
if sys.version_info < (3, 8):
with pytest.raises(CancelledError):
recvd = await f
else:
with pytest.raises(asyncio.exceptions.CancelledError):
recvd = await f
with pytest.raises(asyncio.exceptions.CancelledError):
recvd = await f
assert f.done()
# give it a chance to incorrectly consume the event
events = await b.poll(timeout=5)
Expand Down
17 changes: 1 addition & 16 deletions zmq/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,7 @@
import sys
from typing import Any, Dict

if sys.version_info >= (3, 8):
from typing import Literal, TypedDict
else:
# avoid runtime dependency on typing_extensions on py37
try:
from typing_extensions import Literal, TypedDict # type: ignore
except ImportError:

class _Literal:
def __getitem__(self, key):
return Any

Literal = _Literal() # type: ignore

class TypedDict(Dict): # type: ignore
pass
from typing import Literal, TypedDict


if sys.version_info >= (3, 10):
Expand Down

0 comments on commit cedbb8a

Please sign in to comment.