-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Bug Report: Python Version Downgrade for Backwards Compatibility
Describe the bug
The project currently requires Python 3.12+ (requires-python = ">=3.12"
in pyproject.toml), but many users and CI/CD environments are still using Python 3.10. This creates an unnecessary barrier to adoption, as the codebase doesn't actually use any Python 3.11+ or 3.12+ specific features that would prevent it from running on Python 3.10.
To Reproduce
Steps to reproduce the behavior:
- Attempt to install the package on a system with Python 3.10 or 3.11
- Run
pip install codeanalyzer-python
- Observe installation failure due to Python version constraint
- Check
pyproject.toml
and seerequires-python = ">=3.12"
Expected behavior
The package should be installable and functional on Python 3.10+, as all the features used in the codebase are compatible with Python 3.10:
ast.unparse()
- Available since Python 3.9- Built-in generic types (
list[str]
,dict[str, Any]
) - Available since Python 3.9 - All type hints and language features used are Python 3.10 compatible
- All dependencies support Python 3.10+
Logs
# Example error when trying to install on Python 3.10
ERROR: Package 'codeanalyzer-python' requires a different Python: 3.10.x not in '>=3.12'
Analysis
After comprehensive code analysis, no Python 3.11+ or 3.12+ specific features were found:
- ❌ No
ExceptionGroup
usage - ❌ No
TaskGroup
usage - ❌ No
tomllib
usage - ❌ No structural pattern matching (
match
/case
) - ❌ No
Self
type hints - ❌ No Python 3.12+ features
Solution
Update pyproject.toml
to support Python 3.10+:
requires-python = ">=3.10"
Or for exact version compatibility:
requires-python = "==3.10"
Impact
- High: Blocks adoption for users on Python 3.10/3.11
- Medium: Affects CI/CD pipelines using older Python versions
- Low: No code changes required, only configuration update
Additional context
- All major dependencies (Jedi, Pydantic, Rich, Typer, etc.) support Python 3.10+
- The codebase uses modern Python features but nothing that requires 3.12+
- This change would significantly improve backwards compatibility without any functional impact
- Many enterprise environments and CI systems still use Python 3.10 as their standard version
Priority: High (backwards compatibility issue)
Effort: Low (configuration change only)
Risk: Very Low (no code changes needed)