Sanic enables writing of DeprecationWarning to the log
See original GitHub issueDescribe the bug
Sanic changes the default DeprecationWarning behaviour to be written to the log.
The code line that cause it is in app.py line 104:
filterwarnings("once", category=DeprecationWarning)
This change makes all of the DeprecationWarning, in every 3rd party library we use, to be written to the log.
Expected behavior I would expect that this will not happen in production 😅
Environment (please complete the following information):
- OS: ubuntu & macOS
- Sanic Version: 22.6
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Logging — Sanic 20.12.3 documentation - Read the Docs
Logging ¶. Sanic allows you to do different types of logging (access log, error log) on the requests based on the python3 logging...
Read more >sanic-cors/CHANGELOG.md at master - GitHub
A Sanic extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible. Based on flask-cors by Cory Dolphin.
Read more >Logging | Sanic Framework
Sanic allows you to do different types of logging (access log, error log) on the requests based on the Python logging API (opens...
Read more >warnings — Warning control — Python 3.11.1 documentation
Warning messages are normally written to sys.stderr , but their ... logging.captureWarnings() allows you to handle all warnings with the standard logging ......
Read more >How to enable testing for DeprecationWarning and ...
If you start with a minimal test_one.py def test_one(): from collections import Hashable. a simple setup.py : from setuptools import setup, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I guess an ENABLE_DEPRECATION_WARNINGS config var would be best. I can submit a PR if you like
No worries. I will add it. יום טוב