faststylometry icon indicating copy to clipboard operation
faststylometry copied to clipboard

Fix Python 3.12 compatibility by upgrading setuptools requirement

Open nicklecoder opened this issue 3 months ago • 0 comments

Summary

Fixes #5

This PR resolves the AttributeError: module 'pkgutil' has no attribute 'ImpImporter' error that occurs when installing faststylometry on Python 3.12+.

Root Cause

Python 3.12 removed the deprecated pkgutil.ImpImporter class. The previous setuptools requirement (>=46.4.0) allowed versions that still reference this removed class during the build process, causing installation failures.

Changes

  • Updated setuptools requirement from >=46.4.0 to >=66.1.0 in pyproject.toml

Why 66.1.0?

This is the earliest setuptools version that fixes the pkgutil.ImpImporter issue (setuptools#3685). Using the minimum compatible version provides better backwards compatibility.

Impact

This eliminates the need for the numpy downgrade workaround currently documented in the README (lines 44-64).

Testing

  • ✅ Successfully tested installation on Python 3.12.3 with setuptools 66.1.0
  • ✅ Package builds without errors
  • ✅ Package imports correctly
  • ✅ Basic functionality verified
  • ✅ All dependencies install without errors

🤖 Generated with Claude Code

nicklecoder avatar Oct 07 '25 02:10 nicklecoder