From 9f142f2a8cd33b6d9c188578d5c985cdf36558c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 26 Jan 2025 14:38:46 +0000 Subject: [PATCH 1/3] Update all dependencies --- .github/workflows/ci.yml | 2 +- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c657d2388..be22a0afa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: - 5432:5432 steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Install the latest version of uv uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca # v5 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94b2ccc02..8ab84b3da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,7 +89,7 @@ repos: - urllib3==2.3.0 - zipp==3.21.0 ; python_full_version < '3.10' - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.4 + rev: v0.9.3 hooks: - id: ruff args: [--fix, --unsafe-fixes, --show-fixes] diff --git a/pyproject.toml b/pyproject.toml index ce8240846..c3420b7b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ pg_implem = [ "psycopg[pool]; sys_platform == 'darwin' and platform_machine == 'arm64' and python_version < '3.10'", ] django = [ - "django~=4.2.0; python_version < '3.10'", + "django~=5.1.5; python_version < '3.10'", "django; python_version >= '3.10'", ] test = [ From 8a7e97ee71b7d265826af135cff89fb267bf16c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 Jan 2025 14:38:59 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/acceptance/test_async.py | 6 +++--- tests/unit/contrib/django/test_cli.py | 6 +++--- tests/unit/test_worker.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/test_async.py b/tests/acceptance/test_async.py index 2f0a5c9bc..f7102f8c4 100644 --- a/tests/acceptance/test_async.py +++ b/tests/acceptance/test_async.py @@ -206,9 +206,9 @@ async def appender(a: int): ) duration = time.time() - start_time - assert ( - duration >= 0.5 - ), "processing jobs faster than expected. Is the concurrency respected?" + assert duration >= 0.5, ( + "processing jobs faster than expected. Is the concurrency respected?" + ) assert len(results) == 100, "Unexpected number of job executions" diff --git a/tests/unit/contrib/django/test_cli.py b/tests/unit/contrib/django/test_cli.py index 269d07969..4b366a235 100644 --- a/tests/unit/contrib/django/test_cli.py +++ b/tests/unit/contrib/django/test_cli.py @@ -26,9 +26,9 @@ def test_procrastinate_command(): def assert_no_action_named_args(parser): for action in parser._actions: - assert getattr(action, "dest", "") != ( - "args" - ), f"'args' found in {parser.prog}\n{error}" + assert getattr(action, "dest", "") != ("args"), ( + f"'args' found in {parser.prog}\n{error}" + ) if isinstance(action, argparse._SubParsersAction): for subparser in action.choices.values(): assert_no_action_named_args(subparser) diff --git a/tests/unit/test_worker.py b/tests/unit/test_worker.py index da00e9cb9..3d88d0626 100644 --- a/tests/unit/test_worker.py +++ b/tests/unit/test_worker.py @@ -624,9 +624,9 @@ async def task_func(job_context: JobContext): status = await app.job_manager.get_job_status_async(job_id) assert status == Status.ABORTED - assert ( - worker._job_ids_to_abort == {} - ), "Expected cancelled job id to be removed from set" + assert worker._job_ids_to_abort == {}, ( + "Expected cancelled job id to be removed from set" + ) @pytest.mark.parametrize( From d2231d0a2ff8ec785e09186d8a99b1a160690bd0 Mon Sep 17 00:00:00 2001 From: Joachim Jablon Date: Sun, 26 Jan 2025 15:39:29 +0100 Subject: [PATCH 3/3] Pin Django to <5 for py<3.10 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c3420b7b5..62f36de6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ pg_implem = [ "psycopg[pool]; sys_platform == 'darwin' and platform_machine == 'arm64' and python_version < '3.10'", ] django = [ - "django~=5.1.5; python_version < '3.10'", + "django<5; python_version < '3.10'", "django; python_version >= '3.10'", ] test = [ diff --git a/uv.lock b/uv.lock index f5890df8f..c5e1a5752 100644 --- a/uv.lock +++ b/uv.lock @@ -825,7 +825,7 @@ dev = [ { name = "ruff" }, ] django = [ - { name = "django", marker = "python_full_version < '3.10'", specifier = "~=4.2.0" }, + { name = "django", marker = "python_full_version < '3.10'", specifier = "<5" }, { name = "django", marker = "python_full_version >= '3.10'" }, ] docs = [