---\nMigrated from CyberAgentAILab/pinjected#55\nOriginally created by @app/devin-ai-integration on null\n\n---\n\n## Overview
Currently, pinjected requires Python 3.10+ due to the use of match-case syntax and ExceptionGroup handling.
Required Changes
To support Python 3.7+, the following changes are needed:
-
Replace match-case syntax with if-elif chains
-
Add compatibility layer for ExceptionGroup in Python versions < 3.11
-
Update dependency constraints for Python version compatibility:
- pandas: 1.3.5+ for Python 3.7.1+, 2.2.3+ for Python 3.9+
- aiosqlite: 0.17.0+ for Python 3.7+, 0.21.0+ for Python 3.9+
- filelock: 3.0.0+ for Python 3.7+, 3.16.1+ for Python 3.8+
- pytest: 7.0.0+ for Python 3.7+, 8.1.1+ for Python 3.8+
- pytest-xdist: 2.5.0+ for Python 3.7+, 3.6.1+ for Python 3.8+
- json-repair: 0.30.0+ for Python 3.7+, 0.35.0+ for Python 3.9+
- openai: 0.28.0+ for Python 3.7+, 1.61.0+ for Python 3.8+
- tiktoken: Optional for Python 3.7+, required for Python 3.8+
- anthropic: Optional for Python 3.7+, required for Python 3.8+
- httpx: 0.23.0+ for Python 3.7+, 0.28.1+ for Python 3.8+
- tenacity: 8.0.0+ for Python 3.7+, 9.0.0+ for Python 3.8+
-
Add compatibility layers for optional dependencies:
- tiktoken_compat.py for token counting
- json_repair compatibility in openai_support
- anthropic client compatibility
Testing
- Add tests for compatibility layers
- Verify functionality across Python 3.7.1+, 3.8+, 3.9+, 3.10+
Documentation
- Update README.md to reflect new Python version requirements
- Update badges to show Python 3.7+ support
---\nMigrated from CyberAgentAILab/pinjected#55\nOriginally created by @app/devin-ai-integration on null\n\n---\n\n## Overview
Currently, pinjected requires Python 3.10+ due to the use of match-case syntax and ExceptionGroup handling.
Required Changes
To support Python 3.7+, the following changes are needed:
Replace match-case syntax with if-elif chains
Add compatibility layer for ExceptionGroup in Python versions < 3.11
Update dependency constraints for Python version compatibility:
Add compatibility layers for optional dependencies:
Testing
Documentation