diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index ac6f1a0..315ea48 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -6,9 +6,9 @@ jobs: publish-to-pypi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install build dependencies diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index bb0a84e..f58cc3e 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -7,16 +7,16 @@ jobs: strategy: matrix: os: [ubuntu-20.04, ubuntu-latest] - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] exclude: # Python 3.6 is not available in GitHub Actions Ubuntu 22.04 - os: ubuntu-latest python-version: '3.6' runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} # See https://github.com/yaml/pyyaml/issues/601 @@ -25,6 +25,8 @@ jobs: - name: Install package run: PIP_CONSTRAINT=/tmp/constraint.txt python -m pip install .[dev] - name: Linting + # Python 3.12 bug breaks flake8: https://github.com/PyCQA/flake8/issues/1905 + if: matrix.python-version != '3.12' run: "flake8" - name: Unit tests run: "pytest --cov" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9335256..9d5d9ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ### Unreleased +# v13.14.0 +- Fix docker-compose conflict when kubetools commands are called without activating their venv +- Add Python 3.12 to supported versions, albeit without Flake8 because of CPython bug +- Upgrade GitHub actions workflow to deal with deprecation warnings + # v13.13.1 - Add nodeSelector config to kubetools file - Fix bug where `config` command was not printing the actual `k8s` configs used by `deploy` because it did not take into account the kube-context, whether default or given with `--context`. diff --git a/kubetools/dev/backends/docker_compose/docker_util.py b/kubetools/dev/backends/docker_compose/docker_util.py index a425ff4..42caf91 100644 --- a/kubetools/dev/backends/docker_compose/docker_util.py +++ b/kubetools/dev/backends/docker_compose/docker_util.py @@ -1,3 +1,5 @@ +import sys + from functools import lru_cache import docker @@ -202,7 +204,8 @@ def run_compose_process(kubetools_config, command_args, **kwargs): create_compose_config(kubetools_config) compose_command = [ - 'docker-compose', + # Use current interpreter to run the docker-compose module installed in the same venv + sys.executable, '-m', 'compose', # Force us to look at the current directory, not relative to the compose # filename (ie .kubetools/compose-name.yml). '--project-directory', '.', diff --git a/setup.py b/setup.py index 2397cba..ca02058 100644 --- a/setup.py +++ b/setup.py @@ -86,6 +86,7 @@ def get_readme_content(): 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Software Development :: Build Tools', 'Topic :: Software Development :: Testing', 'Topic :: System :: Software Distribution',