From 0363d742a01a0a2023ba5008a4fa7b15c66cc3bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 02:41:08 +0000 Subject: [PATCH 1/4] Bump the required group across 1 directory with 18 updates Bumps the required group with 18 updates in the / directory: | Package | From | To | | --- | --- | --- | | [flake8](https://github.com/pycqa/flake8) | `7.1.0` | `7.1.1` | | [pydoclint](https://github.com/jsh9/pydoclint) | `0.5.3` | `0.5.9` | | [black](https://github.com/psf/black) | `24.4.2` | `24.8.0` | | [markdown](https://github.com/Python-Markdown/markdown) | `3.6.0` | `3.7` | | [mike](https://github.com/jimporter/mike) | `2.1.2` | `2.1.3` | | [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) | `1.0.5` | `1.2.0` | | [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.27` | `9.5.39` | | [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings) | `0.25.1` | `0.26.1` | | [mkdocstrings-python](https://github.com/mkdocstrings/python) | `1.10.5` | `1.11.1` | | [frequenz-repo-config[lib]](https://github.com/frequenz-floss/frequenz-repo-config-python) | `0.9.2` | `0.10.0` | | [mypy](https://github.com/python/mypy) | `1.10.1` | `1.11.2` | | [types-markdown](https://github.com/python/typeshed) | `3.6.0.20240316` | `3.7.0.20240822` | | [pytest](https://github.com/pytest-dev/pytest) | `8.2.2` | `8.3.3` | | [pylint](https://github.com/pylint-dev/pylint) | `3.2.5` | `3.3.1` | | [frequenz-repo-config[extra-lint-examples]](https://github.com/frequenz-floss/frequenz-repo-config-python) | `0.9.2` | `0.10.0` | | [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) | `0.23.7` | `0.24.0` | | [async-solipsism](https://github.com/bmerry/async-solipsism) | `0.6` | `0.7` | | [hypothesis](https://github.com/HypothesisWorks/hypothesis) | `6.104.2` | `6.112.2` | Updates `flake8` from 7.1.0 to 7.1.1 - [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1) Updates `pydoclint` from 0.5.3 to 0.5.9 - [Release notes](https://github.com/jsh9/pydoclint/releases) - [Changelog](https://github.com/jsh9/pydoclint/blob/main/CHANGELOG.md) - [Commits](https://github.com/jsh9/pydoclint/compare/0.5.3...0.5.9) Updates `black` from 24.4.2 to 24.8.0 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0) Updates `markdown` from 3.6.0 to 3.7 - [Release notes](https://github.com/Python-Markdown/markdown/releases) - [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md) - [Commits](https://github.com/Python-Markdown/markdown/compare/3.6...3.7) Updates `mike` from 2.1.2 to 2.1.3 - [Release notes](https://github.com/jimporter/mike/releases) - [Changelog](https://github.com/jimporter/mike/blob/master/CHANGES.md) - [Commits](https://github.com/jimporter/mike/compare/v2.1.2...v2.1.3) Updates `mkdocs-macros-plugin` from 1.0.5 to 1.2.0 - [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases) - [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.0.5...v1.2.0) Updates `mkdocs-material` from 9.5.27 to 9.5.39 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.27...9.5.39) Updates `mkdocstrings[python]` from 0.25.1 to 0.26.1 - [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases) - [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md) - [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.25.1...0.26.1) Updates `mkdocstrings-python` from 1.10.5 to 1.11.1 - [Release notes](https://github.com/mkdocstrings/python/releases) - [Changelog](https://github.com/mkdocstrings/python/blob/main/CHANGELOG.md) - [Commits](https://github.com/mkdocstrings/python/compare/1.10.5...1.11.1) Updates `frequenz-repo-config[lib]` from 0.9.2 to 0.10.0 - [Release notes](https://github.com/frequenz-floss/frequenz-repo-config-python/releases) - [Changelog](https://github.com/frequenz-floss/frequenz-repo-config-python/blob/v0.10.0/RELEASE_NOTES.md) - [Commits](https://github.com/frequenz-floss/frequenz-repo-config-python/compare/v0.9.2...v0.10.0) Updates `mypy` from 1.10.1 to 1.11.2 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.1...v1.11.2) Updates `types-markdown` from 3.6.0.20240316 to 3.7.0.20240822 - [Commits](https://github.com/python/typeshed/commits) Updates `pytest` from 8.2.2 to 8.3.3 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.3) Updates `pylint` from 3.2.5 to 3.3.1 - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.5...v3.3.1) Updates `frequenz-repo-config[extra-lint-examples]` from 0.9.2 to 0.10.0 - [Release notes](https://github.com/frequenz-floss/frequenz-repo-config-python/releases) - [Changelog](https://github.com/frequenz-floss/frequenz-repo-config-python/blob/v0.10.0/RELEASE_NOTES.md) - [Commits](https://github.com/frequenz-floss/frequenz-repo-config-python/compare/v0.9.2...v0.10.0) Updates `pytest-asyncio` from 0.23.7 to 0.24.0 - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.23.7...v0.24.0) Updates `async-solipsism` from 0.6 to 0.7 - [Commits](https://github.com/bmerry/async-solipsism/commits) Updates `hypothesis` from 6.104.2 to 6.112.2 - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.104.2...hypothesis-python-6.112.2) --- updated-dependencies: - dependency-name: flake8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: required - dependency-name: pydoclint dependency-type: direct:production update-type: version-update:semver-patch dependency-group: required - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: markdown dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: mike dependency-type: direct:production update-type: version-update:semver-patch dependency-group: required - dependency-name: mkdocs-macros-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch dependency-group: required - dependency-name: mkdocstrings[python] dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: mkdocstrings-python dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: frequenz-repo-config[lib] dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: types-markdown dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: frequenz-repo-config[extra-lint-examples] dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: pytest-asyncio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: async-solipsism dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required - dependency-name: hypothesis dependency-type: direct:production update-type: version-update:semver-minor dependency-group: required ... Signed-off-by: dependabot[bot] --- pyproject.toml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d08a45e..e96295a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = [ "setuptools == 68.1.0", "setuptools_scm[toml] == 7.1.0", - "frequenz-repo-config[lib] == 0.9.2", + "frequenz-repo-config[lib] == 0.10.0", ] build-backend = "setuptools.build_meta" @@ -46,45 +46,45 @@ email = "floss@frequenz.com" [project.optional-dependencies] dev-flake8 = [ - "flake8 == 7.1.0", + "flake8 == 7.1.1", "flake8-docstrings == 1.7.0", "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml - "pydoclint == 0.5.3", + "pydoclint == 0.5.9", "pydocstyle == 6.3.0", ] -dev-formatting = ["black == 24.4.2", "isort == 5.13.2"] +dev-formatting = ["black == 24.8.0", "isort == 5.13.2"] dev-mkdocs = [ - "Markdown == 3.6.0", - "black == 24.4.2", - "mike == 2.1.2", + "Markdown == 3.7", + "black == 24.8.0", + "mike == 2.1.3", "mkdocs-gen-files == 0.5.0", "mkdocs-literate-nav == 0.6.1", - "mkdocs-macros-plugin == 1.0.5", - "mkdocs-material == 9.5.27", - "mkdocstrings[python] == 0.25.1", - "mkdocstrings-python == 1.10.5", - "frequenz-repo-config[lib] == 0.9.2", + "mkdocs-macros-plugin == 1.2.0", + "mkdocs-material == 9.5.39", + "mkdocstrings[python] == 0.26.1", + "mkdocstrings-python == 1.11.1", + "frequenz-repo-config[lib] == 0.10.0", ] dev-mypy = [ - "mypy == 1.10.1", - "types-Markdown == 3.6.0.20240316", + "mypy == 1.11.2", + "types-Markdown == 3.7.0.20240822", # For checking the noxfile, docs/ script, and tests "frequenz-core[dev-mkdocs,dev-noxfile,dev-pytest]", ] -dev-noxfile = ["nox == 2024.4.15", "frequenz-repo-config[lib] == 0.9.2"] +dev-noxfile = ["nox == 2024.4.15", "frequenz-repo-config[lib] == 0.10.0"] dev-pylint = [ # dev-pytest already defines a dependency to pylint because of the examples # For checking the noxfile, docs/ script, and tests "frequenz-core[dev-mkdocs,dev-noxfile,dev-pytest]", ] dev-pytest = [ - "pytest == 8.2.2", - "pylint == 3.2.5", # We need this to check for the examples - "frequenz-repo-config[extra-lint-examples] == 0.9.2", + "pytest == 8.3.3", + "pylint == 3.3.1", # We need this to check for the examples + "frequenz-repo-config[extra-lint-examples] == 0.10.0", "pytest-mock == 3.14.0", - "pytest-asyncio == 0.23.7", - "async-solipsism == 0.6", - "hypothesis == 6.104.2", + "pytest-asyncio == 0.24.0", + "async-solipsism == 0.7", + "hypothesis == 6.112.2", ] dev = [ "frequenz-core[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]", From b3639597781fd2e90da4a59b8d2d13895d3c35b2 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 11 Oct 2024 16:05:47 +0200 Subject: [PATCH 2/4] Ignore false positives for pydoclint check DOC503 Signed-off-by: Leandro Lucarella --- src/frequenz/core/asyncio/_service.py | 4 +++- src/frequenz/core/asyncio/_task_group.py | 4 +++- src/frequenz/core/typing.py | 8 ++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/frequenz/core/asyncio/_service.py b/src/frequenz/core/asyncio/_service.py index 503b715..c7d4569 100644 --- a/src/frequenz/core/asyncio/_service.py +++ b/src/frequenz/core/asyncio/_service.py @@ -327,8 +327,10 @@ def cancel(self, msg: str | None = None) -> None: self._main_task.cancel(msg) self._task_group.cancel(msg) + # We need to use noqa here because pydoclint can't figure out that rest is actually + # an instance of BaseExceptionGroup. @override - async def stop(self, msg: str | None = None) -> None: + async def stop(self, msg: str | None = None) -> None: # noqa: DOC503 """Stop this service. This method cancels all running tasks spawned by this service and waits for them diff --git a/src/frequenz/core/asyncio/_task_group.py b/src/frequenz/core/asyncio/_task_group.py index 10398e8..26769ef 100644 --- a/src/frequenz/core/asyncio/_task_group.py +++ b/src/frequenz/core/asyncio/_task_group.py @@ -227,7 +227,9 @@ def cancel(self, msg: str | None = None) -> None: for task in self._running: task.cancel(msg) - async def stop(self, msg: str | None = None) -> None: + # We need to use noqa here because pydoclint can't figure out that rest is actually + # an instance of BaseExceptionGroup. + async def stop(self, msg: str | None = None) -> None: # noqa: DOC503 """Stop this task group. This method cancels all running tasks spawned by this group and waits for them diff --git a/src/frequenz/core/typing.py b/src/frequenz/core/typing.py index 201b057..9a8d0d6 100644 --- a/src/frequenz/core/typing.py +++ b/src/frequenz/core/typing.py @@ -137,7 +137,9 @@ def decorator(inner_cls: TypeT) -> TypeT: class _NoInitConstructibleMeta(type): """A metaclass that disables the __init__ constructor.""" - def __new__( + # We need to use noqa here because pydoclint can't figure out that + # _get_no_init_constructible_error() returns a TypeError. + def __new__( # noqa: DOC503 mcs, name: str, bases: tuple[type, ...], @@ -173,7 +175,9 @@ def __init__( super().__init__(name, bases, namespace) cls._no_init_constructible_error = kwargs.get("no_init_constructible_error") - def __call__(cls, *args: Any, **kwargs: Any) -> NoReturn: + # We need to use noqa here because pydoclint can't figure out that + # _get_no_init_constructible_error() returns a TypeError. + def __call__(cls, *args: Any, **kwargs: Any) -> NoReturn: # noqa: DOC503 """Raise an error when the __init__ constructor is called. Args: From b13f8c7b3929656f97a53fcdd9efb96dcfd0b048 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 11 Oct 2024 16:06:36 +0200 Subject: [PATCH 3/4] Disable warning about too many positional arguments in tests Signed-off-by: Leandro Lucarella --- tests/math/test_interval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/math/test_interval.py b/tests/math/test_interval.py index f81cf5a..7cc2097 100644 --- a/tests/math/test_interval.py +++ b/tests/math/test_interval.py @@ -64,7 +64,7 @@ def test_invalid_range(start: LessThanComparable, end: LessThanComparable) -> No ), ], ) -def test_contains( # pylint: disable=too-many-arguments +def test_contains( # pylint: disable=too-many-arguments,too-many-positional-arguments start: LessThanComparable, end: LessThanComparable, within: LessThanComparable, From 080209864574b85d4503cf09c7867c475f693e63 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 11 Oct 2024 16:10:46 +0200 Subject: [PATCH 4/4] Adjust files to the updated templates in repo-config v0.10.0 Signed-off-by: Leandro Lucarella --- .github/workflows/ci.yaml | 28 ++++++++++++++++++++++------ pyproject.toml | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eaaf075..38b4f22 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Print environment (debug) run: env @@ -119,6 +122,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 with: @@ -219,6 +225,9 @@ jobs: name: Build distribution packages runs-on: ubuntu-20.04 steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 with: @@ -251,17 +260,24 @@ jobs: needs: ["build"] runs-on: ubuntu-20.04 steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 + - name: Download package uses: actions/download-artifact@v4 with: name: dist-packages path: dist + - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up docker-buildx uses: docker/setup-buildx-action@v3 + - name: Test Installation uses: docker/build-push-action@v6 with: @@ -276,14 +292,14 @@ jobs: if: github.event_name != 'push' runs-on: ubuntu-20.04 steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 with: submodules: true - - name: Setup Git user and e-mail - uses: frequenz-floss/setup-git-user@v2 - - name: Set up Python uses: actions/setup-python@v5 with: @@ -318,14 +334,14 @@ jobs: permissions: contents: write steps: + - name: Setup Git + uses: frequenz-floss/gh-action-setup-git@v0.x.x + - name: Fetch sources uses: actions/checkout@v4 with: submodules: true - - name: Setup Git user and e-mail - uses: frequenz-floss/setup-git-user@v2 - - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/pyproject.toml b/pyproject.toml index e96295a..4e7b9ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ dev-pylint = [ ] dev-pytest = [ "pytest == 8.3.3", - "pylint == 3.3.1", # We need this to check for the examples + "pylint == 3.3.1", # We need this to check for the examples "frequenz-repo-config[extra-lint-examples] == 0.10.0", "pytest-mock == 3.14.0", "pytest-asyncio == 0.24.0",