Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SQLAlchemy 2.0, continued #275

Merged
merged 21 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.9", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
sqlalchemy-version: ["1.4", "2.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
mhauru marked this conversation as resolved.
Show resolved Hide resolved
allow-prereleases: true
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pip install -e .[test] coveralls
- name: Install dependencies SQLAlchemy 1.4
if: matrix.sqlalchemy-version == 1.4
run: pip install -e .[test,sqlmodel] coveralls SQLAlchemy==1.4.*
- name: Install dependencies SQLAlchemy 2.0
if: matrix.sqlalchemy-version == 2.0
run: pip install -e .[test] coveralls SQLAlchemy==2.0.*
- name: Test with pytest
run: coverage run -m pytest
- name: Upload Coverage
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Version history
===============

**3.0.0rc3**

- Added support for SQLAlchemy 2 (PR by rbuffat with help from mhauru)

**3.0.0rc2**

- Added support for generating SQLModel classes (PR by Andrii Khirilov)
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ latest SQLAlchemy version).
Features
========

* Supports SQLAlchemy 1.4.x
* Supports SQLAlchemy 1.4.x and 2
* Produces declarative code that almost looks like it was hand written
* Produces `PEP 8`_ compliant code
* Accurately determines relationships, including many-to-many, one-to-one
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.7"
dependencies = [
"SQLAlchemy >= 1.4.36, < 2.0",
"SQLAlchemy >= 1.4.36",
"inflect >= 4.0.0",
"importlib_metadata; python_version < '3.10'",
"greenlet >= 3.0.0a1; python_version >= '3.12'",
]
dynamic = ["version"]

Expand All @@ -44,6 +46,8 @@ test = [
"pytest-cov",
"psycopg2-binary",
"mysql-connector-python",
]
sqlmodel = [
"sqlmodel",
]
citext = ["sqlalchemy-citext >= 1.7.0"]
Expand Down Expand Up @@ -88,7 +92,7 @@ show_missing = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37, py38, py39, py310
envlist = py37, py38, py39, py310, py311, py312
skip_missing_interpreters = true
isolated_build = true

Expand Down
Loading