Skip to content

Commit

Permalink
fix broken build (pyyaml and pymssql issues related to cython v…
Browse files Browse the repository at this point in the history
…ersion `3.0`) (#3802)
  • Loading branch information
adamsachs authored Jul 18, 2023
1 parent ec70d25 commit e9aeaf0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ expandvars==0.9.0
fastapi[all]==0.89.1
fastapi-caching[redis]==0.3.0
fastapi-pagination[sqlalchemy]~= 0.10.0
fideslang==1.4.2
fideslang==1.4.3
fideslog==1.2.10
firebase-admin==5.3.0
GitPython==3.1.31
Expand All @@ -36,10 +36,10 @@ pydantic==1.10.9
pydash==6.0.2
PyJWT==2.4.0
pymongo==3.13.0
pymssql==2.2.7
# pymssql==2.2.7 -- temporarily commented out due to what seems like cython 3.0 issues - see https://github.com/ethyca/fides/issues/3800
PyMySQL==1.0.2
python-jose[cryptography]==3.3.0
pyyaml>=5,<6
pyyaml>=5,<7
redis==3.5.3
RestrictedPython==6.0.0
rich-click==1.6.1
Expand Down
21 changes: 11 additions & 10 deletions tests/ctl/core/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from urllib.parse import quote_plus
from uuid import uuid4

import pymssql
# import pymssql TODO: temporary workaround because of cython 3.0 issues - see https://github.com/ethyca/fides/issues/3800
import pytest
import sqlalchemy
from fideslang.manifests import write_manifest
Expand Down Expand Up @@ -471,16 +471,17 @@ def database_setup(self) -> Generator:
for query in queries:
engine.execute(sqlalchemy.sql.text(query))
else:
pass # TODO: temporary workaround because of cython 3.0 issues - see https://github.com/ethyca/fides/issues/3800
# This special MSSQL case is required due to how autocommit is activated
with pymssql.connect(
database_parameters["server"],
database_parameters["username"],
database_parameters["password"],
autocommit=True,
) as connection:
for query in queries:
with connection.cursor() as cursor:
cursor.execute(query)
# with pymssql.connect(
# database_parameters["server"],
# database_parameters["username"],
# database_parameters["password"],
# autocommit=True,
# ) as connection:
# for query in queries:
# with connection.cursor() as cursor:
# cursor.execute(query)
except:
print(f"> FAILED DB SETUP: {database_parameters.get('setup_url')}")
# We don't want to error all tests if a single setup fails
Expand Down

0 comments on commit e9aeaf0

Please sign in to comment.