Skip to content

runtests.py still uses typing.py from lib-typing/3.2 #2674

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

Closed
gvanrossum opened this issue Jan 10, 2017 · 6 comments
Closed

runtests.py still uses typing.py from lib-typing/3.2 #2674

gvanrossum opened this issue Jan 10, 2017 · 6 comments
Labels
bug mypy got something wrong priority-1-normal

Comments

@gvanrossum
Copy link
Member

@ambv: I think some of your recent work on runtests.py may have stopped running some tests.

In particular, PR #2634 introduced something that doesn't work in Python 3.5.1 (from typing import Type -- the 3.5.1 stdlib version of typing.py doesn't define Type). There's a line in .travis.yml to run the tests with Python 3.5.1 specifically to catch this issue (the reason is our internal CI uses 3.5.1 and can't easily be updated). But the tests didn't fail (so our internal CI failed). I've fixed this in #2669 but the issue remains -- why did the test not catch it?

My theory is that somehow runtests.py doesn't run mypy any more.

Here's confirmation: with Python 3.5.1 installed, if I add the line from typing import Type to mypy/main.py, then running python3 -m mypy -c pass instantly fails with an ImportError, but python3.5 runtest.py -x lint passes without errors.

I'm also suspicious that the running time has gone down so much -- from IIRC ~4 minutes to 1:30.

@JukkaL
Copy link
Collaborator

JukkaL commented Jan 11, 2017

This needs to be resolved before the 0.4.7 release.

@gvanrossum
Copy link
Member Author

OK, I debugged this some more and the issue is more prosaic. The tests are run with PYTHONPATH set to include lib-typing/3.2 which means that it always uses the latest typing.py. I'll see what I can do about this.

@gvanrossum gvanrossum changed the title runtests.py seems to have stopped running mypy runtests.py still uses typing.py from lib-typing/3.2 Jan 11, 2017
@gvanrossum
Copy link
Member Author

gvanrossum commented Jan 11, 2017

FWIW I think this can wait until after the 0.4.7 release. It's a little hairy. Related: #2674

@ambv
Copy link
Contributor

ambv commented Jan 12, 2017

@gvanrossum The time difference is legit. It's an effect of:

  • sharding the longest running task which took the entire length of the test run before so it's actually parallel (which on Travis is massive: 32 tests at the same time instead of 1)
  • only running flake8 on Python 3.6
  • poking lxml to release a wheel for 3.6 (https://bugs.launchpad.net/lxml/+bug/1654670) and @ddfisher to release a wheel for typed-ast; cutting down the environment setup time 8X

Let me know if there's anything else for me to fix here.

@gvanrossum
Copy link
Member Author

gvanrossum commented Jan 12, 2017 via email

@JukkaL JukkaL added the bug mypy got something wrong label Jan 16, 2017
@ilevkivskyi
Copy link
Member

This is outdated now, we don't have lib-typing anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-1-normal
Projects
None yet
Development

No branches or pull requests

4 participants