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

Should we be using logging.warning or warnings.warn? #41

Open
MichaelClerx opened this issue Nov 18, 2024 · 0 comments
Open

Should we be using logging.warning or warnings.warn? #41

MichaelClerx opened this issue Nov 18, 2024 · 0 comments

Comments

@MichaelClerx
Copy link
Member

See guidance here: https://docs.python.org/3/howto/logging.html#when-to-use-logging

In short

  • logging.warning is intended for server-like applications, that lets them emit a warning that the client (typically some other software) can't currently solve (but should be logged somewhere)
  • warnings.warn is to notify a user (or client app) of a warning they should try to avoid

My guess is we want the second here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant