From 74a876b18942978074ffc3b6450a594178dab1cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:51:33 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.282 → v0.0.284](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.282...v0.0.284) - [github.com/tox-dev/pyproject-fmt: 0.13.0 → 0.13.1](https://github.com/tox-dev/pyproject-fmt/compare/0.13.0...0.13.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29de2b5..7f249ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.282" + rev: "v0.0.284" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -19,7 +19,7 @@ repos: - id: tox-ini-fmt args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "0.13.0" + rev: "0.13.1" hooks: - id: pyproject-fmt additional_dependencies: ["tox>=4.6"] From d12b6de14aa41558b1427b0413d6bb065babe96a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:51:45 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for more information, see https://pre-commit.ci Signed-off-by: Bernát Gábor --- .github/workflows/check.yml | 1 - .pre-commit-config.yaml | 2 +- pyproject.toml | 19 ++++++++++--------- src/devpi_process/__init__.py | 7 ++++++- tests/demo_pkg_inline/build.py | 17 +++++++---------- tox.ini | 4 ++-- 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d6e9b4f..90b493b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -22,7 +22,6 @@ jobs: - "3.10" - "3.9" - "3.8" - - "3.7" os: - ubuntu-latest - windows-2022 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f249ce..dd5240d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: rev: "0.13.1" hooks: - id: pyproject-fmt - additional_dependencies: ["tox>=4.6"] + additional_dependencies: ["tox>=4.8"] - repo: https://github.com/pre-commit/mirrors-prettier rev: "v3.0.1" hooks: diff --git a/pyproject.toml b/pyproject.toml index f873a60..1a65f48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "hatchling.build" requires = [ "hatch-vcs>=0.3", - "hatchling>=1.14.1", + "hatchling>=1.18", ] [project] @@ -19,7 +19,7 @@ keywords = [ license = "MIT" maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }] authors = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }] -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: tox", @@ -29,11 +29,11 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Testing", "Topic :: Utilities", @@ -42,14 +42,15 @@ dynamic = [ "version", ] dependencies = [ - "devpi-client>=6.0.4", - "devpi-server>=6.8", + "devpi-client>=6.0.5", + "devpi-server>=6.9.2", + 'typing-extensions>=4.7.1; python_version < "3.11"', ] optional-dependencies.test = [ "covdefaults>=2.3", - "httpx>=0.24", - "pytest>=7.3.1", - "pytest-cov>=4", + "httpx>=0.24.1", + "pytest>=7.4", + "pytest-cov>=4.1", ] urls.Homepage = "https://github.com/tox-dev/devpi-process#readme" urls.Source = "https://github.com/tox-dev/devpi-process" @@ -65,7 +66,7 @@ line-length = 120 [tool.ruff] select = ["ALL"] line-length = 120 -target-version = "py37" +target-version = "py38" isort = {known-first-party = ["devpi_process"], required-imports = ["from __future__ import annotations"]} ignore = [ "ANN101", # no typoe annotation for self diff --git a/src/devpi_process/__init__.py b/src/devpi_process/__init__.py index 65b3bda..64c89c5 100644 --- a/src/devpi_process/__init__.py +++ b/src/devpi_process/__init__.py @@ -17,6 +17,11 @@ if TYPE_CHECKING: from types import TracebackType + if sys.version_info >= (3, 11): # pragma: no cover (py311+) + from typing import Self + else: # pragma: no cover ( None: run(cmd, check=True, capture_output=True) # noqa: S603 @@ -109,7 +114,7 @@ def user(self) -> str: """:return: username of the index server""" return "root" - def __enter__(self) -> IndexServer: + def __enter__(self) -> Self: """:return: start the index server""" self._create_and_start_server() self._setup_client() diff --git a/tests/demo_pkg_inline/build.py b/tests/demo_pkg_inline/build.py index dc4e1b5..33bfdd2 100644 --- a/tests/demo_pkg_inline/build.py +++ b/tests/demo_pkg_inline/build.py @@ -38,16 +38,13 @@ Tag: py{sys.version_info[0]}-none-any """, f"{dist_info}/top_level.txt": name, - record: """ - {0}/__init__.py,, - {1}/METADATA,, - {1}/WHEEL,, - {1}/top_level.txt,, - {1}/RECORD,, - """.format( - name, - dist_info, - ), + record: f""" + {name}/__init__.py,, + {dist_info}/METADATA,, + {dist_info}/WHEEL,, + {dist_info}/top_level.txt,, + {dist_info}/RECORD,, + """, } diff --git a/tox.ini b/tox.ini index fe36586..a0ea982 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ commands = description = run static analysis and style check using flake8 skip_install = true deps = - pre-commit>=3.2.2 + pre-commit>=3.3.3 pass_env = HOMEPATH PROGRAMDATA @@ -44,7 +44,7 @@ commands = [testenv:type] description = run type check on code base deps = - mypy==1.3 + mypy==1.5 set_env = {tty:MYPY_FORCE_COLOR = 1} commands = From fe8142b66d4cabb3173ebdddc4b57ade26fccbdb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 23:08:03 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a65f48..0900d20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,6 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Testing", "Topic :: Utilities",