ask/mode

Missing import: typing_extensions

austinnichols101 opened this issue · 4 comments

Versions 4.1.4 through 4.1.6 are missing an import statement for typing_extensions. The problem was introduced with commit 3d15d1e.

Here is an example of a Faust 1.8.1 application running under python 3.7.3 with mode 4.1.6 demonstrating the error:

Start the faust worker...
Traceback (most recent call last):
  File "/usr/local/bin/faust", line 5, in <module>
    from faust.cli.faust import cli
  File "/usr/local/lib/python3.7/dist-packages/faust/cli/__init__.py", line 2, in <module>
    from .base import AppCommand, Command, argument, call_command, option
  File "/usr/local/lib/python3.7/dist-packages/faust/cli/base.py", line 34, in <module>
    from mode import Service, ServiceT, Worker
  File "/usr/local/lib/python3.7/dist-packages/mode/__init__.py", line 127, in __getattr__
    object_origins[name], None, None, [name])
  File "/usr/local/lib/python3.7/dist-packages/mode/services.py", line 31, in <module>
    from .timers import timer_intervals
  File "/usr/local/lib/python3.7/dist-packages/mode/timers.py", line 5, in <module>
    from .utils.logging import get_logger
  File "/usr/local/lib/python3.7/dist-packages/mode/utils/logging.py", line 48, in <module>
    from typing_extensions import Protocol
ModuleNotFoundError: No module named 'typing_extensions'

We get the same error under Python 3.8.0.
Changing the line to:
from typing import Protocol
fixes the issue under Python 3.8.0.

typing_extensions was introduced in this commit: 3d15d1e#diff-05f65f01868242771df4df44cae4d67eR47

We use faust and our build just broke due to this undeclared dependency.

ask commented

Oops! Somehow I thought this was the same as mypy_extensions.
Fixed now, will publish a new version 4.1.7

thanks for the speedy resolution!