Skip to content

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

Open

Description

@YDA93

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!

Activity

  1. adohertyTS commented on Sep 26, 2024

    @adohertyTS
    Contributor

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

  2. LanaJ11 commented on Dec 17, 2025

    @LanaJ11

    @YDA93 Hi! This has been addressed and included in the latest release. Thanks a lot for flagging it!

  3. ericbuehl commented on Mar 5, 2026

    @ericbuehl
    >>> import telesign
    /venv/lib/python3.14/site-packages/telesign/__init__.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
    

    setuptools 82 breaks Telesign completely because it no longer contains pkg_resources pypa/setuptools#5174

    while setuptools figures out what to do, Telesign should probably add a version pin for setuptools<81

  4. LanaJ11 commented on Mar 6, 2026

    @LanaJ11

    @ericbuehl Thanks for flagging this! We'll take a look and get back to you as soon as possible.

  5. LanaJ11 commented on Mar 26, 2026

    @LanaJ11

    @ericbuehl Hi! We resolved this in the latest patch release. Thanks for reporting it and feel free to reach out if you’re still experiencing any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions