Skip to content

Commit 9cbb4dd

Browse files
committed
make terracotta compatible with python 3.13
1 parent 92ae7cd commit 9cbb4dd

File tree

9 files changed

+11
-9
lines changed

9 files changed

+11
-9
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
matrix:
2626
os: [ubuntu-latest]
27-
python-version: ["3.9", "3.12"]
27+
python-version: ["3.9", "3.13"]
2828

2929
defaults:
3030
run:

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12.2-slim-bullseye AS build_wheel
1+
FROM python:3.13.3-slim-bullseye AS build_wheel
22

33
RUN apt-get update \
44
&& apt-get install \
@@ -15,7 +15,7 @@ RUN python -m pip install --upgrade pip \
1515
&& python setup.py bdist_wheel
1616

1717

18-
FROM python:3.12.2-slim-bullseye
18+
FROM python:3.13.3-slim-bullseye
1919

2020
COPY --from=build_wheel /terracotta/dist/*.whl /terracotta/
2121

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ filterwarnings =
1919
ignore:numpy.dtype size changed:RuntimeWarning
2020
ignore:numpy.ufunc size changed:RuntimeWarning
2121
# sometimes, dependencies leak resources
22-
ignore:.*socket\.socket.*:pytest.PytestUnraisableExceptionWarning
22+
ignore::pytest.PytestUnraisableExceptionWarning
23+
ignore:.*socket\.socket.*
2324

2425
[mypy]
2526
show_error_codes = True

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"Programming Language :: Python :: 3.10",
4040
"Programming Language :: Python :: 3.11",
4141
"Programming Language :: Python :: 3.12",
42+
"Programming Language :: Python :: 3.13",
4243
"Framework :: Flask",
4344
"Operating System :: Microsoft :: Windows :: Windows 10",
4445
"Operating System :: MacOS :: MacOS X",

terracotta/drivers/mysql_meta_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MySQLMetaStore(RelationalMetaStore):
3333
SQL_TIMEOUT_KEY = "connect_timeout"
3434

3535
_CHARSET = "utf8mb4"
36-
SQLA_STRING = functools.partial(VARCHAR, charset=_CHARSET)
36+
SQLA_STRING = staticmethod(functools.partial(VARCHAR, charset=_CHARSET))
3737

3838
MAX_PRIMARY_KEY_SIZE = 767 // 4 # Max key length for MySQL is at least 767B
3939
DEFAULT_PORT = 3306

terracotta/handlers/compute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from typing import Sequence, Tuple, Mapping, Optional, TypeVar
7-
from typing.io import BinaryIO
7+
from typing import BinaryIO
88
from concurrent.futures import Future
99

1010
from terracotta import get_settings, get_driver, image, xyz, exceptions

terracotta/handlers/rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from typing import Sequence, Tuple, Optional, TypeVar
7-
from typing.io import BinaryIO
7+
from typing import BinaryIO
88
from concurrent.futures import Future
99

1010
from terracotta import get_settings, get_driver, image, xyz, exceptions

terracotta/handlers/singleband.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from typing import Sequence, Mapping, Union, Tuple, Optional, TypeVar, cast
7-
from typing.io import BinaryIO
7+
from typing import BinaryIO
88

99
import collections
1010

terracotta/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from typing import List, Sequence, Tuple, TypeVar, Union
7-
from typing.io import BinaryIO
7+
from typing import BinaryIO
88

99
from io import BytesIO
1010

0 commit comments

Comments
 (0)