PyDev.Debugger icon indicating copy to clipboard operation
PyDev.Debugger copied to clipboard

Failed test due to matplotlib deprecation of interactive_bk

Open scottshambaugh opened this issue 1 year ago • 2 comments

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.

scottshambaugh avatar Aug 10 '24 20:08 scottshambaugh

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",
]

tcrasset avatar Sep 03 '24 09:09 tcrasset

It looks like the linked issue has resolved things, though I haven't tested it. This issue may not be needed any more.

scottshambaugh avatar Feb 24 '25 19:02 scottshambaugh