Skip to content

Commit 09353ee

Browse files
committed
chore: upgrade Python to 3.13
Add support for Python 3.13 JIRA: PSDK-215 risk: low
1 parent de0cf4c commit 09353ee

File tree

25 files changed

+97
-35
lines changed

25 files changed

+97
-35
lines changed

.github/workflows/docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17-
- name: Set up python 3.12
17+
- name: Set up python 3.13
1818
uses: actions/setup-python@v5
1919
with:
2020
python-version-file: '.python-version'

.github/workflows/rw-python-tests.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
if: ${{inputs.changed-python-modules == 'true'}}
1212
strategy:
1313
matrix:
14-
python_version: [py312, py311, py310, py39]
14+
python_version: [py313, py312, py311, py310, py39]
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
TEST_ENVS: ${{ matrix.python_version }}
2323
- name: Upload coverage to Codecov
24-
if: ${{ matrix.python_version == 'py312' }}
24+
if: ${{ matrix.python_version == 'py313' }}
2525
uses: codecov/codecov-action@v3
2626
with:
2727
files: ./gooddata-sdk/coverage.xml,./gooddata-pandas/coverage.xml,./gooddata-fdw/coverage.xml,./gooddata-flight-server/coverage.xml,./gooddata-flexconnect/coverage.xml
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34-
- name: Set up Python 3.12
34+
- name: Set up python 3.13
3535
uses: actions/setup-python@v5
3636
with:
3737
python-version-file: '.python-version'
@@ -50,7 +50,7 @@ jobs:
5050
steps:
5151
- name: Checkout
5252
uses: actions/checkout@v4
53-
- name: Set up Python 3.12
53+
- name: Set up python 3.13
5454
uses: actions/setup-python@v5
5555
with:
5656
python-version-file: '.python-version'

.python-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12.4
1+
3.13.1

.sonar.settings

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# (C) 2021 GoodData Corporation
22
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexconnect
33
sonar.exclusions=gooddata-api-client/**/*
4-
sonar.python.version=3.9, 3.10, 3.11, 3.12
4+
sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13

.sonarcloud.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# (C) 2022 GoodData Corporation
22
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexconnect
33
sonar.exclusions=gooddata-api-client/**/*
4-
sonar.python.version=3.9, 3.10, 3.11, 3.12
4+
sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Getting Started
44

5-
1. Ensure you have at minimum Python 3.12 installed; Python 3.11, 3.10 and 3.9 are optional for multi-environment tests
5+
1. Ensure you have at minimum Python 3.13 installed; Python 3.12, 3.11, 3.10 and 3.9 are optional for multi-environment tests
66

77
This repo uses [tox](https://tox.readthedocs.io/en/latest/) and by default will try to run tests against all
88
supported versions. If you have only subset of supported python interpreters installed, see
@@ -21,7 +21,7 @@
2121
source .venv/bin/activate
2222
```
2323

24-
The `make dev` command will create a new Python 3.12 virtual environment in the `.venv` directory, install all
24+
The `make dev` command will create a new Python 3.13 virtual environment in the `.venv` directory, install all
2525
third party dependencies into it and setup git hooks.
2626

2727
Additionally, if you use [direnv](https://direnv.net/) you can run `direnv allow .envrc` to enable automatic

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ all:
1919
.PHONY: dev
2020
dev:
2121
rm -rf .venv
22-
python3.12 -m venv .venv --upgrade-deps
22+
python3.13 -m venv .venv --upgrade-deps
2323
.venv/bin/pip3 install -r dev-requirements.txt
2424
.venv/bin/pre-commit install
2525

ci_tests.mk

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# (C) 2021 GoodData Corporation
2-
IN_TEST_ENVS = py312,py311,py310,py39
2+
IN_TEST_ENVS = py313,py312,py311,py310,py39
33
ifdef TEST_ENVS
44
IN_TEST_ENVS = $(TEST_ENVS)
55
endif
@@ -51,6 +51,10 @@ test-ci-py311-build: Dockerfile
5151
test-ci-py312-build: Dockerfile
5252
docker build --build-arg "PY_TAG=3.12.6-slim-bookworm" --build-arg "ENV_TAG=py312" -t python-sdk:py312 .
5353

54+
.PHONY: test-ci-py313-build
55+
test-ci-py313-build: Dockerfile
56+
docker build --build-arg "PY_TAG=3.13.1-slim-bookworm" --build-arg "ENV_TAG=py313" -t python-sdk:py313 .
57+
5458
# test-ci target triggers unit tests for each requested environment
5559
.PHONY: test-ci
5660
test-ci: $(TEST_CI_ENVS)

docs/Dockerfile

+30-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,41 @@
1+
FROM python:3.13-slim AS python-stage
2+
3+
COPY . data
4+
5+
WORKDIR data
6+
7+
RUN pip install --no-cache-dir -r scripts/script-requirements.txt
8+
9+
WORKDIR docs
10+
11+
RUN python3 ../scripts/docs/json_builder.py && \
12+
mkdir versioned_docs/latest && \
13+
mv -f data.json versioned_docs/latest && \
14+
python3 ../scripts/docs/python_ref_builder.py api_spec.toml versioned_docs/latest/data.json latest versioned_docs
15+
116
FROM node:20.18.0-bookworm-slim
217

18+
COPY docs docs
19+
20+
COPY --from=python-stage data/docs/versioned_docs/latest/api-reference docs/content/en/latest/api-reference
21+
COPY --from=python-stage data/docs/versioned_docs/latest/pandas docs/content/en/latest/pandas
22+
23+
324
RUN apt-get update && \
425
apt-get install -y git make golang-go curl && \
526
npm install -g [email protected] && \
627
apt-get clean && \
7-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
28+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
29+
mkdir -p docs/versioned_docs/latest
830

9-
COPY docs docs
31+
COPY --from=python-stage data/docs/versioned_docs/latest/links.json docs/versioned_docs/latest
32+
COPY --from=python-stage data/docs/versioned_docs/latest/data.json docs/versioned_docs/latest
33+
34+
COPY docs/content/en/latest/ docs/versioned_docs/latest/
1035

1136
WORKDIR docs
12-
RUN npm install
37+
RUN npm install && \
38+
rm -rf node_modules
1339

1440
# accessible on http://localhost:1313/latest/
15-
ENTRYPOINT ["hugo", "server", "--bind", "0.0.0.0"]
41+
ENTRYPOINT ["hugo", "server", "-e", "dev", "--bind", "0.0.0.0"]

docs/config/dev/config.toml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This config file overrides _default/config.toml
2+
# if hugo builds site for the environment "versioned"
3+
# (hugo -e versioned ...)
4+
5+
# This contentDir is empty dir in Git. It needs to be
6+
# generated by an external script.
7+
contentDir = "versioned_docs"
8+
[Params]
9+
devVersion = "dev"
10+
latestVersion = "1.4"

docs/config/dev/params.toml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Put document versions here for every major or minor release
2+
# Every TOML list item contains the following properties:
3+
# - "version" - text that appears in versions menu
4+
# - "dirpath" - directory name (relative to contentDir) where documentation
5+
# for given version resides
6+
# - "url" - url for link in version menu. May be absolute URL.
7+
# - "latestTag" - docker image tag for the latest patch version. Must be changed
8+
# on every patch release of respective branch
9+
[[versions]]
10+
version = "1.32"
11+
dirpath = "latest"
12+
url = "/latest/"
13+
[[versions]]
14+
version = "1.32"
15+
dirpath = "latest"
16+
url = "/123/"

gooddata-dbt/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"Programming Language :: Python :: 3.10",
4141
"Programming Language :: Python :: 3.11",
4242
"Programming Language :: Python :: 3.12",
43+
"Programming Language :: Python :: 3.13",
4344
"Topic :: Database",
4445
"Topic :: Scientific/Engineering",
4546
"Topic :: Software Development",

gooddata-dbt/tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2023 GoodData Corporation
22
[tox]
3-
envlist = py3{9,10,11,12}
3+
envlist = py3{9,10,11,12,13}
44

55
[testenv]
66
package = wheel
@@ -16,7 +16,7 @@ commands =
1616
pytest -v --cov=gooddata_dbt --cov-report=xml tests {posargs}
1717

1818
[testenv:mypy]
19-
basepython = python3.12
19+
basepython = python3.13
2020
skip_install = true
2121
deps =
2222
-r{toxinidir}/type-requirements.txt

gooddata-fdw/.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "3.12"
12+
python: "3.13"
1313

1414
sphinx:
1515
configuration: gooddata-fdw/docs/conf.py

gooddata-fdw/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"Programming Language :: Python :: 3.10",
3838
"Programming Language :: Python :: 3.11",
3939
"Programming Language :: Python :: 3.12",
40+
"Programming Language :: Python :: 3.13",
4041
"Topic :: Database",
4142
"Topic :: Scientific/Engineering",
4243
"Topic :: Software Development",

gooddata-fdw/tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2021 GoodData Corporation
22
[tox]
3-
envlist = py3{9,10,11,12}
3+
envlist = py3{9,10,11,12,13}
44

55
[testenv]
66
package = wheel
@@ -16,7 +16,7 @@ commands =
1616
pytest -v --cov=gooddata_fdw --cov-report=xml tests {posargs}
1717

1818
[testenv:mypy]
19-
basepython = python3.12
19+
basepython = python3.13
2020
skip_install = true
2121
deps =
2222
-r{toxinidir}/type-requirements.txt
@@ -27,7 +27,7 @@ commands =
2727
mypy gooddata_fdw
2828

2929
[testenv:docs]
30-
basepython = python3.12
30+
basepython = python3.13
3131
skip_install = true
3232
deps =
3333
-r{toxinidir}/docs/requirements.txt

gooddata-flexconnect/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"Programming Language :: Python :: 3.10",
4343
"Programming Language :: Python :: 3.11",
4444
"Programming Language :: Python :: 3.12",
45+
"Programming Language :: Python :: 3.13",
4546
"Topic :: Database",
4647
"Topic :: Scientific/Engineering",
4748
"Topic :: Software Development",

gooddata-flexconnect/tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2024 GoodData Corporation
22
[tox]
3-
envlist = py3{9,10,11,12}
3+
envlist = py3{9,10,11,12,13}
44

55
[testenv]
66
package = wheel
@@ -17,7 +17,7 @@ commands =
1717
pytest -v --cov=gooddata_flexconnect --cov-report=xml tests {posargs}
1818

1919
[testenv:mypy]
20-
basepython = python3.12
20+
basepython = python3.13
2121
skip_install = true
2222
deps =
2323
-r{toxinidir}/type-requirements.txt
@@ -28,7 +28,7 @@ commands =
2828
mypy gooddata_flexconnect
2929

3030
[testenv:docs]
31-
basepython = python3.12
31+
basepython = python3.13
3232
skip_install = true
3333
deps =
3434
-r{toxinidir}/docs/requirements.txt

gooddata-flight-server/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"Programming Language :: Python :: 3.10",
4848
"Programming Language :: Python :: 3.11",
4949
"Programming Language :: Python :: 3.12",
50+
"Programming Language :: Python :: 3.13",
5051
"Topic :: Database",
5152
"Topic :: Scientific/Engineering",
5253
"Topic :: Software Development",

gooddata-flight-server/tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2024 GoodData Corporation
22
[tox]
3-
envlist = py3{9,10,11,12}
3+
envlist = py3{9,10,11,12,13}
44

55
[testenv]
66
package = wheel
@@ -14,15 +14,15 @@ commands =
1414
pytest -v --cov=gooddata_flight_server --cov-report=xml tests {posargs}
1515

1616
[testenv:mypy]
17-
basepython = python3.12
17+
basepython = python3.13
1818
skip_install = true
1919
deps =
2020
-r{toxinidir}/type-requirements.txt
2121
commands =
2222
mypy gooddata_flight_server
2323

2424
[testenv:docs]
25-
basepython = python3.12
25+
basepython = python3.13
2626
skip_install = true
2727
deps =
2828
-r{toxinidir}/docs/requirements.txt

gooddata-pandas/.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "3.12"
12+
python: "3.13"
1313

1414
sphinx:
1515
configuration: gooddata-pandas/docs/conf.py

gooddata-pandas/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"Programming Language :: Python :: 3.10",
3838
"Programming Language :: Python :: 3.11",
3939
"Programming Language :: Python :: 3.12",
40+
"Programming Language :: Python :: 3.13",
4041
"Topic :: Database",
4142
"Topic :: Scientific/Engineering",
4243
"Topic :: Software Development",

gooddata-pandas/tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2021 GoodData Corporation
22
[tox]
3-
envlist = py3{9,10,11,12}
3+
envlist = py3{9,10,11,12,13}
44

55
[testenv]
66
package = wheel
@@ -16,7 +16,7 @@ commands =
1616
pytest -v --cov=gooddata_pandas --cov-report=xml tests {posargs}
1717

1818
[testenv:mypy]
19-
basepython = python3.12
19+
basepython = python3.13
2020
skip_install = true
2121
deps =
2222
-r{toxinidir}/type-requirements.txt
@@ -26,7 +26,7 @@ commands =
2626
mypy gooddata_pandas
2727

2828
[testenv:docs]
29-
basepython = python3.12
29+
basepython = python3.13
3030
skip_install = true
3131
deps =
3232
-r{toxinidir}/docs/requirements.txt

gooddata-sdk/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"Programming Language :: Python :: 3.10",
4848
"Programming Language :: Python :: 3.11",
4949
"Programming Language :: Python :: 3.12",
50+
"Programming Language :: Python :: 3.13",
5051
"Topic :: Database",
5152
"Topic :: Scientific/Engineering",
5253
"Topic :: Software Development",

gooddata-sdk/tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (C) 2021 GoodData Corporation
22
[tox]
3-
envlist = py3{9,10,11,12}
3+
envlist = py3{9,10,11,12,13}
44

55
[testenv]
66
package = wheel
@@ -15,7 +15,7 @@ commands =
1515
pytest -v --cov=gooddata_sdk --cov-report=xml tests {posargs}
1616

1717
[testenv:mypy]
18-
basepython = python3.12
18+
basepython = python3.13
1919
skip_install = true
2020
deps =
2121
-r{toxinidir}/type-requirements.txt
@@ -24,7 +24,7 @@ commands =
2424
mypy gooddata_sdk
2525

2626
[testenv:docs]
27-
basepython = python3.12
27+
basepython = python3.13
2828
skip_install = true
2929
setenv =
3030
CWD_TO_ROOT_RELATIVE = ".."

0 commit comments

Comments
 (0)