Skip to content

Replace modern pkg_resources version lookup#58

Draft
Mirochill wants to merge 1 commit into
gisce:masterfrom
Mirochill:fix-57-importlib-metadata
Draft

Replace modern pkg_resources version lookup#58
Mirochill wants to merge 1 commit into
gisce:masterfrom
Mirochill:fix-57-importlib-metadata

Conversation

@Mirochill
Copy link
Copy Markdown

Summary

  • use importlib.metadata.version() for package version lookup on modern
    Python installations
  • preserve the existing pkg_resources lookup only as a fallback for the
    Python versions that do not provide importlib.metadata
  • add coverage for the exposed package version

Rationale

Importing libcomxml currently imports pkg_resources, which emits a
deprecation warning on current Python/setuptools installations and is no
longer available in newer setuptools releases. The package still advertises
legacy Python compatibility, so this keeps its prior lookup path only where
the standard-library metadata API is unavailable.

Fixes #57

Validation

  • git diff --check HEAD~1..HEAD
  • static inspection of the version lookup and fallback path
  • Not run locally

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.

pkg_resources deprecation

1 participant