v2.0.7 breaks with Python <= 3.7
marc-etienne opened this issue · comments
Describe the bug
The following commit introduced a dependency on Python 3.8: b1cfe43.
typing.Protocol
is available only since Python 3.8 (see https://docs.python.org/3/library/typing.html#typing.Protocol)
However, censys-python package is marked as compatible with Python 3.6+.
To Reproduce
Steps to reproduce the behavior:
- Install censys-python
import censys.common.base
File "...\site-packages\censys\common\base.py", line 6, in <module>
from typing import Any, Callable, List, Optional, Protocol, Type
ImportError: cannot import name 'Protocol' from 'typing' (...\typing.pyc)
Expected behavior
No exceptions
Device (please complete the following information):
- OS [e.g. macOS]: Windows 10 (2004)
- Censys Python Version [e.g. 1.1.0]: 2.0.7
- Shell [e.g. bash, zsh]: cmd
- Python: 3.7.9
Hi @marc-etienne,
Thank you very much for reporting this issue. I have begun to add additional tests for Python 3.6 and have created an MR to resolve this issue by switching it to a Callable
.
Just following up, we have released v2.0.8
with above fixes to upgrade run pip install --upgrade censys
.
Thank you! That was fast 😄