Skip to content

Deprecation notice for pkg_resources #645

@pconrad

Description

@pconrad

When importing datascience there is a deprecation notice for a dependency (pkg-resources) that is slated for removal as early as 2025-11-30.

That's concerning for those of us planning to use datascience for Fall courses that will run past 2025-11-30. In the meantime, the error message comes up in PrairieLearn when trying to develop questions for Data 8, and causes all questions that use the datascience library to be flagged with errors.

Is there a road map for replacing this dependency with something supported?

(venv) pconrad@Phillips-MacBook-Air-2 ucsb-cal-scripts % python
Python 3.13.2 (main, Feb  4 2025, 14:51:09) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datascience import Table
/Users/pconrad/github/ucsb-cs/ucsb-cal-scripts/venv/lib/python3.13/site-packages/datascience/maps.py:13: 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.
  import pkg_resources
>>> 

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