Join GitHub today
When I try to run the qutebrowser testsuite with the current git
I have no idea what's happening though... Taking the freedom to mark this as critical as it might be a serious 3.0 regression for other testsuites too.
Here's roughly what I did:
I initially tried running a subset but then the error went away, so I guess better save than sorry. Still takes around 1min 40s per run though...
On this for some hours now, made some progress but still no idea what's the problem.
I could not reproduce the problem on my Windows computer because of
Anyways, I've tried to reduce the number of tests one had to run to find the issue, and I managed to remove quite a few test files until I had a small enough set of tests that still manifested the problem, reducing the test suite time to 8 seconds. I pushed a branch to my fork in order to continue this tomorrow or if others want to take a look.
Well that's what I can remember now with my tired brain at this late hour. I plan to continue debugging this tomorrow, but any comments or insights are welcome.
I can confirm that subset reproduces it for me. I could also get rid of
When I comment out
So it sounds like it's - pure speculation - something with the stack getting bigger with more test items, and then at some point too big?
By the way:
I also tried uninstalling
When I catch that
I then tried finding out what
diff --git a/_pytest/fixtures.py b/_pytest/fixtures.py index 383e41b..6d3a8d9 100644 --- a/_pytest/fixtures.py +++ b/_pytest/fixtures.py @@ -748,7 +748,11 @@ class FixtureDef: try: while self._finalizer: func = self._finalizer.pop() - func() + try: + func() + except RecursionError: + sys.setrecursionlimit(sys.getrecursionlimit() + 100) + import pdb; pdb.set_trace() finally: ihook = self._fixturemanager.session.ihook ihook.pytest_fixture_post_finalizer(fixturedef=self)
Turns out it's indeed the finalizer of
So I placed a breakpoint in the fixture after
No finalizers left. Let's continue stepping:
Inside some hook stuff I don't understand, so I started using
Oh, we ended up here again. Now how does
I have no idea how this happens, but I have a
@pytest.fixture(scope='session') def qapp(qapp): """Change the name of the QApplication instance.""" qapp.setApplicationName('qute_test') return qapp
If I don't override
from PyQt5.QtWidgets import QApplication early_qapp = QApplication()
things work fine again.
@The-Compiler thanks a lot for the debugging help! I will continue this tonight.
Me this morning: "Hmm if only I knew of a project which used PyQt5 and QtWebKit on Windows, so I can see which package they use to install it hassle-free..."... duh. I face-palmed so hard I almost knocked myself out.
No progress, unfortunately.
There were two approaches that were discussed/implemented:
I gave it another try right after 3.0 was out but I'm not sure it is possible with the current architecture. We would probably have to rethink how things are implemented in order to support this in all the possible use cases.
In summary, I don't think this will land in 3.1 unless someone else gives it a shot.