konradhalas / dacite

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

Adding support for typing_extensions Literal #101

Closed camerongraybill closed 2 years ago

Akuli commented 4 years ago

What if both typing.Literal and typing_extensions.Literal are available (e.g. typing_extensions.Literal used on Python 3.8)? Then I think this should work with both of them?

Edit: nevermind

Python 3.8.0 (default, Oct 21 2019, 20:27:53) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import typing, typing_extensions
>>> typing.Literal is typing_extensions.Literal
True