konradhalas / dacite

Simple creation of data classes from dictionaries.
MIT License
1.76k stars 106 forks source link

types: add literal support for python 3.7 #93

Closed sinback closed 4 years ago

sinback commented 4 years ago

Another quite small change - we are stuck on python 3.7 right now, which must backport Literal from typing_extensions 😒

Add literal support for python 3.7 by importing the Literal from typing_extensions for python3.7.

konradhalas commented 4 years ago

Hi @sinback - thank you for this PR :)

But as I understand typing_extensions is an external module which I have to install from PyPI, am I right?

sinback commented 4 years ago

Ohhhhhh. We've had it so long on our project that I totally forgot, duh. :) When I have a moment later, I'll try to see if you can detect if a module is importable cleanly from within python. I'll close this PR for now though.