-
-
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
Merge pytest-catchlog plugin #2794
Conversation
This should go to the (Also, check the other things in the PR template, unless you intend to wait for some discussion before finishing this) |
pytest.mark.hookwrapper seems to be used nowhere in the _pytest package.
The 'closing' context manager is only needed for the log_file_handler.
thanks for bringing this forward, i'd love to participate in the finalizing discussions but im off the grid next week please dont forget to mark provided fixtures/apis as experimental so we can more easily bring in changes that may turn necessary by feedback coming in from wider adoption |
Is it documented somewhere how I can mark the features/apis as experimental? See you in a week @RonnyPfannschmidt |
@Thisch we dont yet have a formal/in code mechanism, for now please document, and lets add a note/issue for FutureWarnings |
Remove reference of pytest-catchlog plugin in plugins.rst
I squashed your suggested changelog entry into the 'Add changelog ...' commit |
Oh thanks I didn't notice that! 👍 LGTM, thanks again for tackling this awesome new feature. |
I did this a few minutes ago. Note that the performance tests are still not part of this PR. I don't plan on merging them into pytest, though. |
this is installed with py2, but not py3 for some reason Though, we can remove it once pytest-dev/pytest#2794 is merged
In pytest 3.3.0 was merged the pytest-cachlog plugin which is now enabled by default [1] - Disable this logging module for tcp-qa tests. [1] pytest-dev/pytest#2794 Change-Id: I60d9ba42ac88af80d263c6cadff10cb69d6d5e2a
@Thisch If you have the time, can you please take a look at the remaining pytest-catchlog issues/PRs? See #3003. I also opened eisensheng/pytest-catchlog#73 to make it clear what's going on. |
"""Add options to control log capturing.""" | ||
group = parser.getgroup('logging') | ||
|
||
def add_option_ini(option, dest, default=None, type=None, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while reiterating this as it got back into my notifications i beleive this one should have never met a release,
literally all the options we add are technically superseeded by the much better option setting argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, all command-line options could be replaced by using the -o
option instead.
While I agree with your reasoning, we have to remember that one of the objectives was to merge this plugin as is to allow a drop-in-replacement for users, so removing these options would break their usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should nonetheless mark them for removal in future
Log capturing has been merged into py.test proper: pytest-dev/pytest#2794 and pytest-capturelog blacklisted: pytest-dev/pytest#3004 To avoid potential snafus I'm bumping the py.test req right away and removing capturelog from our deps.
We've been getting warnings about it having been merged into pytest core, e.g: https://travis-ci.org/CCI-MOC/hil/jobs/341455006#L2725 This also bumps the minimum version for pytest in our setup.py, since the change was made in 3.3.0: * https://docs.pytest.org/en/latest/changelog.html#id56 * pytest-dev/pytest#2794
In this PR the pytest-catchlog plugin is merged (develop branch of the
pytest-catchlog repo) into pytest-core, as
suggested in (eisensheng/pytest-catchlog#8). In the course of that I've renamed the
plugin from CatchLogPlugin to LoggingPlugin (see eisensheng/pytest-catchlog#8).
pytest-catchlog contains a backward compatibilty code for pytest-capturelog,
which I removed in this PR, since I don't think that it makes sense to merge
this code into pytest-core. Futhermore, the pytest-catchlog repo contains
performance tests
(https://github.com/eisensheng/pytest-catchlog/tree/develop/tests/perf)
which are not yet part of this PR. Do we want to integrate them? If
yes, how?
The documentation for this PR still needs to be integrated into this
repo. I'll probably copy the docu from the readme of pytest-catchlog and
adapt it a bit.
$issue_id.$type
for example (588.bug)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
;