Skip to content

Commit 46f6184

Browse files
authored
Merge pull request #48 from febus982/python3.12
Support python 3.12
2 parents f056495 + 1dfb32a commit 46f6184

File tree

10 files changed

+51
-14
lines changed

10 files changed

+51
-14
lines changed

.github/workflows/github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
uses: actions/checkout@v3
3131
- name: Setup Pages
3232
uses: actions/configure-pages@v3
33-
- name: Set up Python 3.11
33+
- name: Set up Python 3.12
3434
uses: actions/setup-python@v3
3535
with:
36-
python-version: "3.11"
36+
python-version: "3.12"
3737
- name: Install dependencies
3838
run: |
3939
python -m pip install --upgrade pip

.github/workflows/python-3.12.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python 3.12
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python 3.12
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: "3.12"
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install poetry
26+
poetry config virtualenvs.create false
27+
poetry install --no-root --with dev
28+
- name: Test with pytest
29+
run: |
30+
make ci-test
31+
- name: Check typing
32+
run: |
33+
make typing

.github/workflows/python-code-style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Set up Python 3.11
18+
- name: Set up Python 3.12
1919
uses: actions/setup-python@v3
2020
with:
21-
python-version: "3.11"
21+
python-version: "3.12"
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

.github/workflows/python-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Set up Python 3.11
18+
- name: Set up Python 3.12
1919
uses: actions/setup-python@v3
2020
with:
21-
python-version: "3.11"
21+
python-version: "3.12"
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

.github/workflows/python-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v3
19-
- name: Set up Python 3.11
19+
- name: Set up Python 3.12
2020
uses: actions/setup-python@v3
2121
with:
22-
python-version: "3.11"
22+
python-version: "3.12"
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip

.github/workflows/python-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Set up Python 3.11
18+
- name: Set up Python 3.12
1919
uses: actions/setup-python@v3
2020
with:
21-
python-version: "3.11"
21+
python-version: "3.12"
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![Python 3.9](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.9.yml/badge.svg?event=push)](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.9.yml)
77
[![Python 3.10](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.10.yml/badge.svg?event=push)](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.10.yml)
88
[![Python 3.11](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.11.yml/badge.svg?event=push)](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.11.yml)
9+
[![Python 3.12](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.12.yml/badge.svg?event=push)](https://github.com/febus982/sqlalchemy-bind-manager/actions/workflows/python-3.12.yml)
910

1011
[![Maintainability](https://api.codeclimate.com/v1/badges/0140f7f4e559ae806887/maintainability)](https://codeclimate.com/github/febus982/sqlalchemy-bind-manager/maintainability)
1112
[![Test Coverage](https://api.codeclimate.com/v1/badges/0140f7f4e559ae806887/test_coverage)](https://codeclimate.com/github/febus982/sqlalchemy-bind-manager/test_coverage)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ requires = ["poetry-core", "poetry-dynamic-versioning"]
3838
build-backend = "poetry_dynamic_versioning.backend"
3939

4040
[tool.poetry.dependencies]
41-
python = ">=3.8,<3.12"
41+
python = ">=3.8,<3.13"
4242
pydantic = "^2.1.1"
4343
SQLAlchemy = { version = "~2.0.0", extras = ["asyncio", "mypy"] }
4444

sqlalchemy_bind_manager/_repository/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from enum import Enum
22
from functools import partial
3-
from typing import Generic, List, TypeVar, Union
3+
from typing import Callable, Generic, List, TypeVar, Union
44

55
from pydantic import BaseModel, StrictInt, StrictStr
66
from sqlalchemy import asc, desc
@@ -43,5 +43,5 @@ class CursorPaginatedResult(BaseModel, Generic[MODEL]):
4343

4444

4545
class SortDirection(Enum):
46-
ASC = partial(asc)
47-
DESC = partial(desc)
46+
ASC: Callable = partial(asc)
47+
DESC: Callable = partial(desc)

0 commit comments

Comments
 (0)