fabioz / PyDev.Debugger

Sources for the debugger used in PyDev, PyCharm and VSCode Python
Eclipse Public License 1.0
426 stars 123 forks source link

Failed test due to matplotlib deprecation of interactive_bk #287

Open scottshambaugh opened 2 months ago

scottshambaugh commented 2 months ago

I originally submitted this issue for debugpy https://github.com/microsoft/debugpy/issues/1623, and saw on a linked issue that there is a comment tracking the issue back to PyDev.Debugger: https://github.com/microsoft/debugpy/issues/1633#issuecomment-2243324552

I'm not sure if the issue is in this repo, but potentially this line is at fault? https://github.com/fabioz/PyDev.Debugger/blob/54f8db469c2d8c31635db7cc59a10bc8dab76057/pydevd.py#L695

Please see the linked tickets for details, but the end result is that I am unable to debug tests in VSCode via the Python extension right now. The following error is raised:

E       matplotlib._api.deprecation.MatplotlibDeprecationWarning: The interactive_bk attribute was deprecated in Matplotlib 3.9 and will be removed in 3.11. Use ``matplotlib.backends.backend_registry.list_builtin(matplotlib.backends.BackendFilter.INTERACTIVE)`` instead.
tcrasset commented 1 month ago

A workaround to make debug work is to ignore the warnings using:

In pyproject.toml (or other configuration file, adapt the syntax accordingly)

[tool.pytest.ini_options]

filterwarnings = [
    "error", # raise error on every warning, except the ones below
    "ignore::matplotlib._api.deprecation.MatplotlibDeprecationWarning",
]