Skip to content

Conversation

m-awais-khan
Copy link

@m-awais-khan m-awais-khan commented Sep 9, 2025

Motivation

Currently, running manimgl on Python 3.13+ produces a warning:

UserWarning: pkg_resources is deprecated as an API...

This happens because manimlib/__init__.py imports pkg_resources only to retrieve the package version.
Since pkg_resources is deprecated and scheduled for removal after 2025-11-30, this will eventually break ManimGL.

Proposed changes

  • Removed the dependency on pkg_resources in manimlib/__init__.py.
  • Replaced it with importlib.metadata, the recommended standard library API (Python ≥3.8).
  • Added a fallback for when the package version cannot be determined.

Test

Code:

manimgl

Result:

ManimGL v1.7.2

No deprecation warning is shown, and the version is still correctly displayed.

Closes #2388

@azhuchkov
Copy link

Looks similar to #2360.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warning: pkg_resources is deprecated, replace with importlib.metadata
2 participants