Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[MNT]: User feedback should use warnings, not logs #23422

Copy link
Copy link
Open
@mwaskom

Description

@mwaskom
Issue body actions

Summary

There are at least two places where matplotlib provides a message to the user about usage patterns that are potentially mistakes using logging functionality, rather than as a warning.

Two examples I've encountered recently:

I don't think logging is the right mechanism here:

  • The feedback provides very little information about the source of the problem, you just get some text in stderr.
  • Related, you can convert a warning to an error and then drop into a debugger to figure out what's happening; I don't think that's the case with logging?
  • Warnings can be intercepted by third party libraries that are doing something on purpose (i.e., passing numbers-as-strings to use a categorical axis), whereas logs are harder to muffle without intervening.

Proposed fix

It's possible I am wrong here, but warnings.warn feels like the right mechanism for both of these pieces of feedback.

story645 and Jacob-Stevens-Haas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.