Branch: refs/heads/master
Home: https://github.com/pytest-dev/pytest
Commit: c3f63ac1432044271b15c4ef7959000a7a0d9bfe
https://github.com/pytest-dev/pytest/commit/c3f63ac1432044271b15c4ef7959000a7a0d9bfe
Author: Bruno Oliveira <nicodde...@gmail.com>
Date: 2017-12-13 (Wed, 13 Dec 2017)
Changed paths:
M _pytest/fixtures.py
A changelog/2981.bugfix
M testing/acceptance_test.py
Log Message:
-----------
Fix memory leak caused by fixture values never been garbage collected
The leak was caused by the (unused) `FixtureRequest._fixture_values`
cache.
This was introduced because the `partial` object (created to call
FixtureDef.finish() bound with the Request) is kept alive
through the entire session when a function-scoped fixture depends
on a session-scoped (or higher) fixture because of the nested
`addfinalizer` calls.
FixtureDef.finish() started receiving a request object in order to
obtain the proper hook proxy object (#2127), but this does not seem
useful at all in practice because `pytest_fixture_post_finalizer`
will be called with the `request` object of the moment the fixture value
was *created*, not the request object active when the fixture value
is being destroyed. We should probably deprecate/remove the request
parameter from `pytest_fixture_post_finalizer`.
Fix #2981
Commit: db4df5833a6699345761e1851bfed32eb1109121
https://github.com/pytest-dev/pytest/commit/db4df5833a6699345761e1851bfed32eb1109121
Author: Bruno Oliveira <nicodde...@gmail.com>
Date: 2017-12-14 (Thu, 14 Dec 2017)
Changed paths:
M _pytest/fixtures.py
A changelog/2981.bugfix
M testing/acceptance_test.py
Log Message:
-----------
Merge pull request #3030 from nicoddemus/leak
Fix memory leak caused by fixture values never been garbage collected
Compare:
https://github.com/pytest-dev/pytest/compare/b17c6e5f8975...db4df5833a66
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit