Skip to content

Python 3.10 Migration (3 - Claude Sonnet 4.5)#32

Open
punitarani-hs wants to merge 1 commit intodev/bump-py-3-12from
dev/migration/claude-sonnet-4-5/3
Open

Python 3.10 Migration (3 - Claude Sonnet 4.5)#32
punitarani-hs wants to merge 1 commit intodev/bump-py-3-12from
dev/migration/claude-sonnet-4-5/3

Conversation

@punitarani-hs
Copy link
Collaborator

@punitarani-hs punitarani-hs commented Jan 14, 2026

Greptile Summary

This PR attempts to migrate the project from Python 3.12+ to support Python 3.10+ by reverting version constraints, updating test matrix, and converting StrEnum to str, Enum for the DayOfWeek enum. However, the migration is incomplete: Currency enum in fli/models/google_flights/base.py still uses StrEnum, which will cause import failures on Python 3.10. Additionally, the development container still uses Python 3.12, which is inconsistent with the minimum supported version. The test workflow will fail when running against Python 3.10-3.11.

Confidence Score: 1/5

  • This PR has critical compatibility issues that will cause test failures on Python 3.10 and 3.11 during CI execution.
  • The PR attempts to add Python 3.10 support but leaves StrEnum usage in fli/models/google_flights/base.py, which was only introduced in Python 3.11. This is a breaking change that directly contradicts the declared minimum Python version of 3.10 in pyproject.toml. The test workflow now tests against Python 3.10-3.11, where this import will fail. Additionally, the development container still uses Python 3.12, creating an inconsistency between the minimum supported version and the development environment.
  • fli/models/google_flights/base.py requires immediate attention to change Currency class from StrEnum to str, Enum pattern. The .devcontainer/Dockerfile should also be updated for consistency.

Important Files Changed

Filename Overview
fli/cli/enums.py Changed DayOfWeek from StrEnum to str, Enum to support Python 3.10 (StrEnum was introduced in Python 3.11). This is correct and maintains the same behavior.
pyproject.toml Updated Python version constraints to support Python 3.10+, added classifiers for 3.10 and 3.11, and set Ruff target-version to py310. However, fli/models/google_flights/base.py still uses StrEnum on line 63, which breaks Python 3.10 compatibility.
.github/workflows/test.yml Extended test matrix to include Python 3.10 and 3.11. This is necessary but will fail during CI because fli/models/google_flights/base.py uses StrEnum which is incompatible with Python 3.10.

Sequence Diagram

sequenceDiagram
    participant CI as CI Pipeline
    participant Py310 as Python 3.10
    participant Py311 as Python 3.11
    participant Py312 as Python 3.12
    participant Import as fli import
    participant StrEnum as StrEnum (3.11+)
    participant DayOfWeek as DayOfWeek<br/>(str, Enum)
    participant Currency as Currency<br/>(StrEnum)

    CI->>Py310: Run tests with Python 3.10
    Py310->>Import: Import fli
    Import->>DayOfWeek: Load fli/cli/enums.py ✓
    Import->>Currency: Load fli/models/google_flights/base.py
    Currency->>StrEnum: Attempt StrEnum import ✗
    StrEnum-->>Py310: ImportError: StrEnum not available
    Py310-->>CI: Test fails

    CI->>Py311: Run tests with Python 3.11
    Py311->>Import: Import fli
    Import->>DayOfWeek: Load fli/cli/enums.py ✓
    Import->>Currency: Load fli/models/google_flights/base.py ✓
    Currency->>StrEnum: StrEnum available
    StrEnum-->>Py311: Success
    Py311-->>CI: Test passes

    CI->>Py312: Run tests with Python 3.12
    Py312->>Import: Import fli ✓
    Import-->>CI: All tests pass
Loading

Context used:

  • Context from dashboard - CLAUDE.md (source)

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (3)

  1. fli/models/google_flights/base.py, line 8 (link)

    syntax: StrEnum was introduced in Python 3.11, but pyproject.toml declares requires-python = ">=3.10". This import will fail on Python 3.10. Since fli/cli/enums.py was updated to use str, Enum for DayOfWeek, the same pattern should be applied here for Currency class.

  2. fli/models/google_flights/base.py, line 63 (link)

    syntax: StrEnum is not available in Python 3.10. Update to match the pattern used in fli/cli/enums.py:

  3. .devcontainer/Dockerfile, line 1 (link)

    style: The development container uses Python 3.12, but the project now supports Python 3.10+ (as declared in pyproject.toml). For consistency with the minimum supported version and to catch compatibility issues during local development, consider updating to Python 3.10:

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2026

Test Results

  4 files  +  2    4 suites  +2   11m 10s ⏱️ + 4m 10s
205 tests + 10  195 ✅ ±  0  0 💤 ±0  0 ❌ ±0  10 🔥 +10 
595 runs  +205  585 ✅ +195  0 💤 ±0  0 ❌ ±0  10 🔥 +10 

For more details on these errors, see this check.

Results for commit e3903be. ± Comparison against base commit 3eb4ed6.

♻️ This comment has been updated with latest results.

@punitarani-hs punitarani-hs force-pushed the dev/migration/claude-sonnet-4-5/3 branch from de05a59 to e3903be Compare January 14, 2026 22:28
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@punitarani-hs punitarani-hs force-pushed the dev/migration/claude-sonnet-4-5/3 branch from e3903be to f5027bb Compare January 15, 2026 01:39
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.

1 participant