Skip to content

Commit 0c15edb

Browse files
authored
Updated python to version 3.13. (#432)
* Updated python to version 3.13. * Fixed lock. * Fixed linting errors.
1 parent f972439 commit 0c15edb

10 files changed

Lines changed: 578 additions & 429 deletions

File tree

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Docker
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
68
- "v*.*.*"
79
pull_request:
@@ -25,6 +27,7 @@ jobs:
2527
images: |
2628
ghcr.io/srtab/daiv
2729
tags: |
30+
type=ref,event=branch
2831
type=semver,pattern={{version}}
2932
type=semver,pattern={{major}}.{{minor}}
3033
flavor: |

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12.7
1+
3.13.5

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Added support to `o3` model from OpenAI.
13+
- Added build and push docker image to `main` branch to allow testing edge versions of the project.
1314

1415
### Changed
1516

@@ -19,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1920
- Improved `PipelineFixerAgent` to ensure the `troubleshoot_analysis_result` (renamed to `complete_task`) tool is called exactly once at the end of the workflow.
2021
- Improved `PipelineFixerAgent` troubleshooting details to include more context about the issue.
2122
- `ReviewAddressorAgent` now will only accept reviews for merge requests that have DAIV mentions on the discussion thread.
23+
- Updated MCP `@sentry/mcp-server` to `0.12.0` version.
24+
- Updated base python image to `3.13.5`.
2225

2326
### Fixed
2427

daiv/automation/tools/mcp/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MCPSettings(BaseSettings):
1919
# Sentry MCP server
2020
SENTRY_ENABLED: bool = Field(default=True, description="Whether to enable the Sentry MCP server")
2121
SENTRY_VERSION: str = Field(
22-
default="0.11.0",
22+
default="0.12.0",
2323
description="The version of the Sentry MCP server: https://www.npmjs.com/package/@sentry/mcp-server",
2424
)
2525
SENTRY_ACCESS_TOKEN: SecretStr | None = Field(default=None, description="The access token to the Sentry MCP server")

daiv/chat/api/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def extract_text_from_event_data(event_data: StreamEvent) -> str:
3939

4040
async def generate_stream(
4141
codebase_chat: CompiledGraph, input_data: dict, model_id: str, config: RunnableConfig
42-
) -> AsyncGenerator[str, None]:
42+
) -> AsyncGenerator[str]:
4343
"""
4444
Generate a stream of chat completion events.
4545

daiv/codebase/clients.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def set_repository_webhooks(
8686
pass
8787

8888
@abc.abstractmethod
89-
def get_merge_request_diff(self, repo_id: str, merge_request_id: int) -> Generator[MergeRequestDiff, None, None]:
89+
def get_merge_request_diff(self, repo_id: str, merge_request_id: int) -> Generator[MergeRequestDiff]:
9090
pass
9191

9292
@abc.abstractmethod
@@ -465,7 +465,7 @@ def get_merge_request(self, repo_id: str, merge_request_id: int) -> MergeRequest
465465
sha=mr.sha,
466466
)
467467

468-
def get_merge_request_diff(self, repo_id: str, merge_request_id: int) -> Generator[MergeRequestDiff, None, None]:
468+
def get_merge_request_diff(self, repo_id: str, merge_request_id: int) -> Generator[MergeRequestDiff]:
469469
"""
470470
Get the latest diff of a merge request.
471471
https://docs.gitlab.com/ee/administration/instance_limits.html#diff-limits

docker/local/app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12.7-slim-bookworm
1+
FROM python:3.13.5-slim-bookworm
22

33
LABEL maintainer="srtabs@gmail.com"
44

docker/production/app/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#########################################################################################################
22
# Python compile image
33
#########################################################################################################
4-
FROM python:3.12.7-slim-bookworm AS app-compiler
4+
FROM python:3.13.5-slim-bookworm AS app-compiler
55

66
ENV PYTHONUNBUFFERED=1
77

@@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
3131
#########################################################################################################
3232
# Python build image
3333
#########################################################################################################
34-
FROM python:3.12.7-slim-bookworm AS python-builder
34+
FROM python:3.13.5-slim-bookworm AS python-builder
3535

3636
LABEL maintainer="srtabs@gmail.com"
3737

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ maintainers = [
1010
authors = [
1111
{ name = "Sandro Rodrigues", email = "srtabs@gmail.com" },
1212
]
13-
requires-python = ">=3.12,<3.13"
13+
requires-python = ">=3.13,<3.14"
1414
classifiers = [
1515
"Programming Language :: Python :: 3 :: Only",
16-
"Programming Language :: Python :: 3.12",
16+
"Programming Language :: Python :: 3.13",
1717
]
1818
dependencies = [
1919
"celery[redis]==5.5.3",
@@ -84,7 +84,6 @@ docs = [
8484
]
8585

8686
[tool.ruff]
87-
target-version = "py312"
8887
line-length = 120
8988
extend-exclude = [ "*/node_modules/*", "*/static/*" ]
9089
force-exclude = true
@@ -168,7 +167,7 @@ CODEBASE_GITLAB_WEBHOOK_SECRET = "gitlab-webhook-secret"
168167
NINJA_SKIP_REGISTRY = true
169168

170169
[tool.mypy]
171-
python_version = "3.12"
170+
python_version = "3.13"
172171
check_untyped_defs = true
173172

174173
[[tool.mypy.overrides]]

uv.lock

Lines changed: 561 additions & 417 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)