[Pytest-commit] [pytest-dev/pytest] 75f11f: Fix reference cycle caused by PseudoFixtureDef.

2018-02-22 Thread Bruno Oliveira
  Branch: refs/heads/master
  Home:   https://github.com/pytest-dev/pytest
  Commit: 75f11f0b6576a7bd60927e3425a679c20c40f261
  
https://github.com/pytest-dev/pytest/commit/75f11f0b6576a7bd60927e3425a679c20c40f261
  Author: Allan Feldman 
  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 
  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 
  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 
  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 
  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 
  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


[Pytest-commit] [pytest-dev/pytest] b5ac61: Correct docs to config.pluginmanager.get_plugin()

2018-02-22 Thread Bruno Oliveira
  Branch: refs/heads/master
  Home:   https://github.com/pytest-dev/pytest
  Commit: b5ac61657a74e2224f2534b7c3663b351bfe2506
  
https://github.com/pytest-dev/pytest/commit/b5ac61657a74e2224f2534b7c3663b351bfe2506
  Author: Kyle Altendorf 
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
M doc/en/writing_plugins.rst

  Log Message:
  ---
  Correct docs to config.pluginmanager.get_plugin()

`getplugin()` is deprecated in favor of `get_plugin()`.

https://github.com/pytest-dev/pytest/blob/dd97c940359079fd874795a731d54d1abb7d4c8e/_pytest/config.py#L261


  Commit: 1127d519db0b115ef6136c214efe6c0a5a925dd7
  
https://github.com/pytest-dev/pytest/commit/1127d519db0b115ef6136c214efe6c0a5a925dd7
  Author: Bruno Oliveira 
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
M doc/en/writing_plugins.rst

  Log Message:
  ---
  Merge pull request #3254 from altendky/patch-1

Correct docs to config.pluginmanager.get_plugin()


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


[Pytest-commit] [pytest-dev/pytest] 0f58fc: Add pdb test with disabled logging plugin

2018-02-22 Thread Bruno Oliveira
  Branch: refs/heads/features
  Home:   https://github.com/pytest-dev/pytest
  Commit: 0f58fc881b795478d3f93f8f2bbd6b73a11b4c57
  
https://github.com/pytest-dev/pytest/commit/0f58fc881b795478d3f93f8f2bbd6b73a11b4c57
  Author: Thomas Hisch 
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
M testing/test_pdb.py

  Log Message:
  ---
  Add pdb test with disabled logging plugin

Implement the test from #3210, which was not merged yet, because the PR was
abandoned in favor or #3234.


  Commit: 0a3c80e959f5120148d297db17394456f840e6ae
  
https://github.com/pytest-dev/pytest/commit/0a3c80e959f5120148d297db17394456f840e6ae
  Author: Bruno Oliveira 
  Date:   2018-02-22 (Thu, 22 Feb 2018)

  Changed paths:
M testing/test_pdb.py

  Log Message:
  ---
  Merge pull request #3253 from thisch/nolooggingtest

Add pdb test with disabled logging plugin


Compare: 
https://github.com/pytest-dev/pytest/compare/54e63b7dd534...0a3c80e959f5___
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit