Skip to content

Commit

Permalink
Support sqlalchemy 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
passren committed Sep 23, 2024
1 parent 7ac4b03 commit eeffed7
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 17 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
sudo apt-get install -y python3-dev
pip install boto3
pip install tenacity
pip install "sqlalchemy>=1.0.0,<2.0.0"
pip install pyparsing
pip install sqlean.py
- name: black
Expand All @@ -50,12 +49,22 @@ jobs:
curl -O https://s3.us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz
tar xzf ./dynamodb_local_latest.tar.gz
nohup java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb &
- name: Run test with pytest
- name: Install sqlalchemy 1.x
run: |
pip install "sqlalchemy>=1.0.0,<2.0.0"
- name: Run test with pytest for sqlalchemy 1.x
run: |
pip install pytest
pip install pytest-cov
pip install moto[sts]==4.2.0
pytest --cov=pydynamodb --cov-report=xml tests/
- name: Install sqlalchemy 2.x
run: |
pip uninstall -y sqlalchemy
pip install "sqlalchemy>=2.0.0"
- name: Run test with pytest for sqlalchemy 2.x
run: |
pytest --cov=pydynamodb --cov-report=xml tests/
- name: Upload test coverage
uses: codecov/codecov-action@v4
env:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Dependencies

* SQLAlchemy (The ORM Toolkit for Python, only required if using PyDynamoDB Dialect)

- SQLAlchemy >= 1.0.0, < 2.0.0
- SQLAlchemy >= 1.0.0

* Pyparsing (The approach to creating and executing simple grammars)

Expand Down
2 changes: 1 addition & 1 deletion pydynamodb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if TYPE_CHECKING:
from .connection import Connection

__version__: str = "0.6.3"
__version__: str = "0.7.0"

# Globals https://www.python.org/dev/peps/pep-0249/#globals
apilevel: str = "2.0"
Expand Down
Loading

0 comments on commit eeffed7

Please sign in to comment.