pyowm icon indicating copy to clipboard operation
pyowm copied to clipboard

[Warning] DeprecationWarning regarding `pkg_resources.declare_namespace` and `pkg_resources` API usage

Open echo-yiyiyi opened this issue 1 year ago • 0 comments

Hello,

I've encountered a DeprecationWarning while running tests in my project that depends on pyowm. The warning suggests that the usage of pkg_resources.declare_namespace and pkg_resources API is deprecated. Here are the details of the warnings:

lib\site-packages\pyowm\commons\cityidregistry.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import resource_filename

lib\site-packages\pkg_resources\__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
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
declare_namespace(pkg)

lib\site-packages\pkg_resources\__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
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
declare_namespace(pkg)

Environment

  • Python Version: 3.10.9
  • pyowm Version: 3.3.0
  • Operating System: Windows 11

Expected Behavior

I would expect that the library does not use deprecated functions or methods, to prevent potential compatibility issues in future Python releases.

I understand that maintaining a library is a significant effort, and I appreciate all the work that goes into pyowm. I'm looking forward to any guidance on this issue or plans for future updates to address these deprecation warnings.

Thank you for your time and consideration.

echo-yiyiyi avatar Apr 10 '24 14:04 echo-yiyiyi