Skip to content
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

Use classic console output when -s is used #3041

Merged
merged 23 commits into from
Dec 16, 2017

Conversation

segevfiner
Copy link
Contributor

@segevfiner segevfiner commented Dec 16, 2017

Fixes #3038

It's a bit ugly to query config.getoption('capture') in terminal.py though since it's declared in another plugin... So I'm not sure if this is OK or not.

It makes sense to me to target master (3.3.2) for this since it's quite small... But it is essentially a "feature"... So if you want this re-based to features just say so. Or maybe you consider it a "bugfix" 😛

Checklist

  • Add a new news fragment into the changelog folder
    • name it $issue_id.$type for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of removal, feature, bugfix, vendor, doc or trivial
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."
  • Target: for bugfix, vendor, doc or trivial fixes, target master; for removals or features target features;
  • Make sure to include reasonable tests for your change if necessary

Unless your change is a trivial or a documentation fix (e.g., a typo or reword of a small section) please:

  • Add yourself to AUTHORS, in alphabetical order;

cryvate and others added 22 commits December 7, 2017 15:12
logging_using_handler is only used in catching_logs. Therefore it makes
sense to remove one of the many context managers from the logging
plugin.
Also mention which hook to use instead of the deprecated
pytest_cmdline_preparse

Fix pytest-dev#3022
Integrate logging_using_handler into catching_logs
Respect PYTEST_DONT_REWRITE for plugins too.

closes pytest-dev#2995
Add param annotations and types to hookspec
The logger parameter of catching_logs is not used anywhere. The main
motivation for removing the logger parameter is that it removes the

logger = logger or logging.getLogger(logger)

line. IMO there are too many occurences of the string 'logg' ;)
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 (pytest-dev#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 pytest-dev#2981
Remove logger parameter from catching_logs
Fix memory leak caused by fixture values never been garbage collected
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 92.595% when pulling 370daf0 on segevfiner:capture-no-disable-progress into db4df58 on pytest-dev:master.

@nicoddemus nicoddemus changed the base branch from master to features December 16, 2017 14:33
@nicoddemus
Copy link
Member

Thanks @segevfiner! I changed the target to features because while I agree it is a rather small fix, it is still a behavior change. 😁

@nicoddemus nicoddemus merged commit d872791 into pytest-dev:features Dec 16, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 92.595% when pulling 0a2735a on segevfiner:capture-no-disable-progress into f8f1a52 on pytest-dev:features.

@segevfiner segevfiner deleted the capture-no-disable-progress branch December 16, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants