-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
update subprocess module stub for Python 3.5 #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update subprocess module stub for Python 3.5 #426
Conversation
I just realized that |
…ure/subprocess-update-py35 Conflicts: stdlib/3/subprocess.pyi
The tests now fail because of python/mypy#1168 (and related issues) 😒, but otherwise this should be good to go. |
Not so fast with the blame. sys.version_info checks now work, and mypy only
analyzes one side. If you're still getting this error you either are using
a version check that mypy doesn't recognize, or you have some other kind of
error that causes mypy to consider multiple variants. So please look at
your code some more.
|
Is this fixed on mypy |
It's fixed in mypy master, but there's not going to be a release for On Fri, Aug 5, 2016 at 3:13 PM, jdelic [email protected] wrote:
--Guido van Rossum (python.org/~guido) |
whoops :). I will look at my code some more. |
... aaaand fixed. |
Can you merge again from upstream master? It seems there's a merge conflict due to #438 (also yours). |
…ure/subprocess-update-py35
OK, sorry for the mixed identity. I'll resolve this myself. |
Thanks! All set. (I've made one more final tiny cleanup, pushed as a separate commit, cc1f921.) |
I'm marking this as WIP, because it's full of
sys.version_info
branches and that looks suboptimal to me.Since many of the methods share the same argument lists... can
mypy
handle assignments correctly? It seems to me that a singlesys.version_info
branched declaration ofcall
could be assigned tocheck_call
andcheck_output
to shorten the stub significantly. As in:Would that work?
Otherwise (assuming the tests pass) I think this can be merged in the state it is in now.