Skip to content
New issue

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

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

Already on GitHub? # to your account

Replace pkg_resources with importlib.metadata #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

khaeru
Copy link

@khaeru khaeru commented Nov 28, 2024

Hi—thanks for providing and maintaining this useful package.

On first use I see the following warnings:

../../../.venv/3.13/lib/python3.13/site-packages/ckanapi/version.py:1                                                                                                                                                                                          
  /home/khaeru/.venv/3.13/lib/python3.13/site-packages/ckanapi/version.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html                                                           
    import pkg_resources                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                               
../../../.venv/3.13/lib/python3.13/site-packages/pkg_resources/__init__.py:3149                                                                                                                                                                                
  /home/khaeru/.venv/3.13/lib/python3.13/site-packages/pkg_resources/__init__.py:3149: 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)                                                                                                                                                                                                                                     

This PR adjusts—as suggested in the setuptools docs—to use importlib.metadata.version().

Please let me know if there are any other steps I should take to help get this merged.

Avoids DeprecationWarning in ckanapi.version.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant