faststylometry
faststylometry copied to clipboard
Fix Python 3.12 compatibility by upgrading setuptools requirement
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.0to>=66.1.0inpyproject.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