From 6bd44766189be7ac27a8a0bd200b3cc7aaa53359 Mon Sep 17 00:00:00 2001 From: Dalena Date: Thu, 2 May 2024 11:45:31 -0500 Subject: [PATCH] feat: add support for python 3.12 (#70) --- .github/workflows/codeql.yaml | 2 +- .github/workflows/commitlint.yaml | 4 ++-- .github/workflows/prtitle.yaml | 4 ++-- .github/workflows/publish.yaml | 4 ++-- .github/workflows/test.yaml | 22 ++++++++++++---------- .pre-commit-config.yaml | 8 ++++---- README.md | 2 +- pyproject.toml | 2 +- setup.py | 8 ++++---- 9 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 2cdc07b..eb3711c 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index e075b16..84737f2 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/prtitle.yaml b/.github/workflows/prtitle.yaml index a6cd3b0..6e8999f 100644 --- a/.github/workflows/prtitle.yaml +++ b/.github/workflows/prtitle.yaml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2c88013..081d138 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,10 +10,10 @@ jobs: 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.10" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2e534f7..ef25963 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -42,10 +42,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -62,19 +62,21 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] # eventually add `windows-latest` - python-version: [3.8, 3.9, "3.10", "3.11"] + # TODO: Replace with macos-latest when works again. + # https://github.com/actions/setup-python/issues/808 + os: [ubuntu-latest, macos-12] # eventually add `windows-latest` + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -105,10 +107,10 @@ jobs: # fail-fast: true # # steps: -# - uses: actions/checkout@v2 +# - uses: actions/checkout@v4 # # - name: Setup Python -# uses: actions/setup-python@v2 +# uses: actions/setup-python@v5 # with: # python-version: "3.10" # diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1560cd..8f36524 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,13 +4,13 @@ repos: hooks: - id: check-yaml -- repo: https://github.com/pre-commit/mirrors-isort - rev: v5.10.1 +- repo: https://github.com/PyCQA/isort + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 24.3.0 + rev: 24.4.2 hooks: - id: black name: black @@ -21,7 +21,7 @@ repos: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.9.0 + rev: v1.10.0 hooks: - id: mypy additional_dependencies: [types-PyYAML, types-requests, pydantic, types-setuptools] diff --git a/README.md b/README.md index a0c5222..2d69c49 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The `ape-alchemy` plugin supports the following ecosystems: ## Dependencies -- [python3](https://www.python.org/downloads) version 3.8 up to 3.11. +- [python3](https://www.python.org/downloads) version 3.8 up to 3.12. ## Installation diff --git a/pyproject.toml b/pyproject.toml index 75352cc..cd6ba8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ write_to = "ape_alchemy/version.py" [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] include = '\.pyi?$' [tool.pytest.ini_options] diff --git a/setup.py b/setup.py index b304ad6..a4b0fb0 100644 --- a/setup.py +++ b/setup.py @@ -16,14 +16,14 @@ "websocket-client", # Used for web socket integration testing ], "lint": [ - "black>=24.3.0,<25", # Auto-formatter and linter - "mypy>=1.9.0,<2", # Static type analyzer + "black>=24.4.1,<25", # Auto-formatter and linter + "mypy>=1.10.0,<2", # Static type analyzer "types-setuptools", # Needed for mypy type shed "types-requests", # Needed for mypy type shed "flake8>=7.0.0,<8", # Style linter "flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code "flake8-print>=5.0.0,<6", # Detect print statements left in code - "isort>=5.10.1,<6", # Import sorting linter + "isort>=5.13.2,<6", # Import sorting linter "mdformat>=0.7.17", # Auto-formatter for markdown "mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown "mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates @@ -63,7 +63,6 @@ with open("./README.md") as readme: long_description = readme.read() - setup( name="ape-alchemy", use_scm_version=True, @@ -103,5 +102,6 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], )