Skip to content

Replace pkg_resources with packaging for Python 3.13/3.14 support#127

Open
mike1872ai wants to merge 1 commit intoperiareon:mainfrom
mike1872ai:pkg-resources-to-packaging
Open

Replace pkg_resources with packaging for Python 3.13/3.14 support#127
mike1872ai wants to merge 1 commit intoperiareon:mainfrom
mike1872ai:pkg-resources-to-packaging

Conversation

@mike1872ai
Copy link

@mike1872ai mike1872ai commented Feb 8, 2026

Summary

Migrates all pkg_resources usage to the packaging library, enabling Python 3.13 and 3.14 support. Bumps version to 1.1.0.

Key changes

  • Replaced pkg_resources with packaging across 17 source files and 13 test files (~90 call sites)
    • pkg_resources.Requirement.parse()packaging.requirements.Requirement()
    • pkg_resources.parse_version()packaging.version.Version()
    • .project_name.name, .specs.specifier, version in reqreq.specifier.contains()
  • New EggInfoDistInfo class in containers.py replaces PkgResourcesDistInfo — manually parses PKG-INFO and requires.txt from .egg-info directories
  • Fixed Windows path handling in source.py and extractor.py — normalized paths before comparison to handle mixed separators on Windows 3.13+
  • Deprecated module fixes: distutils.util.get_platform()sysconfig.get_platform(), distutils.core wrapped in try/except, impimportlib fallback
  • CI: Python 3.13 and 3.14 added to test matrix (3 platforms × 6 versions = 18 jobs)
  • Dev tools: Upgraded pylint 3.1→3.3.5, mypy 1.4→1.15, astroid 3.1→3.3.8 for 3.13/3.14 support
  • Minimum Python bumped to 3.9, removed typed-ast and typing_extensions as direct deps
  • Version: 1.0.0 → 1.1.0

Scope

  • 47 files changed, 792 insertions, 850 deletions
  • Zero pkg_resources imports remain in source code

Test plan

  • pytest: 363 passed, 1 skipped (local, Python 3.10)
  • mypy: no issues in 26 source files
  • pylint: 10.00/10
  • black/isort: all files properly formatted
  • CI matrix: 3.9–3.14 × Linux/macOS/Windows
  • Bazel tests

Closes #126

@mike1872ai mike1872ai force-pushed the pkg-resources-to-packaging branch 2 times, most recently from ebabf78 to a4eb0f5 Compare February 9, 2026 01:32
@mike1872ai mike1872ai marked this pull request as ready for review February 9, 2026 03:02
@mike1872ai mike1872ai force-pushed the pkg-resources-to-packaging branch 13 times, most recently from 518fe2a to e1ae108 Compare February 9, 2026 06:27
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@mike1872ai mike1872ai force-pushed the pkg-resources-to-packaging branch from e1ae108 to 0249547 Compare February 9, 2026 06:29
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.

Add python 3.14 support

1 participant