Closed WidAmi closed 2 years ago
I forgot to put typing_extensions
in setup.py
; this only affects versions of Python prior to 3.8. Theoretically all you should have to do is run pip install typing_extensions
in your environment and it should fix itself. The updated setup.py
will be in version 0.9.7
.
It looks like splitter.py needs an edit to handle finding Literal either in typing
or typing_extensions
.
Stack Overflow suggests:
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
Should be fixed as of 1.0.0
.
I get the following error trying to import draftsman. This is on Mac OS using Python 3.7. Draftsman version 0.9.6
ImportError: cannot import name 'Literal' from 'typing' (/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py)
I can work around this with this but I'm not sure that's a completely compatible fix. Most fixes on the web put something similar into the library itself.