Lifted pin on sqlalchemy in order to be able to use v2+ (#1832)
This commit is contained in:
committed by
GitHub
parent
e4beaf758e
commit
09423fb4be
@@ -94,7 +94,6 @@ jobs:
|
||||
pip3 install -r requirements-manager.txt
|
||||
pip3 install -r requirements-django.txt
|
||||
python3 setup.py install
|
||||
pip3 install --upgrade "sqlalchemy<2"
|
||||
pip3 install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
|
||||
#pip3 install --upgrade rasterio==1.1.8
|
||||
- name: setup test data ⚙️
|
||||
|
||||
@@ -62,7 +62,8 @@ import pyproj
|
||||
import shapely
|
||||
from sqlalchemy import create_engine, MetaData, PrimaryKeyConstraint, asc, desc
|
||||
from sqlalchemy.engine import URL
|
||||
from sqlalchemy.exc import InvalidRequestError, OperationalError
|
||||
from sqlalchemy.exc import ConstraintColumnNotFoundError, \
|
||||
InvalidRequestError, OperationalError
|
||||
from sqlalchemy.ext.automap import automap_base
|
||||
from sqlalchemy.orm import Session, load_only
|
||||
from sqlalchemy.sql.expression import and_
|
||||
@@ -515,7 +516,7 @@ def get_table_model(
|
||||
sqlalchemy_table_def = metadata.tables[f'{schema}.{table_name}']
|
||||
try:
|
||||
sqlalchemy_table_def.append_constraint(PrimaryKeyConstraint(id_field))
|
||||
except KeyError:
|
||||
except (ConstraintColumnNotFoundError, KeyError):
|
||||
raise ProviderQueryError(
|
||||
f"No such id_field column ({id_field}) on {schema}.{table_name}.")
|
||||
|
||||
|
||||
+1
-1
@@ -14,5 +14,5 @@ PyYAML
|
||||
rasterio
|
||||
requests
|
||||
shapely
|
||||
SQLAlchemy<2.0.0
|
||||
SQLAlchemy
|
||||
tinydb
|
||||
|
||||
Reference in New Issue
Block a user