Skip to content

observer.py imports typing.Protocol which is not in Python 3.7 #369

@yhay81

Description

@yhay81

I got an error when I run tox
E ImportError: cannot import name 'Protocol' from 'typing' (/Users/yhay81/.pyenv/versions/3.7.9/lib/python3.7/typing.py)

It is because observer.py import typing.Progocol and typing.Progocol is new in Python version 3.8.
https://docs.python.org/3/library/typing.html#typing.Protocol
(It is from #345)

I think this is one of a solution.

  • Drop testing 3.7 in tox.
  • Write notation comment in observer.py which says it is new feature of 3.8

I can make PR if this is okay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions