Skip to content

Broken import when using Python 3.7 #64

@davebrown-exit107

Description

@davebrown-exit107

When attempting to use this package on Python 3.7, an error occurs:

(gremlin-python)[davebrown@codes gremlin-python]$ make test
python3 -m tests.test_all
Traceback (most recent call last):
  File "/home/davebrown/.pyenv/versions/3.7.10/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/davebrown/.pyenv/versions/3.7.10/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/davebrown/code/wk/gremlin-python/tests/test_all.py", line 7, in <module>
    from .test_httpclient import TestHttpClient
  File "/home/davebrown/code/wk/gremlin-python/tests/test_httpclient.py", line 9, in <module>
    from gremlinapi.config import GremlinAPIConfig as config
  File "/home/davebrown/code/wk/gremlin-python/gremlinapi/__init__.py", line 14, in <module>
    from gremlinapi.attack_helpers import (
  File "/home/davebrown/code/wk/gremlin-python/gremlinapi/attack_helpers.py", line 15, in <module>
    from typing import Type, Optional, Union, Dict, TypedDict, Any, Pattern
ImportError: cannot import name 'TypedDict' from 'typing' (/home/davebrown/.pyenv/versions/3.7.10/lib/python3.7/typing.py)
make: *** [Makefile:17: test] Error 1

It seems to be an easy fix, updating the import of TypedDict from typing-extensions instad of typing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions