Enforce typing_extensions >=4.7.0 on py37#15556
Conversation
JukkaL
left a comment
There was a problem hiding this comment.
Does this mean that we can compile on 3.7 while targeting typing_extensions <4.7.0, but the compiled module won't work with a more recent typing_extensions? It would be nicer if the generated code would work with different versions of typing_extensions, but that's likely not worth it since we'll drop 3.7 soon enough.
What about instead generating an error here from mypyc if typing_extensions is older than 4.7.0, with the suggestion to use a newer typing_extensions? Mypyc is considered experimental so we don't need to support older typing_extension versions here, I think. Or would this cause other problems?
Hmm, I suppose so. And yes, that doesn't sound good, agreed. I don't think it's essential for us to support older typing_extensions versions, but I don't much like the current state of affairs where we don't support older versions of typing_extensions on Python 3.7, but still claim to support them here: Line 225 in b995e16 |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
JukkaL
left a comment
There was a problem hiding this comment.
Thanks! This seems like a reasonable (temporary) workaround until we drop support for 3.7.
The changes made in #15543 mean that mypy's tests will no longer pass if you've got
typing_extensions<4.7installed and you're running on Python 3.7. But if we go with this solution instead, our tests will pass on Python 3.7 regardless of whether you havetyping_extensions==4.6.3ortyping_extensions==4.7.0installed. (I've verified this locally.)