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

Add warning notifier #46

Closed
wants to merge 1 commit into from
Closed

Add warning notifier #46

wants to merge 1 commit into from

Conversation

AlexeyBerezhnoy
Copy link

Using warnings about n+1 query is more pythonic.

warnings.warn() in library code if the issue is avoidable and the client application should be modified to eliminate the warning
logging.warning() if there is nothing the client application can do about the situation, but the event should still be noted

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

It is also convenient to use with pytest. Because pytest creates a report on all warnings. https://docs.pytest.org/en/7.1.x/how-to/capture-warnings.html

Sorry for my english.

@AlexeyBerezhnoy AlexeyBerezhnoy closed this by deleting the head repository Mar 30, 2023
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

Successfully merging this pull request may close these issues.

None yet

1 participant