From 947216abc010212c8621031433fb79ff9aafe0fd Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:34:37 +0100 Subject: [PATCH] Update `latest_deps` workflow to migrate `poetry --no-dev` -> `--without dev` (#18617) --- .github/workflows/latest_deps.yml | 2 +- changelog.d/18617.misc | 1 + pyproject.toml | 2 +- synapse/util/check_dependencies.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelog.d/18617.misc diff --git a/.github/workflows/latest_deps.yml b/.github/workflows/latest_deps.yml index 702f1a538..0cd654ac7 100644 --- a/.github/workflows/latest_deps.yml +++ b/.github/workflows/latest_deps.yml @@ -60,7 +60,7 @@ jobs: - run: poetry run pip list > before.txt # Upgrade all runtime dependencies only. This is intended to mimic a fresh # `pip install matrix-synapse[all]` as closely as possible. - - run: poetry update --no-dev + - run: poetry update --without dev - run: poetry run pip list > after.txt && (diff -u before.txt after.txt || true) - name: Remove unhelpful options from mypy config run: sed -e '/warn_unused_ignores = True/d' -e '/warn_redundant_casts = True/d' -i mypy.ini diff --git a/changelog.d/18617.misc b/changelog.d/18617.misc new file mode 100644 index 000000000..549ffb2cc --- /dev/null +++ b/changelog.d/18617.misc @@ -0,0 +1 @@ +Unbreak "Latest dependencies" workflow by using the `--without dev` poetry option instead of removed `--no-dev`. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 79b2cf969..3ab936f1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -224,7 +224,7 @@ pydantic = ">=1.7.4, <3" # https://github.com/python-poetry/poetry/issues/6154). Both `pip install` and # `poetry build` do the right thing without this explicit dependency. # -# This isn't really a dev-dependency, as `poetry install --no-dev` will fail, +# This isn't really a dev-dependency, as `poetry install --without dev` will fail, # but the alternative is to add it to the main list of deps where it isn't # needed. setuptools_rust = ">=1.3" diff --git a/synapse/util/check_dependencies.py b/synapse/util/check_dependencies.py index c790c9667..1c79c0be4 100644 --- a/synapse/util/check_dependencies.py +++ b/synapse/util/check_dependencies.py @@ -74,7 +74,7 @@ def _is_dev_dependency(req: Requirement) -> bool: def _should_ignore_runtime_requirement(req: Requirement) -> bool: # This is a build-time dependency. Irritatingly, `poetry build` ignores the # requirements listed in the [build-system] section of pyproject.toml, so in order - # to support `poetry install --no-dev` we have to mark it as a runtime dependency. + # to support `poetry install --without dev` we have to mark it as a runtime dependency. # See discussion on https://github.com/python-poetry/poetry/issues/6154 (it sounds # like the poetry authors don't consider this a bug?) #