Skip to content

Commit b8ce27d

Browse files
committed
Switch to Python 3.12 in CI and release
At-least flake8 needs to be updated to work with Python 3.12, see PyCQA/flake8#1845. We take this chance to upgrade others to the latest versions as well. Newer flake8 flags some issues which are also fixed.
1 parent 573719f commit b8ce27d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: "Install Python"
2626
uses: actions/setup-python@v5
2727
with:
28-
python-version: "3.11"
28+
python-version: "3.12"
2929
cache: "pip"
3030
cache-dependency-path: setup.py
3131

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55

66
env:
7-
PYTHON_VERSION: "3.11"
7+
PYTHON_VERSION: "3.12"
88

99
jobs:
1010
release:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
repos:
22
- repo: "https://github.com/PyCQA/flake8"
3-
rev: "5.0.4"
3+
rev: "7.0.0"
44
hooks:
55
- id: "flake8"
66
name: "Python: analysis"
77

88
- repo: "https://github.com/pre-commit/mirrors-mypy"
9-
rev: "v1.0.0"
9+
rev: "v1.8.0"
1010
hooks:
1111
- id: "mypy"
1212
name: "Python: types"
1313
additional_dependencies:
1414
- "types-all"
1515

1616
- repo: https://github.com/pycqa/isort
17-
rev: "5.12.0"
17+
rev: "5.13.2"
1818
hooks:
1919
- id: isort
2020
args: [ "--profile", "black"]
2121

2222
- repo: https://github.com/pre-commit/pre-commit-hooks
23-
rev: "v4.4.0"
23+
rev: "v4.5.0"
2424
hooks:
2525
- id: check-yaml
2626
args: [--unsafe]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
import os
1616
from codecs import open
17-
from typing import Any
17+
from typing import Any, Dict
1818

1919
from setuptools import find_packages, setup
2020

21-
about = {} # type: dict[str, Any]
21+
about: Dict[str, Any] = {}
2222
here = os.path.abspath(os.path.dirname(__file__))
2323
with open(os.path.join(here, "trino", "_version.py"), "r", "utf-8") as f:
2424
exec(f.read(), about)

tests/unit/sqlalchemy/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def _assert_sqltype(this: SQLType, that: SQLType):
2323
if isinstance(that, type):
2424
that = that()
2525

26-
assert type(this) == type(that)
26+
assert type(this) is type(that)
2727

2828
if isinstance(this, ARRAY):
2929
_assert_sqltype(this.item_type, that.item_type)

0 commit comments

Comments
 (0)