Conversation
f0570f1 to
8e4d796
Compare
The conclusion last time this came up was that it was something like a 3% increase in import time, and the odds are (increasingly) good that something else will have imported That should be the only consequence. |
|
@person123 This PR is motivated by the desire to move the debug tests to python-3.8. Those tests are built and tested inplace and the typing tests error. Currently we use python-3.6 for the tests and the typing tests aren't run at all for that version. Because we will be dropping 3.6 soon and the choice of python-dbg is driven by the distribution, Ubuntu focal in this case, we need to have it working or find another way to skip them. I think there is a path problem that this PR will fix, although another possibility is that mypy isn't properly upgraded for the debug run. I suppose I should check that this PR actually fixes the problem before arguing further. I don't see why the import times should go up much unless mypy is a slow import, the module isn't imported at the top level. Maybe lazy imports would fix it? |
|
Looks like this doesn't fix the debug testing problem. I'm suspecting the mypy version is not properly updated. |
6cd4aa2 to
c121550
Compare
|
Solved the debug test problem by adding |
|
My numpy import time went from .068 sec. to .068 sec. But such things are hard to time when disk and SSD access may go through fast cache memories. |
c121550 to
8e4d796
Compare
How exactly is this the case? |
Changed my mind, I don't think it does. |
Oops yes, ignore me; I was misunderstanding.
The intent was for that to be set here: but it does look like the path is missing a necessary |
The debug build is special, there is also an EDIT: Only the debug build had problems, the mypy tests were skipped when Python-3.6 was used for it, so didn't previously show up. EDIT: It didn't work with the current typing tests location either without setting the path. |
|
Oh, I think that what you're seeing is that PEP 561 is Python 3.7+ only. So for Python 3.6 it does make sense that you would have to set the |
Other way around :) Python-3.6 skipped the tests, Python-3.7-9 run the tests, but python-3.8-dbg, which is built inplace, needs the path set. |
|
Yargh I am really all scrambled up yesterday/today. I am going to just keep quiet now... |
|
@charris this is still marked WIP and now has merge conflicts |
|
@charris ping |
|
The question is if we want to do this. |
8e4d796 to
9d2f944
Compare
|
The merge conflict came from the addition of |
|
I think it makes sense, but there are ~10 open PRs for typing that will have a conflict if we merge this. Maybe we should merge those first (hint, hint) and take a break from new PRs so we can fix this one up. |
|
Considering we have a set of dedicated typing modules I feel it would also make sense to store the typing tests there. |
9d2f944 to
cd0100a
Compare
|
Rebased here, just needed to add the new files. It would be good to get the rest of the testing stuff in and make the move. |
|
I have no idea why the test is failing. The error message is Yet if I put that failed line in a try... except clause, it is running just fine. The mypy testing is doing something funny and I suspect there is a bug in |
|
Supposedly adding
Mostly a force of habit; let's just change it. |
This would explain a lot actually. |
cd0100a to
e5c30f5
Compare
Move them into a new `numpy/typing/tests directory`
e5c30f5 to
e97d913
Compare
|
Not waiting on shippable. |
|
Tests are moved. @BvB93 Could you check that the path in |
Move typing tests into a new
numpy/typing/tests directorywhere they are easier to define andcloser to their data.
Note that this makes the
typingmodule part of the runtime. Is that a problem?