diff --git a/CHANGELOG.md b/CHANGELOG.md index e36fd348ab..dcd7e1a460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ The types of changes are: ## [Unreleased](https://github.com/ethyca/fides/compare/2.19.0...main) +### Changed + +- Bump PyMSSQL version and remove workarounds [#3996](https://github.com/ethyca/fides/pull/3996) + ## [2.19.0](https://github.com/ethyca/fides/compare/2.18.0...2.19.0) ### Added diff --git a/Dockerfile b/Dockerfile index b0a9f6670e..2b14f26643 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,12 +44,6 @@ RUN pip --no-cache-dir --disable-pip-version-check install --upgrade pip setupto COPY requirements.txt . -# isolate our pymssql install and pin cython and pymssql versions explicitly -# this is due to a pymssql issue and is hopefully only temporarily necessary -# see https://github.com/ethyca/fides/issues/3824 -RUN pip install cython==0.29.35 -RUN pip install pymssql==2.1.5 --no-build-isolation - RUN pip install --no-cache-dir install -r requirements.txt COPY dev-requirements.txt . diff --git a/MANIFEST.in b/MANIFEST.in index c419da707b..f22bd26b8e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,6 @@ include LICENSE include README.md include requirements.txt include dev-requirements.txt -include dangerous-requirements.txt include versioneer.py include src/fides/api/alembic/alembic.ini include src/fides/_version.py diff --git a/dangerous-requirements.txt b/dangerous-requirements.txt deleted file mode 100644 index 73fd70becf..0000000000 --- a/dangerous-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -# These requirements are dangerous on certain platforms -Cython==0.29.35 -pymssql==2.2.7 \ No newline at end of file diff --git a/noxfiles/ci_nox.py b/noxfiles/ci_nox.py index a7fdf953cf..25a075580f 100644 --- a/noxfiles/ci_nox.py +++ b/noxfiles/ci_nox.py @@ -266,7 +266,7 @@ def collect_tests(session: nox.Session) -> None: errors within the test code. """ session.install(".") - install_requirements(session, include_dangerous=True) + install_requirements(session) command = ("pytest", "tests/", "--collect-only") session.run(*command) diff --git a/noxfiles/utils_nox.py b/noxfiles/utils_nox.py index 6fe445cbe9..aea75f4dfc 100644 --- a/noxfiles/utils_nox.py +++ b/noxfiles/utils_nox.py @@ -51,11 +51,9 @@ def teardown(session: nox.Session, volumes: bool = False, images: bool = False) session.log("Teardown complete") -def install_requirements(session: nox.Session, include_dangerous=False) -> None: +def install_requirements(session: nox.Session) -> None: session.install("-r", "requirements.txt") session.install("-r", "dev-requirements.txt") - if include_dangerous: - session.install("-r", "dangerous-requirements.txt") @nox.session() diff --git a/requirements.txt b/requirements.txt index 595868b71e..d2069b21d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,6 +37,7 @@ pydash==6.0.2 PyJWT==2.4.0 pymongo==3.13.0 PyMySQL==1.0.2 +pymssql==2.2.8 python-jose[cryptography]==3.3.0 pyyaml>=5,<7 redis==3.5.3 diff --git a/setup.py b/setup.py index e82874d65b..ff48fcd556 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ import pathlib -from typing import List from setuptools import find_packages, setup @@ -14,43 +13,6 @@ install_requires = open("requirements.txt", encoding="utf-8").read().strip().split("\n") dev_requires = open("dev-requirements.txt", encoding="utf-8").read().strip().split("\n") -dangerous_requires = ( - open("dangerous-requirements.txt", encoding="utf-8").read().strip().split("\n") -) - - -def optional_requirements( - dependency_names: List[str], requires: List[str] = dangerous_requires -) -> List[str]: - """ - Matches the provided dependency names to lines in `optional-requirements.txt`, - and returns the full dependency string for each one. - Prevents the need to store version numbers in two places. - """ - - requirements: List[str] = [] - - for dependency in dependency_names: - for optional_dependency in requires: - if optional_dependency.startswith(dependency): - requirements.append(optional_dependency) - break - - if len(requirements) == len(dependency_names): - return requirements - - raise ModuleNotFoundError - - -# Human-Readable Extras -# Versions are read from corresponding lines in `optional-requirements.txt` -extras = { - "mssql": optional_requirements(["pymssql"], dangerous_requires), -} -dangerous_extras = ["mssql"] # These extras break on certain platforms -extras["all"] = sum( - [value for key, value in extras.items() if key not in dangerous_extras], [] -) ################### ## Package Setup ## @@ -73,7 +35,6 @@ def optional_requirements( license="Apache License 2.0", install_requires=install_requires, dev_requires=dev_requires, - extras_require=extras, classifiers=[ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3 :: Only", diff --git a/src/fides/api/main.py b/src/fides/api/main.py index c352175b5f..f616454dca 100644 --- a/src/fides/api/main.py +++ b/src/fides/api/main.py @@ -4,8 +4,8 @@ import os import sys from datetime import datetime, timezone -from time import perf_counter from logging import WARNING +from time import perf_counter from typing import Callable, Optional from urllib.parse import unquote