-
-
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
Use classic console output when -s is used #3041
Merged
nicoddemus
merged 23 commits into
pytest-dev:features
from
segevfiner:capture-no-disable-progress
Dec 16, 2017
Merged
Use classic console output when -s is used #3041
nicoddemus
merged 23 commits into
pytest-dev:features
from
segevfiner:capture-no-disable-progress
Dec 16, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Improve handling of pyargs
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
Thanks @segevfiner! I changed the target to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 tofeatures
just say so. Or maybe you consider it a "bugfix" 😛Checklist
$issue_id.$type
for example (588.bugfix)removal
,feature
,bugfix
,vendor
,doc
ortrivial
bugfix
,vendor
,doc
ortrivial
fixes, targetmaster
; for removals or features targetfeatures
;Unless your change is a trivial or a documentation fix (e.g., a typo or reword of a small section) please:
AUTHORS
, in alphabetical order;