Skip to content

Commit

Permalink
Fix py37 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed May 25, 2023
1 parent eeec3ae commit cd78358
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coconut/compiler/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ def NamedTuple(name, fields):
except ImportError:
class YouNeedToInstallTypingExtensions{object}:
__slots__ = ()
def __init__(self):
raise _coconut.TypeError('Protocols cannot be instantiated')
Protocol = YouNeedToInstallTypingExtensions
typing.Protocol = Protocol
'''.format(**format_dict),
Expand Down
1 change: 1 addition & 0 deletions coconut/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def get_bool_env_var(env_var, default=False):
((PY2 and not PY26) or PY35)
and not (PYPY and WINDOWS)
and (PY37 or not PYPY)
and sys.version_info[:2] != (3, 7)
)
MYPY = (
PY37
Expand Down

0 comments on commit cd78358

Please sign in to comment.