csparpa / pyowm

A Python wrapper around the OpenWeatherMap web API
https://pyowm.readthedocs.io
MIT License
789 stars 169 forks source link

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

Open yiyiyi0817 opened 3 months ago

yiyiyi0817 commented 3 months ago

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

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.