diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80b511a..fe917f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: python-version: - - '3.7' - - '3.10' + - '3.8' + - '3.12' steps: - name: 'Set up Python ${{ matrix.python-version }}' uses: actions/setup-python@v5 @@ -32,6 +32,6 @@ jobs: steps: - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - uses: actions/checkout@v4 - uses: pre-commit/action@v3.0.1 diff --git a/README.md b/README.md index 93d09f6..0812820 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![codecov](https://codecov.io/gh/valohai/laituri/branch/master/graph/badge.svg)](https://codecov.io/gh/valohai/laituri) `laituri` is a set of Docker-related Python snippets used at [Valohai](https://valohai.com/). -You can use it with Python >= 3.7. +You can use it with Python >= 3.8. ## Usage diff --git a/laituri/docker/credential_manager/docker_v1.py b/laituri/docker/credential_manager/docker_v1.py index 0fd8d5c..9ee5bb7 100644 --- a/laituri/docker/credential_manager/docker_v1.py +++ b/laituri/docker/credential_manager/docker_v1.py @@ -58,7 +58,7 @@ def docker_login(domain: str, username: str, password: str) -> bool: log.debug(f"Running `{' '.join(args)}`") proc = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) try: - cmd_input = (password + '\n').encode('utf-8') + cmd_input = f"{password}\n".encode('utf-8') stdout, _ = proc.communicate(input=cmd_input, timeout=settings.DOCKER_TIMEOUT) except subprocess.TimeoutExpired as te: raise DockerLoginFailed('timed out') from te diff --git a/pyproject.toml b/pyproject.toml index 5ff1c95..4bca66c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["version"] description = "Docker Toolkit for Python" readme = "README.md" license = "MIT" -requires-python = ">=3.6" +requires-python = ">=3.8" authors = [ { name = "Valohai", email = "hait@valohai.com" }, ] @@ -45,7 +45,7 @@ strict = true exclude = "laituri_tests/test_.*" [tool.ruff] -target-version = "py37" +target-version = "py38" line-length = 120 [tool.ruff.lint] @@ -59,6 +59,7 @@ select = [ "I", # isort "T", # debugger and print "TID", # flake8-tidy-imports + "UP", # pyupgrade "W", # pycodestyle ] ignore = []