From 52317eed61674b994c1db16473afd4b3fe10d0fe Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Mon, 6 Feb 2023 16:09:17 +0100 Subject: [PATCH 1/4] Drop support for Python 3.8 --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0efa066d72..a2fa773f90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ name = "pytensor" dynamic = [ 'version' ] -requires-python = ">=3.7" +requires-python = ">=3.8" authors = [ {name = "pymc-devs", email = "pymc.devs@gmail.com"} ] @@ -34,7 +34,6 @@ classifiers = [ "Operating System :: Unix", "Operating System :: MacOS", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 7cbcc9e8e8d09f010b992ab25eee83c2da4af4be Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Mon, 6 Feb 2023 16:07:27 +0100 Subject: [PATCH 2/4] Update isort dependency --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a586a91f7..106c42438b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/humitos/mirrors-autoflake.git From f08567b5c1a3fbd8a933feab1a052123ac5260c3 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Mon, 6 Feb 2023 15:52:15 +0100 Subject: [PATCH 3/4] Import future annotations for Python 3.8 mypy compatibility --- pytensor/link/numba/dispatch/elemwise_codegen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytensor/link/numba/dispatch/elemwise_codegen.py b/pytensor/link/numba/dispatch/elemwise_codegen.py index 828fafe61d..0060191ad7 100644 --- a/pytensor/link/numba/dispatch/elemwise_codegen.py +++ b/pytensor/link/numba/dispatch/elemwise_codegen.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Any, List, Optional, Tuple import numba From 1d95cb200fd13865652211de1a611c2d4c46aa42 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Mon, 6 Feb 2023 15:58:07 +0100 Subject: [PATCH 4/4] Run pre-commit on all supported versions --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e5d2d421c..630ce88dad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,11 +50,14 @@ jobs: needs: changes runs-on: ubuntu-latest if: ${{ needs.changes.outputs.changes == 'true' }} + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: ${{ matrix.python-version }} - uses: pre-commit/action@v3.0.0 test_ubuntu: