Skip to content

Commit b857f67

Browse files
committed
Python 3.14 changes
1 parent b951973 commit b857f67

8 files changed

Lines changed: 39 additions & 21 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
fail-fast: false
4444
matrix:
4545
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
46-
python-version: ['3.10', '3.11', '3.12', '3.13']
46+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
4747

4848
steps:
4949
- uses: actions/checkout@v6
@@ -60,9 +60,16 @@ jobs:
6060
sudo apt-get install graphviz graphviz-dev
6161
6262
- name: Run tests, doctests, and notebook tests
63+
if: matrix.os != 'windows-latest' || matrix.python-version != '3.14'
6364
shell: bash -l {0}
6465
run: just test-cov
6566

67+
# pywin32 has no wheels for Python 3.14 yet, so skip notebook tests
68+
- name: Run tests without notebook tests (Windows + Python 3.14)
69+
if: matrix.os == 'windows-latest' && matrix.python-version == '3.14'
70+
shell: bash -l {0}
71+
run: uv run --group test pytest --cov=src --cov=tests --cov-report=xml -n auto
72+
6673
- name: Upload test coverage reports to Codecov with GitHub Action
6774
uses: codecov/codecov-action@v5
6875

@@ -71,5 +78,5 @@ jobs:
7178
run: just test-lowest
7279

7380
- name: Run tests with highest resolution
74-
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
81+
if: matrix.python-version == '3.14' && matrix.os == 'ubuntu-latest'
7582
run: just test-highest

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.14

.readthedocs.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
version: 2
22

3+
sphinx:
4+
configuration: docs/source/conf.py
5+
fail_on_warning: true
6+
37
build:
48
os: ubuntu-24.04
59
tools:
6-
python: "3.12"
10+
python: "3.13"
711
jobs:
8-
create_environment:
9-
- asdf plugin add uv
10-
- asdf install uv latest
11-
- asdf global uv latest
12-
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs
13-
install:
14-
- "true"
15-
16-
sphinx:
17-
configuration: docs/source/conf.py
18-
fail_on_warning: true
12+
pre_create_environment:
13+
- asdf plugin add uv
14+
- asdf install uv latest
15+
- asdf global uv latest
16+
create_environment:
17+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
18+
install:
19+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
3030
- {pull}`706` disables syntax highlighting for platform version information in session header.
3131
- {pull}`707` drops support for Python 3.9 as it has reached end of life.
3232
- {pull}`708` updates mypy and fixes type issues.
33-
- {pull}`709` add uv pre-commit check.
33+
- {pull}`709` adds uv pre-commit check.
34+
- {pull}`710` adds support for Python 3.14.
3435
- {pull}`713` removes uv as a test dependency. Closes {issue}`712`. Thanks to {user}`erooke`!
3536
- {pull}`718` fixes {issue}`717` by properly parsing the `pdbcls` configuration option from config files. Thanks to {user}`MImmesberger` for the report!
3637
- {pull}`719` fixes repeated tasks with the same function name in the programmatic interface to ensure all tasks execute correctly.

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ test-lowest:
3535

3636
# Run tests with highest dependency resolution (like CI)
3737
test-highest:
38-
uv run --python 3.13 --group test --resolution highest pytest --nbmake -n auto
38+
uv run --python 3.14 --group test --resolution highest pytest --nbmake -n auto

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ classifiers = [
1515
"Programming Language :: Python :: 3.11",
1616
"Programming Language :: Python :: 3.12",
1717
"Programming Language :: Python :: 3.13",
18+
"Programming Language :: Python :: 3.14",
1819
"Topic :: Scientific/Engineering",
1920
"Topic :: Software Development :: Build Tools",
2021
]
@@ -65,7 +66,8 @@ plugin-list = ["httpx>=0.27.0", "tabulate[widechars]>=0.9.0", "tqdm>=4.66.3"]
6566
test = [
6667
"cloudpickle>=3.0.0",
6768
"deepdiff>=7.0.0",
68-
"nbmake>=1.5.5",
69+
# nbmake requires pywin32 on Windows, which has no wheels for Python 3.14 yet
70+
"nbmake>=1.5.5; platform_system != 'Windows' or python_version < '3.14'",
6971
"pygments>=2.18.0",
7072
"pexpect>=4.9.0",
7173
"pytest>=8.4.0",
@@ -165,6 +167,7 @@ markers = [
165167
filterwarnings = [
166168
"ignore:'@pytask.mark.*. is deprecated:FutureWarning",
167169
"ignore:The --rsyncdir command line argument:DeprecationWarning",
170+
"ignore:'asyncio\\..*' is deprecated:DeprecationWarning",
168171
]
169172

170173
[tool.ty.rules]

tests/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111

1212
import pytest
1313
from click.testing import CliRunner
14-
from nbmake.pytest_items import NotebookItem
1514
from packaging import version
1615

16+
try:
17+
from nbmake.pytest_items import NotebookItem
18+
except ImportError:
19+
NotebookItem = None
20+
1721
from pytask import console
1822
from pytask import storage
1923

@@ -143,6 +147,8 @@ def run_in_subprocess(cmd: tuple[str, ...], cwd: Path | None = None) -> Result:
143147

144148
def pytest_collection_modifyitems(session, config, items) -> None: # noqa: ARG001
145149
"""Add markers to Jupyter notebook tests."""
150+
if NotebookItem is None:
151+
return
146152
for item in items:
147153
if isinstance(item, NotebookItem):
148154
item.add_marker(pytest.mark.xfail(reason="The tests are flaky."))

uv.lock

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

0 commit comments

Comments
 (0)