pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.12k stars 145 forks source link

Cannot suppress warnings from urllib3 when imported by pdoc3 #331

Closed pceBuildMaster closed 3 years ago

pceBuildMaster commented 3 years ago

Expected Behavior

Calling pdoc with python env variable set to ignore works:

PYTHONWARNINGS="ignore::DeprecationWarning" pdoc --output-dir "$outdir" --html $py_files

Actual Behavior

On every call to pdoc get the warning:

...\lib/python3.8/site-packages/urllib3/util/retry.py:38: DeprecationWarning: Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and will be removed in v2.0. Use 'Retry.DEFAULT_METHODS_ALLOWED' instead
  warnings.warn(

Steps to Reproduce

  1. import urllib3 in python module
  2. run pdoc on module
  3. observe warning from urllib3 in pdoc output on STDERR

Additional info