Skip to content

Cannot suppress warnings from urllib3 when imported by pdoc3 #331

Closed
@pceBuildMaster

Description

@pceBuildMaster

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

  • pdoc version: 0.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions