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

Closes #9733: Fix for logging handler flushing warnings in the middle of the docs build #9772

Merged
merged 1 commit into from Oct 30, 2021

Conversation

gibsondan
Copy link
Contributor

Subject: Fix for logging handler flushing warnings in the middle of the docs build

Feature or Bugfix

  • Bugfix

Purpose

My project was mysteriously dropping warnings (see #9733 for detailed repro) and I realized that it's because it imports libraries like airflow and mlflow that set up loggers automatically when they are imported. This causes this handler to flush even though shouldFlush is set to always return False. A simple workaround is to override flush to be a no-op.

Relates

#9733

…the middle of the build

Summary:
My project was mysteriously dropping warnings (see sphinx-doc#9733 for detailed repro) and I realized that it's becaues it imports libraries like airflow or mlflow that set up loggers automatically when they are imported. This causes this handler to flush even though shouldFlush is set to always return False. A simple workaround is to override flush to be a no-op.

Test Plan: Repeat repro steps from sphinx-doc#9733 - project now always includes warnings
@tk0miya tk0miya added this to the 4.3.0 milestone Oct 30, 2021
@tk0miya tk0miya changed the base branch from 4.2.x to 4.x October 30, 2021 16:17
@tk0miya tk0miya merged commit 745e114 into sphinx-doc:4.x Oct 30, 2021
@tk0miya
Copy link
Member

tk0miya commented Oct 30, 2021

Merged. Thank you for your contribution!

tk0miya added a commit that referenced this pull request Oct 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants