Closed anntzer closed 2 years ago
Hm, it looks like some tests failed. Could you please fix them before I can merge this?
Looks like(?) the failure now arises because of the confusion between typing.Literal (the backport of typing) and typing_extension.Literal. Not sure what the best approach is here...
Hm that looks weird: the error messages are like typing_extensions.Literal != typing_extensions.Literal
. As a blind guess maybe you can try something "smarter" like returning tp.__origin__
instead of a plain Literal
?
I tried something along these lines (last commit), but no success...
Now fixed. There are some other failures, but they are unrelated to this PR (see e.g. #84).
It looks like there are two other failures because new pytest
doesn't support Python 3.5.0 and 3.5.1. Probably we can just stop testing those (so support will be best effort).
Could you please make a separate PR updating typing_extension requirement and test matrix for Python versions?
Or actually you mean the issue is still present even on latest typing_extensions
? If yes, we will need to investigate. (But you can still make a PR for not testing Python versions if you still have time for this.)
The failure of tests with Python 3.5.{0,1} is easy to fix so I did that at #85. There's another test failure revolving around TypedDict with python 3.9.12, for which I don't have a quick fix (but which, I'd argue, should not block this PR as it is also completely unrelated).
OK, I will merge this now, and will look at the remaining failure later.
See https://github.com/ilevkivskyi/typing_inspect/pull/39#issuecomment-907637313.