Logging.warning vs. warnings.warn

In those two examples you give, it may be that a developer can change the situation (comment length, environment variables) so it’s not clear-cutas to which of logging.warning() or warnings.warn() is more appropriate. Also, as Raymond said in the issue, there’s no need to change anything if the status quo isn’t leading to a specific problem. The “How to use logging” docs are advisory and are not specifically aimed at core developers (the stdlib could be considered a special case for certain things).