Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to import typing at python 3.7 runtime #1050

sean-ahn opened this issue Jan 21, 2019 · 1 comment


None yet
2 participants
Copy link

commented Jan 21, 2019


chalice fails when trying to import a typing module at python 3.7 runtime.

CloudWatch Logs

[ERROR] AttributeError: type object 'Callable' has no attribute '_abc_registry'
Traceback (most recent call last):
  File "/var/lang/lib/python3.7/", line 234, in load_module
    return load_source(name, filename, file)
  File "/var/lang/lib/python3.7/", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/task/", line 4, in <module>
    from typing import Optional
  File "/var/task/", line 1347, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "/var/task/", line 1003, in __new__
    self._abc_registry = extra._abc_registry


This issue is known to occur when importing a backport instead of the stdlib typing module in python 3.7. (Reference: python typing module)

typing is in the standard library since 3.5.


Ignore typing at install_requires when python_version is 3.7 (or both of 3.7 and 3.6).

(References: alexa-skills-kit-sdk-for-python, zulip-terminal)


This comment has been minimized.

Copy link

commented Jan 28, 2019

Closing since the PR was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.