Skip to content

Commit

Permalink
Merge branch 'ci-manager-py3.13' into 'master'
Browse files Browse the repository at this point in the history
python: support for the new python 3.13

See merge request knot/knot-resolver!1619
  • Loading branch information
alesmrazek committed Oct 9, 2024
2 parents 64f66e5 + 82323c1 commit d7c34e1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
13 changes: 9 additions & 4 deletions .gitlab-ci.manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ default:
- linux
- amd64

examples:py3.12:
examples:py3.13:
stage: check
script:
- poetry install --only main,dev
- poe examples
variables:
PYTHON_INTERPRETER: python3.12
PYTHON_INTERPRETER: python3.13

lint:py3.12:
lint:py3.13:
stage: check
script:
- poetry install --only main,dev,lint
- poe check
variables:
PYTHON_INTERPRETER: python3.12
PYTHON_INTERPRETER: python3.13

.unit: &unit
stage: check
Expand Down Expand Up @@ -67,3 +67,8 @@ unit:py3.12:
<<: *unit
variables:
PYTHON_INTERPRETER: python3.12

unit:py3.13:
<<: *unit
variables:
PYTHON_INTERPRETER: python3.13
11 changes: 6 additions & 5 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
3.8.19
3.9.19
3.10.14
3.11.9
3.12.4
3.8.20
3.9.20
3.10.15
3.11.10
3.12.6
3.13.0
3 changes: 2 additions & 1 deletion python/knot_resolver/datamodel/types/base_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
from typing import Any, Dict, Pattern, Type
from typing import Any, Dict, Type

from knot_resolver.utils.compat.typing import Pattern
from knot_resolver.utils.modeling import BaseValueType


Expand Down
4 changes: 2 additions & 2 deletions python/knot_resolver/utils/compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import asyncio
from . import asyncio, typing

__all__ = ["asyncio"]
__all__ = ["asyncio", "typing"]
8 changes: 8 additions & 0 deletions python/knot_resolver/utils/compat/typing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The 'typing.Pattern' is deprecated since python 3.8 and is removed in version 3.12.
# https://docs.python.org/3.9/library/typing.html#typing.Pattern
try:
from typing import Pattern
except ImportError:
from re import Pattern

__all__ = ["Pattern"]

0 comments on commit d7c34e1

Please sign in to comment.