diff --git a/saas/config/default.py b/saas/config/default.py index 28afea991..ed7bb7887 100644 --- a/saas/config/default.py +++ b/saas/config/default.py @@ -13,6 +13,10 @@ import environ from celery.schedules import crontab +import pymysql + +# connect mysql +pymysql.install_as_MySQLdb() # environ env = environ.Env() diff --git a/saas/poetry.lock b/saas/poetry.lock index 8f666132a..b978b5167 100644 --- a/saas/poetry.lock +++ b/saas/poetry.lock @@ -1107,14 +1107,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "mysqlclient" -version = "2.0.1" -description = "Python interface to MySQL" -category = "main" -optional = false -python-versions = ">=3.5" - [[package]] name = "networkx" version = "2.5" @@ -1596,6 +1588,18 @@ crypto = ["cryptography (>=1.4)"] flake8 = ["flake8", "flake8-import-order", "pep8-naming"] test = ["pytest (>=4.0.1,<5.0.0)", "pytest-cov (>=2.6.0,<3.0.0)", "pytest-runner (>=4.2,<5.0.0)"] +[[package]] +name = "pymysql" +version = "1.0.2" +description = "Pure Python MySQL Driver" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +ed25519 = ["PyNaCl (>=1.4.0)"] +rsa = ["cryptography"] + [[package]] name = "pyparsing" version = "2.4.7" @@ -2094,7 +2098,7 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "1.1" python-versions = "3.6.6" -content-hash = "c9800affbfce17977e6848f1613834fcd7b3fc4cb2feb60fa7114c263b3c4aee" +content-hash = "308803ecb7cc4ea6ac726859c10b705a6bb38f23a1e2055f5acd9c048af098dc" [metadata.files] aenum = [ @@ -2802,12 +2806,6 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] -mysqlclient = [ - {file = "mysqlclient-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:edd42ccaa444b00702d5374b2f5f7585c9d0ce201917f15339f1c3cf91c1b1ed"}, - {file = "mysqlclient-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:3f39855a4ad22805361e782cc4d1010ac74796225fa2d1c03cc16673ccdc983a"}, - {file = "mysqlclient-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:a6b5648f648b16335e3b1aaec93dc3fcc81a9a661180e306936437cc522c810b"}, - {file = "mysqlclient-2.0.1.tar.gz", hash = "sha256:fb2f75aea14722390d2d8ddf384ad99da708c707a96656210a7be8af20a2c5e5"}, -] networkx = [ {file = "networkx-2.5-py3-none-any.whl", hash = "sha256:8c5812e9f798d37c50570d15c4a69d5710a18d77bafc903ee9c5fba7454c616c"}, {file = "networkx-2.5.tar.gz", hash = "sha256:7978955423fbc9639c10498878be59caf99b44dc304c2286162fd24b458c1602"}, @@ -3092,6 +3090,10 @@ pyjwt = [ {file = "PyJWT-1.7.1-py2.py3-none-any.whl", hash = "sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e"}, {file = "PyJWT-1.7.1.tar.gz", hash = "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96"}, ] +pymysql = [ + {file = "PyMySQL-1.0.2-py3-none-any.whl", hash = "sha256:41fc3a0c5013d5f039639442321185532e3e2c8924687abe6537de157d403641"}, + {file = "PyMySQL-1.0.2.tar.gz", hash = "sha256:816927a350f38d56072aeca5dfb10221fe1dc653745853d30a216637f5d7ad36"}, +] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, diff --git a/saas/pyproject.toml b/saas/pyproject.toml index 0f47673ea..893543f1f 100644 --- a/saas/pyproject.toml +++ b/saas/pyproject.toml @@ -78,7 +78,7 @@ license = "MIT License" python = "3.6.6" # blueapps requirement Django = "3.2.25" -mysqlclient = "2.0.1" +pymysql = "1.0.2" MarkupSafe = "2.0.1" requests = "2.27.1" celery = "5.1.2" diff --git a/saas/requirements.txt b/saas/requirements.txt index 7aa8e32e7..de35e0153 100644 --- a/saas/requirements.txt +++ b/saas/requirements.txt @@ -64,7 +64,6 @@ itypes==1.2.0; python_version >= "3.6" jinja2==3.0.3; python_version >= "3.6" kombu==5.1.0; python_version >= "3.6" markupsafe==2.0.1; python_version >= "3.6" -mysqlclient==2.0.1; python_version >= "3.5" openpyxl==3.0.9; python_version >= "3.6" opentelemetry-api==1.8.0; python_version >= "3.6" opentelemetry-exporter-jaeger-proto-grpc==1.7.1; python_version >= "3.6" @@ -96,6 +95,7 @@ pydantic==1.9.2; python_full_version >= "3.6.1" pyinstrument-cext==0.2.4 pyinstrument==3.1.3 pyjwt==1.7.1 +pymysql==1.0.2; python_version >= "3.6" pyparsing==2.4.7; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and python_version >= "3.6" python-crontab==2.6.0 python-dateutil==2.8.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" diff --git a/saas/requirements_dev.txt b/saas/requirements_dev.txt index ac5e39fae..3b452e31a 100644 --- a/saas/requirements_dev.txt +++ b/saas/requirements_dev.txt @@ -84,7 +84,6 @@ mccabe==0.6.1; python_version >= "3.6" and python_full_version < "3.0.0" or pyth mock==1.0.1 mypy-extensions==0.4.3; python_full_version >= "3.6.2" and python_version >= "3.5" mypy==0.910; python_version >= "3.5" -mysqlclient==2.0.1; python_version >= "3.5" networkx==2.5; python_version >= "3.6" openpyxl==3.0.9; python_version >= "3.6" opentelemetry-api==1.8.0; python_version >= "3.6" @@ -123,6 +122,7 @@ pyflakes==2.3.1; python_version >= "3.6" and python_full_version < "3.0.0" or py pyinstrument-cext==0.2.4 pyinstrument==3.1.3 pyjwt==1.7.1 +pymysql==1.0.2; python_version >= "3.6" pyparsing==2.4.7; python_full_version >= "3.6.1" and python_full_version < "4.0.0" and python_version >= "3.6" pyproject-flake8==0.0.1a2 pytest-cov==3.0.0; python_version >= "3.6"