Change version warning output to not use logging#4931
Merged
Conversation
Importing logging before CIME.utils.stop_buffering_output makes all the logging.info outputs look terrible. Example: INFO:CIME.test_scheduler:create_test will use up to 80 cores simultaneously create_test will use up to 80 cores simultaneously
a331c84 to
9b339c3
Compare
jedwards4b
approved these changes
Feb 11, 2026
rljacob
approved these changes
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a logging output duplication issue where importing the logging module before calling CIME.utils.stop_buffering_output() causes duplicate log messages with ugly prefix text. The fix moves the logging import to after the stop_buffering_output() call and replaces the early warning output with a direct print to stderr.
Changes:
- Moved logging import from line 7 to line 54 (after stop_buffering_output is called)
- Changed Python version warning output from logging.warning to print to stderr
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| CIME.utils.stop_buffering_output() | ||
| import argparse | ||
| import argparse, logging |
There was a problem hiding this comment.
Import of 'logging' is not used.
Import of 'argparse' is not used.
Suggested change
| import argparse, logging |
This file contains hidden or 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
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.
Importing logging before CIME.utils.stop_buffering_output makes all the logging.info outputs look terrible. Example:
So, the output is duplicated and one of the duplications has ugly prefix text.
This is somewhat urgent as it impacts all users. I will do an emergency CIME update to E3SM when this is merged.
Checklist