-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Pytest 3.0.2 memory leak with pytest.raises #1965
Comments
Thanks for the report! |
Is there any way I can assist in fixing this issue? |
You might want to take a look at the code and perhaps submitting a PR? The relevant code for that is in python.py. |
@nicoddemus Thank you for the pointer. I submitted a PR but I think I might need some help creating a regression test. At least locally the changes seem to fix the issue. However it's really weird that Python can't garbage the cyclic references - normally that's not a problem. |
@MSeifert04 does happen after triggering a gc.collect? i recall that at least on cpython full gc is only triggered on occasion because quite often recounting is more than sufficient |
You're right |
Strange, I could sworn I tried |
I tried to identify a memory leak in one of my functions and while debugging it I realized that besides the memory leak in my function there is also a memory leak in
pytest.raises
.conda list
colorama 0.3.7
pip 8.1.2 py35_0
py 1.4.31
pytest 3.0.2
python 3.5.2 0
setuptools 27.2.0 py35_1
vs2015_runtime 14.0.25123 0
wheel 0.29.0 py35_0
Windows 10 (64 bit) but the memory leak is also visible in Travis CI ( Linux 64 bit) and AppVeyor (I think 64 bit) independant of python version. The memory leak is not present in pytest 2.9.2 and 2.6.4 (tested with Travis CI)
It's not really minimal and there are probably better ways to test it:
The text was updated successfully, but these errors were encountered: