diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index 9732ed5509..770b65ff5e 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c7749051e9..021de88e01 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,7 +25,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: 3.13 - uses: astral-sh/setup-uv@v5 - run: uv pip install --upgrade setuptools_scm twine --system diff --git a/.github/workflows/plugin_tests.yaml b/.github/workflows/plugin_tests.yaml index ca67cf1c95..63ea1f3ff6 100644 --- a/.github/workflows/plugin_tests.yaml +++ b/.github/workflows/plugin_tests.yaml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - pyv: ["3.12"] + pyv: ["3.13"] plugin: ["dvc-s3"] steps: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 273c72cf37..2ae28c7506 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,7 +32,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - uses: astral-sh/setup-uv@v5 with: enable-cache: true @@ -55,7 +55,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - pyv: ["3.9", "3.10", "3.11", "3.12"] + pyv: ["3.9", "3.10", "3.11", "3.12", "3.13"] include: - os: windows-latest pyv: "3.9" diff --git a/pyproject.toml b/pyproject.toml index 680794c8e4..37cdeb234b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dynamic = ["version"] @@ -172,6 +173,8 @@ filterwarnings = [ "ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning", # see https://github.com/networkx/networkx/issues/5723. "ignore:nx.nx_pydot.* depends on the pydot package, which has.*known issues and is not actively maintained:DeprecationWarning", + # TODO: investigate where we are not closing sqlite3.Connection + "ignore:unclosed database.*sqlite3.Connection:ResourceWarning", ] log_level = "debug" markers = [ diff --git a/tests/unit/test_logger.py b/tests/unit/test_logger.py index d7bad94894..d478f1c5e1 100644 --- a/tests/unit/test_logger.py +++ b/tests/unit/test_logger.py @@ -1,7 +1,5 @@ import logging -import time import traceback -from datetime import datetime import colorama import pytest @@ -22,11 +20,9 @@ @pytest.fixture def dt(mocker): - mocker.patch( - "time.time", - return_value=time.mktime(datetime(2020, 2, 2).timetuple()), # noqa: DTZ001 - ) - return "2020-02-02 00:00:00,000" + dt_str = "2020-02-02 00:00:00,000" + mocker.patch.object(formatter, "formatTime", return_value=dt_str) + return dt_str class TestColorFormatter: diff --git a/tests/unit/ui/test_pager.py b/tests/unit/ui/test_pager.py index 48b71a66b8..90928a7cf2 100644 --- a/tests/unit/ui/test_pager.py +++ b/tests/unit/ui/test_pager.py @@ -1,3 +1,5 @@ +from pydoc import plainpager + import pytest from dvc.env import DVC_PAGER @@ -70,8 +72,8 @@ def test_dvc_sets_some_options_on_less_if_less_env_defined(mocker, monkeypatch, assert find_pager() == "less --RAW-CONTROL-CHARS --chop-long-lines" -def test_make_pager_when_no_pager_found(mocker, monkeypatch): - assert make_pager(None).__name__ == "plainpager" +def test_make_pager_when_no_pager_found(): + assert make_pager(None) is plainpager def test_pager(mocker, monkeypatch):