Skip to content

Commit 61bd0b1

Browse files
committed
Remove a codepath meant for 3.7.
(We no longer support it.)
1 parent 69fc7b4 commit 61bd0b1

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

jsonschema/protocols.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,14 @@
88
from __future__ import annotations
99

1010
from collections.abc import Mapping
11-
from typing import TYPE_CHECKING, Any, ClassVar, Iterable
12-
import sys
13-
14-
# doing these imports with `try ... except ImportError` doesn't pass mypy
15-
# checking because mypy sees `typing._SpecialForm` and
16-
# `typing_extensions._SpecialForm` as incompatible
17-
#
18-
# see:
19-
# https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
20-
# https://github.com/python/mypy/issues/4427
21-
if sys.version_info >= (3, 8):
22-
from typing import Protocol, runtime_checkable
23-
else:
24-
from typing_extensions import Protocol, runtime_checkable
11+
from typing import (
12+
TYPE_CHECKING,
13+
Any,
14+
ClassVar,
15+
Iterable,
16+
Protocol,
17+
runtime_checkable,
18+
)
2519

2620
# in order for Sphinx to resolve references accurately from type annotations,
2721
# it needs to see names like `jsonschema.TypeChecker`

0 commit comments

Comments
 (0)