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

Do not monkeypatch logging.raiseExceptions?! #4942

blueyed opened this issue Mar 18, 2019 · 0 comments


None yet
1 participant
Copy link

commented Mar 18, 2019

I have found the following code, which was added in 2c7d005 by @hpk42, but apparently without a test:

# make sure logging does not raise exceptions at the end
def silence_logging_at_shutdown():
if "logging" in sys.modules:
sys.modules["logging"].raiseExceptions = False

A later commit (0719602) indicates that this might be because logging itself tries to close some fd.

I think it is bad practice to change module attributes, especially if it might indicate that pytest is/was doing something wrong itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.