TeleSign / python_telesign

The Telesign Python SDK lets you easily integrate with our REST API.
MIT License
24 stars 26 forks source link

DeprecationWarning for pkg_resources.declare_namespace('telesign') in Python 3.11 #19

Open YDA93 opened 1 year ago

YDA93 commented 1 year ago

Hello,

While working with Telesign in a Django project using Python 3.11, I encountered the following DeprecationWarning:

/Users/yousefalmutairi/Desktop/dev/fecare-django/venv/lib/python3.11/site-packages/telesign/__init__.py:3: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('telesign')`.
  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
    __import__('pkg_resources').declare_namespace(__name__)

It appears that the method pkg_resources.declare_namespace is deprecated and the recommendation is to implement implicit namespace packages as specified in PEP 420. This newer method is preferred over the use of pkg_resources.declare_namespace.

I wanted to bring this to your attention in case it hasn't been reported yet. Addressing this warning would ensure better compatibility with newer Python versions and reduce noise during testing and development.

Thank you for your efforts in maintaining the Telesign package!

adohertyTS commented 1 month ago

Hi @YDA93 , thank you for bringing this to our attention! Our product team will take a look.