Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('pydevd_plugins.extensions') #1230

Closed
int19h opened this issue Mar 6, 2023 · 2 comments
Assignees
Labels
bug Something isn't working pydevd

Comments

@int19h
Copy link
Collaborator

int19h commented Mar 6, 2023

Causes test_run_relative_path fails, and the failure is consistent across all platforms, e.g. https://dev.azure.com/debugpy/debugpy/_build/results?buildId=3594&view=logs&j=4b649afe-af30-5b13-56ee-823ad097620f&t=1628023b-a9e3-551b-728a-f87538244b57&l=2498

Seems to be due to:

File "D:\a\1\s\.tox\py39\lib\site-packages\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_extension_utils.py", line 5, in <module>
E               import pydevd_plugins.extensions as extensions
E             File "D:\a\1\s\.tox\py39\lib\site-packages\debugpy\_vendored\pydevd\pydevd_plugins\extensions\__init__.py", line 4, in <module>
E               __import__('pkg_resources').declare_namespace(__name__)
E             File "D:\a\1\s\.tox\py39\lib\site-packages\pkg_resources\__init__.py", line 2298, in declare_namespace
E               warnings.warn(msg, DeprecationWarning, stacklevel=2)
E           DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions')`.
E           Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
@int19h int19h added test issue Test failures and other issues with test runs and CI. P1 labels Mar 6, 2023
@int19h int19h self-assigned this Mar 6, 2023
@int19h int19h added the pydevd label Mar 6, 2023
@int19h
Copy link
Collaborator Author

int19h commented Mar 6, 2023

Caused by an update to setuptools v67.3.0

@int19h
Copy link
Collaborator Author

int19h commented Mar 7, 2023

The test itself can be fixed by looking for a more specific string, but the issue here is bigger - anything that depends on debugpy will trigger this warning. Apps are generally not affected as DeprecationWarning is filtered by default. But it's usually enabled in test runs, so libraries and apps that specifically import debugpy will see those failures in the run logs (and possibly failed tests, if set up to fail on warning).

@int19h int19h changed the title test_run_relative_path fails DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('pydevd_plugins.extensions') Mar 7, 2023
@int19h int19h added bug Something isn't working and removed test issue Test failures and other issues with test runs and CI. labels Mar 7, 2023
int19h added a commit that referenced this issue Mar 7, 2023
Look for more specific text in the output to avoid false positives.
int19h added a commit that referenced this issue Mar 7, 2023
Look for more specific text in the output to avoid false positives.
darrenmeehan added a commit to darrenmeehan/debugpy that referenced this issue Mar 17, 2023
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Mar 17, 2023
https://build.opensuse.org/request/show/1072342
by user dgarcia + dimstar_suse
- Add setuptools-67.3.0.patch to fix test issues with new setuptools.
  gh#microsoft/debugpy#1230
int19h added a commit to int19h/debugpy that referenced this issue Apr 3, 2023
@luabud luabud removed the P1 label May 8, 2023
int19h pushed a commit to int19h/debugpy that referenced this issue Aug 28, 2023
int19h pushed a commit that referenced this issue Sep 5, 2023
@judej judej closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pydevd
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants