Repository navigation
Add _collections_abc module - #4000
Conversation
|
Should we put the implementations here and make |
|
Personally, I'd like to do that to match runtime, but I don't think it matters either way |
|
Oh, right, this was a little mysterious to me, and seems to still be failing. The changes look fairly straightforward, so not sure what's going on. If I had to take a guess — I've seen some weird behaviour surrounding use of |
|
See my reply above, it is because of |
|
Playing around with pytype, I think it fixes the issue to add |
JelleZijlstra
left a comment
There was a problem hiding this comment.
This looks correct apart from the CI failure and merge conflict.
I think that this might result in mypy showing |
|
Sorry for the belated response - we noticed today that pytype seems to choke on re-importing a name without changing it (so |
Other type checkers rely on the actual value of __all__, so it is sometimes included in pyi files. pytype was crashing due to not knowing how to process an alias whose type was a literal list. Discovered while investigating why pytype failed on python/typeshed#4000. PiperOrigin-RevId: 331886378
Other type checkers rely on the actual value of __all__, so it is sometimes included in pyi files. pytype was crashing due to not knowing how to process an alias whose type was a literal list. Discovered while investigating why pytype failed on python/typeshed#4000. PiperOrigin-RevId: 331886378
Previously, we respected 'from typing import X as Y' but ignored 'from typing import X as X', with the effect that a second pyi that tried to import the re-exported name wouldn't parse due to a BadDependencyError. Found while investigating python/typeshed#4000. PiperOrigin-RevId: 332290196
|
It's a little hard to tell since the PR doesn't merge cleanly anymore, but I believe pytype 2020.09.24 fixes the pytype test failure. Let me know if you're still having issues. |
|
This has some pretty bad merge conflicts now, @CraftSpider do you want to fix them? I think this should be good to go once CI is green. |
|
I'll fix the merge conflicts as soon as I have the free time to |
I just included all items from both master and this branch into the stubtest whitelists. Our weekly script will sort it out.
I'm quite amused: The way typeshed does this, re-exporting from typing, is the reverse of how runtime does it