From 3285afb57d98c16e7ebd235a8b71e56b025c776e Mon Sep 17 00:00:00 2001 From: David Hagen Date: Tue, 8 Nov 2022 02:51:45 -0500 Subject: [PATCH] Add support for Python 3.11 (#948) --- .github/workflows/tests.yml | 14 ++++++++------ noxfile.py | 2 +- src/nox_poetry/poetry.py | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73e1359b..6da751bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,20 +12,22 @@ jobs: fail-fast: false matrix: include: - - { python: "3.10", os: "ubuntu-latest", session: "pre-commit" } - - { python: "3.10", os: "ubuntu-latest", session: "safety" } + - { python: "3.11", os: "ubuntu-latest", session: "pre-commit" } + - { python: "3.11", os: "ubuntu-latest", session: "safety" } + - { python: "3.11", os: "ubuntu-latest", session: "mypy" } - { python: "3.10", os: "ubuntu-latest", session: "mypy" } - { python: "3.9", os: "ubuntu-latest", session: "mypy" } - { python: "3.8", os: "ubuntu-latest", session: "mypy" } - { python: "3.7", os: "ubuntu-latest", session: "mypy" } + - { python: "3.11", os: "ubuntu-latest", session: "tests" } - { python: "3.10", os: "ubuntu-latest", session: "tests" } - { python: "3.9", os: "ubuntu-latest", session: "tests" } - { python: "3.8", os: "ubuntu-latest", session: "tests" } - { python: "3.7", os: "ubuntu-latest", session: "tests" } - - { python: "3.10", os: "windows-latest", session: "tests" } - - { python: "3.10", os: "macos-latest", session: "tests" } - - { python: "3.10", os: "ubuntu-latest", session: "xdoctest" } - - { python: "3.10", os: "ubuntu-latest", session: "docs-build" } + - { python: "3.11", os: "windows-latest", session: "tests" } + - { python: "3.11", os: "macos-latest", session: "tests" } + - { python: "3.11", os: "ubuntu-latest", session: "xdoctest" } + - { python: "3.11", os: "ubuntu-latest", session: "docs-build" } env: NOXSESSION: ${{ matrix.session }} diff --git a/noxfile.py b/noxfile.py index 8c7d23e8..82105439 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,7 +14,7 @@ package = "nox_poetry" -python_versions = ["3.10", "3.9", "3.8", "3.7"] +python_versions = ["3.11", "3.10", "3.9", "3.8", "3.7"] nox.needs_version = ">= 2021.6.6" nox.options.sessions = ( "pre-commit", diff --git a/src/nox_poetry/poetry.py b/src/nox_poetry/poetry.py index d600dd5c..e56299fe 100644 --- a/src/nox_poetry/poetry.py +++ b/src/nox_poetry/poetry.py @@ -137,7 +137,7 @@ def build(self, *, format: str) -> str: output = self.session.run_always( "poetry", "build", - f"--format={format}", + f"--format={format.value}", "--no-ansi", external=True, silent=True,