Skip to content

Update Python configuration to 3.14#419

Merged
davideme merged 6 commits intomainfrom
codex/update-python-version-to-314
Feb 23, 2026
Merged

Update Python configuration to 3.14#419
davideme merged 6 commits intomainfrom
codex/update-python-version-to-314

Conversation

@davideme
Copy link
Owner

Summary

  • bump the Python implementation to 3.14 across docs, Dockerfiles, pyproject, lockfile, requirements, workflows, and tool configs
  • refresh Poetry lockfile and generated requirements to target Python 3.14 and adjust linters/formatters accordingly
  • adjust the C# PostgreSQL repository to set CreatedAt/UpdatedAt timestamps in code rather than relying on the database

Testing

  • Not run (not requested)

Copilot AI review requested due to automatic review settings February 23, 2026 15:25
@davideme davideme changed the title Update Python configuration to 3.14 and align EF timestamps Update Python configuration to 3.14 Feb 23, 2026
@davideme davideme force-pushed the codex/update-python-version-to-314 branch from 9b73d81 to 42b334d Compare February 23, 2026 15:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request attempts to upgrade the Python implementation from version 3.12 to 3.14 and modifies the C# PostgreSQL repository to manage timestamp fields (CreatedAt/UpdatedAt) in application code rather than relying on database-generated values.

Changes:

  • Upgrade Python version requirement to 3.14 across all configuration files, Docker images, CI/CD workflows, and tooling
  • Update C# PostgreSQL repository to explicitly set CreatedAt and UpdatedAt timestamps in code
  • Update documentation comments in C# to reflect the change from database-generated to application-managed timestamps

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/python/requirements.txt Updated Python version constraints to 3.14 for all dependencies
src/python/pyproject.toml Updated Python version requirement to 3.14 and tool configurations (Black, Ruff, MyPy)
src/python/poetry.lock Regenerated lockfile for Python 3.14
src/python/README.md Updated minimum Python version requirement to 3.14
src/python/Dockerfile Updated base image and paths to Python 3.14
src/python/.python-version Updated from 3.12.9 to 3.14
src/csharp/LampControlApi/Services/PostgresLampRepository.cs Modified to set CreatedAt/UpdatedAt timestamps explicitly in code
src/csharp/LampControlApi/Infrastructure/Database/LampDbEntity.cs Updated documentation to reflect application-managed timestamps
.github/workflows/python-ci.yml Updated Python version in CI/CD matrix to 3.14

[tool.black]
line-length = 100
target-version = ["py312"]
target-version = ["py314"]
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

Black does not support "py314" as a target version yet, since Python 3.14 hasn't been released. This will cause Black to fail with an invalid target version error. Use "py313" or another supported version.

Suggested change
target-version = ["py314"]
target-version = ["py313"]

Copilot uses AI. Check for mistakes.
[tool.ruff]
line-length = 100
target-version = "py312"
target-version = "py314"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

Ruff does not support "py314" as a target version yet, since Python 3.14 hasn't been released. This will cause Ruff to fail with an invalid target version error. Use "py313" or another supported version.

Suggested change
target-version = "py314"
target-version = "py313"

Copilot uses AI. Check for mistakes.

[tool.mypy]
python_version = "3.12"
python_version = "3.14"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

MyPy does not support Python version "3.14" yet, since this version hasn't been released. This will cause MyPy to fail with an invalid Python version error. Use "3.13" or another supported version.

Copilot uses AI. Check for mistakes.

# Ensure Python can locate third-party packages installed under /usr/local
ENV PYTHONPATH="/usr/local/lib/python3.11/site-packages"
ENV PYTHONPATH="/usr/local/lib/python3.14/site-packages"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The PYTHONPATH references python3.14, but this version does not exist yet. When Python 3.14 is eventually released, ensure this path matches the actual installation directory in the base image. For now, this should be updated to match the actual Python version being used (e.g., python3.13).

Copilot uses AI. Check for mistakes.

# Copy Python packages from build stage
COPY --from=build-env /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=build-env /usr/local/lib/python3.14/site-packages /usr/local/lib/python3.14/site-packages
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The COPY command references python3.14 directories, but this version does not exist yet. This will cause the Docker build to fail because these directories won't exist in the build stage. Update to match the actual Python version being used.

Copilot uses AI. Check for mistakes.
@davideme davideme merged commit df39659 into main Feb 23, 2026
3 checks passed
@davideme davideme deleted the codex/update-python-version-to-314 branch February 23, 2026 17:24
davideme added a commit that referenced this pull request Feb 24, 2026
pydantic-core 2.33.2 used pyo3 0.24.1 which capped Python support at
3.13. After upgrading .python-version to 3.14 in #419, Cloud Build
failed because pydantic-core could not compile its Rust extension.

Upgrade pydantic to ^2.12.0 (pinning pydantic-core to 2.41.5 which
ships pre-built Python 3.14 wheels) so no Rust compilation is needed.
Also update pydantic-settings to ^2.12.0 to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
davideme added a commit that referenced this pull request Feb 24, 2026
…421)

pydantic-core 2.33.2 used pyo3 0.24.1 which capped Python support at
3.13. After upgrading .python-version to 3.14 in #419, Cloud Build
failed because pydantic-core could not compile its Rust extension.

Upgrade pydantic to ^2.12.0 (pinning pydantic-core to 2.41.5 which
ships pre-built Python 3.14 wheels) so no Rust compilation is needed.
Also update pydantic-settings to ^2.12.0 to match.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants