Branch: refs/heads/master
  Home:   https://github.com/pytest-dev/pytest
  Commit: 75f11f0b6576a7bd60927e3425a679c20c40f261
      
https://github.com/pytest-dev/pytest/commit/75f11f0b6576a7bd60927e3425a679c20c40f261
  Author: Allan Feldman <allan.d.feld...@gmail.com>
  Date:   2018-02-21 (Wed, 21 Feb 2018)

  Changed paths:
    M _pytest/fixtures.py

  Log Message:
  -----------
  Fix reference cycle caused by PseudoFixtureDef.

Python types have reference cycles to themselves when they are created. This is
partially caused by descriptors which get / set values from the __dict__
attribute for getattr / setattr on classes.

This is not normally an issue since types tend to remain referenced for the
lifetime of the Python process (and thus never become garbage).

However, in the case of PseudoFixtureDef, the class is generated in
_get_active_fixturedef and later discarded when pytest_fixture_setup returns.
As a result, the generated PseudoFixtureDef type becomes garbage.

This is not really a performance issue but it can lead to some problems when
making tests and assertions about garbage when using pytest.

This garbage creation problem can be rectified by returning a namedtuple
instance which is functionally the same. In the modified code, the namedtuple
is allocated / deallocated using reference counting rather than having to use
the garbage collector.


  Commit: aa53e37fa255248c101f32dda876ad589bc68bb2
      
https://github.com/pytest-dev/pytest/commit/aa53e37fa255248c101f32dda876ad589bc68bb2
  Author: Allan Feldman <allan.d.feld...@gmail.com>
  Date:   2018-02-21 (Wed, 21 Feb 2018)

  Changed paths:
    M testing/python/fixture.py

  Log Message:
  -----------
  Add a test to expose leaked PseudoFixtureDef types.


  Commit: 287c003cfd28cb2fc0bd4cba92b76333a8543ab7
      
https://github.com/pytest-dev/pytest/commit/287c003cfd28cb2fc0bd4cba92b76333a8543ab7
  Author: Allan Feldman <allan.d.feld...@gmail.com>
  Date:   2018-02-21 (Wed, 21 Feb 2018)

  Changed paths:
    M AUTHORS

  Log Message:
  -----------
  Add myself to AUTHORS.


  Commit: 7536e949b18aa6ab5c3594ce9c200aed9dcf8dcb
      
https://github.com/pytest-dev/pytest/commit/7536e949b18aa6ab5c3594ce9c200aed9dcf8dcb
  Author: Allan Feldman <allan.d.feld...@gmail.com>
  Date:   2018-02-21 (Wed, 21 Feb 2018)

  Changed paths:
    A changelog/3249.bugfix.rst

  Log Message:
  -----------
  Add changelog entry.


  Commit: 48548767fcc1c65134309b649cf4d63f5b9cec65
      
https://github.com/pytest-dev/pytest/commit/48548767fcc1c65134309b649cf4d63f5b9cec65
  Author: Allan Feldman <allan.d.feld...@gmail.com>
  Date:   2018-02-21 (Wed, 21 Feb 2018)

  Changed paths:
    M _pytest/fixtures.py

  Log Message:
  -----------
  Use a frozen attr class for PseudoFixtureDef.


  Commit: bedceaacc46aefab78c8f29db36dab03c24f1646
      
https://github.com/pytest-dev/pytest/commit/bedceaacc46aefab78c8f29db36dab03c24f1646
  Author: Bruno Oliveira <nicodde...@gmail.com>
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
    M AUTHORS
    M _pytest/fixtures.py
    A changelog/3249.bugfix.rst
    M testing/python/fixture.py

  Log Message:
  -----------
  Merge pull request #3249 from a-feld/request-fixture-reference-cycle

Fix PseudoFixtureDef reference cycle.


Compare: 
https://github.com/pytest-dev/pytest/compare/1127d519db0b...bedceaacc46a
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to