diff --git a/apps/core/tests/test_poetry.py b/apps/core/tests/test_poetry.py index d1c9f1e..008b2d0 100644 --- a/apps/core/tests/test_poetry.py +++ b/apps/core/tests/test_poetry.py @@ -21,9 +21,10 @@ def test_requirements_circleci(remove_tempdir): checks if we have the same requirements in our project.""" os.system("poetry export -f requirements.txt > temprequirements.txt") - project_requirements = open("requirements.txt", "r") - test_requirements = open("temprequirements.txt", "r") - assert ( - hashlib.md5(project_requirements.read().encode("utf-8")).hexdigest() - == hashlib.md5(test_requirements.read().encode("utf-8")).hexdigest() - ) + with open("requirements.txt", "r") as project_requirements, open( + "temprequirements.txt", "r" + ) as test_requirements: + assert ( + hashlib.md5(project_requirements.read().encode("utf-8")).hexdigest() + == hashlib.md5(test_requirements.read().encode("utf-8")).hexdigest() + ) diff --git a/poetry.lock b/poetry.lock index 8dbdca4..25d54cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -470,11 +470,16 @@ version = "3.0.12" [[package]] category = "dev" -description = "code checking using pep8 and pyflakes" +description = "the modular source code checker: pep8, pyflakes and co" name = "flake8" optional = false python-versions = "*" -version = "1.7.0" +version = "3.4.0" + +[package.dependencies] +mccabe = ">=0.6.0,<0.7.0" +pycodestyle = ">=2.0.0,<2.4.0" +pyflakes = ">=1.5.0,<1.6.0" [[package]] category = "dev" @@ -519,7 +524,7 @@ description = "File identification library for Python" name = "identify" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "1.4.11" +version = "1.4.12" [package.extras] license = ["editdistance"] @@ -877,7 +882,7 @@ version = "2.8.4" [[package]] category = "dev" description = "Run a subprocess in a pseudo terminal" -marker = "python_version >= \"3.4\" and sys_platform != \"win32\" or sys_platform != \"win32\" or python_version >= \"3.4\" and sys_platform != \"win32\" and (python_version >= \"3.4\" and sys_platform != \"win32\" or sys_platform != \"win32\")" +marker = "python_version >= \"3.4\" and sys_platform != \"win32\" or sys_platform != \"win32\"" name = "ptyprocess" optional = false python-versions = "*" @@ -897,7 +902,7 @@ description = "Python style guide checker" name = "pycodestyle" optional = false python-versions = "*" -version = "2.4.0" +version = "2.3.1" [[package]] category = "dev" @@ -915,8 +920,8 @@ category = "dev" description = "passive checker of Python programs" name = "pyflakes" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.1.1" +python-versions = "*" +version = "1.5.0" [[package]] category = "dev" @@ -1282,7 +1287,7 @@ description = "Python client for Sentry (https://getsentry.com)" name = "sentry-sdk" optional = false python-versions = "*" -version = "0.14.2" +version = "0.14.3" [package.dependencies] certifi = "*" @@ -1470,7 +1475,7 @@ description = "Measures number of Terminal column cells of wide-character codes" name = "wcwidth" optional = false python-versions = "*" -version = "0.1.8" +version = "0.1.9" [[package]] category = "dev" @@ -1528,8 +1533,8 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "0ef92c12f8b99ec6461b8ed9596071de2bd78428d47e69e439ec17a0aa1f9d5c" -python-versions = ">=3.7,<3.8" +content-hash = "8186779e6ae78a9919c04adb1c1e446b27e8635397fcbdac5f59c8ed9ba055f1" +python-versions = ">=3.7,<3.8" # Python versions must be set in dependencies for poetry [metadata.files] apipkg = [ @@ -1713,7 +1718,8 @@ filelock = [ {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, ] flake8 = [ - {file = "flake8-1.7.0.tar.gz", hash = "sha256:3318f09503c202476082e9b915f258076be2bcd0d1acbbab49e001d5707eb723"}, + {file = "flake8-3.4.0-py2.py3-none-any.whl", hash = "sha256:55a5e78a57ead9b593a8a24179113100586897d563152085402bd835d50b2933"}, + {file = "flake8-3.4.0.tar.gz", hash = "sha256:c2f7aba3de58e1728d7107e7a45eae9bf5501ea7f3abbd6286ba5d96694a6c6e"}, ] freezegun = [ {file = "freezegun-0.3.15-py2.py3-none-any.whl", hash = "sha256:82c757a05b7c7ca3e176bfebd7d6779fd9139c7cb4ef969c38a28d74deef89b2"}, @@ -1727,8 +1733,8 @@ gunicorn = [ {file = "gunicorn-20.0.4.tar.gz", hash = "sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626"}, ] identify = [ - {file = "identify-1.4.11-py2.py3-none-any.whl", hash = "sha256:1222b648251bdcb8deb240b294f450fbf704c7984e08baa92507e4ea10b436d5"}, - {file = "identify-1.4.11.tar.gz", hash = "sha256:d824ebe21f38325c771c41b08a95a761db1982f1fc0eee37c6c97df3f1636b96"}, + {file = "identify-1.4.12-py2.py3-none-any.whl", hash = "sha256:5793876ecee0475b4e78ba60869f3c8a4407535d9dffd898048753f61c68eacd"}, + {file = "identify-1.4.12.tar.gz", hash = "sha256:46b5583a7ae1b0c5d8b51902940f8e11ab339515d1a40b91acf51d5c3ae83029"}, ] idna = [ {file = "idna-2.9-py2.py3-none-any.whl", hash = "sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa"}, @@ -1938,17 +1944,16 @@ py = [ {file = "py-1.8.1.tar.gz", hash = "sha256:5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa"}, ] pycodestyle = [ - {file = "pycodestyle-2.4.0-py2.py3-none-any.whl", hash = "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b35400f93dcfb83"}, - {file = "pycodestyle-2.4.0-py3.6.egg", hash = "sha256:74abc4e221d393ea5ce1f129ea6903209940c1ecd29e002e8c6933c2b21026e0"}, - {file = "pycodestyle-2.4.0.tar.gz", hash = "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a"}, + {file = "pycodestyle-2.3.1-py2.py3-none-any.whl", hash = "sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9"}, + {file = "pycodestyle-2.3.1.tar.gz", hash = "sha256:682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766"}, ] pydocstyle = [ {file = "pydocstyle-5.0.2-py3-none-any.whl", hash = "sha256:da7831660b7355307b32778c4a0dbfb137d89254ef31a2b2978f50fc0b4d7586"}, {file = "pydocstyle-5.0.2.tar.gz", hash = "sha256:f4f5d210610c2d153fae39093d44224c17429e2ad7da12a8b419aba5c2f614b5"}, ] pyflakes = [ - {file = "pyflakes-2.1.1-py2.py3-none-any.whl", hash = "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0"}, - {file = "pyflakes-2.1.1.tar.gz", hash = "sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2"}, + {file = "pyflakes-1.5.0-py2.py3-none-any.whl", hash = "sha256:cc5eadfb38041f8366128786b4ca12700ed05bbf1403d808e89d57d67a3875a7"}, + {file = "pyflakes-1.5.0.tar.gz", hash = "sha256:aa0d4dff45c0cc2214ba158d29280f8fa1129f3e87858ef825930845146337f4"}, ] pygments = [ {file = "Pygments-2.6.1-py3-none-any.whl", hash = "sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324"}, @@ -2106,8 +2111,8 @@ saasy = [ {file = "saasy-0.0.1.tar.gz", hash = "sha256:bd04101cbb066bf7db7d312d11729af570a97dc11a13a68b111bf5bb541acca6"}, ] sentry-sdk = [ - {file = "sentry-sdk-0.14.2.tar.gz", hash = "sha256:480eee754e60bcae983787a9a13bc8f155a111aef199afaa4f289d6a76aa622a"}, - {file = "sentry_sdk-0.14.2-py2.py3-none-any.whl", hash = "sha256:a920387dc3ee252a66679d0afecd34479fb6fc52c2bc20763793ed69e5b0dcc0"}, + {file = "sentry-sdk-0.14.3.tar.gz", hash = "sha256:bb90a4e19c7233a580715fc986cc44be2c48fc10b31e71580a2037e1c94b6950"}, + {file = "sentry_sdk-0.14.3-py2.py3-none-any.whl", hash = "sha256:23808d571d2461a4ce3784ec12bbee5bdb8c026c143fe79d36cef8a6d653e71f"}, ] setoptconf = [ {file = "setoptconf-0.2.0.tar.gz", hash = "sha256:5b0b5d8e0077713f5d5152d4f63be6f048d9a1bb66be15d089a11c898c3cf49c"}, @@ -2188,8 +2193,8 @@ virtualenv = [ {file = "virtualenv-20.0.13.tar.gz", hash = "sha256:f3128d882383c503003130389bf892856341c1da12c881ae24d6358c82561b55"}, ] wcwidth = [ - {file = "wcwidth-0.1.8-py2.py3-none-any.whl", hash = "sha256:8fd29383f539be45b20bd4df0dc29c20ba48654a41e661925e612311e9f3c603"}, - {file = "wcwidth-0.1.8.tar.gz", hash = "sha256:f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8"}, + {file = "wcwidth-0.1.9-py2.py3-none-any.whl", hash = "sha256:cafe2186b3c009a04067022ce1dcd79cb38d8d65ee4f4791b8888d6599d1bbe1"}, + {file = "wcwidth-0.1.9.tar.gz", hash = "sha256:ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1"}, ] werkzeug = [ {file = "Werkzeug-1.0.0-py2.py3-none-any.whl", hash = "sha256:6dc65cf9091cf750012f56f2cad759fa9e879f511b5ff8685e456b4e3bf90d16"}, diff --git a/pyproject.toml b/pyproject.toml index 7901639..b7ad792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,17 +8,17 @@ packages = [ ] [tool.poetry.dependencies] -python = ">=3.7,<3.8" -django = "<3" +python = ">=3.7,<3.8" # Python versions must be set in dependencies for poetry +django = "<3" # Basics and boilerplate stuff (BSD-3) django-environ = "^0.4.5" # Configuration by environment variables according to 12Factor model (MIT) sentry-sdk = "^0.14.2" # Error logging to Sentry -django-rest-framework = "^0.1.0" -psycopg2-binary = "^2.8.4" -gunicorn = "^20.0.4" +django-rest-framework = "^0.1.0" # Tools for RESTful API (BSD-2) +psycopg2-binary = "^2.8.4" # Database connector (LGPL) +gunicorn = "^20.0.4" # Python WSGI HTTP Server django-cors-headers = "^3.2.1" -django-extensions = "^2.2.8" -django-rq = "^2.3.0" -django-redis = "^4.11.0" +django-extensions = "^2.2.8" # Different helpers for Django REST Framework +django-rq = "^2.3.0" # Asynchronous tasks +django-redis = "^4.11.0" # Redis cache backend (BSD-3) whitenoise = "^5.0.1" urllib3 = "^1.25.8" saasy = "^0.0.1" @@ -30,21 +30,21 @@ drf-yasg = "^1.17.1" [tool.poetry.dev-dependencies] django-werkzeug = "^1.0.0" -ipdb = "^0.13.2" +ipdb = "^0.13.2" # Debugging django-coverage-plugin = "^1.8.0" django-pdb = "^0.6.2" -werkzeug = "^1.0.0" +werkzeug = "^1.0.0" # A flexible WSGI implementation and toolkit (BSD-3) mypy = "^0.770" -factory_boy = "^2.12.0" +factory_boy = "^2.12.0" # Mocked Test data coverage = "^5.0.4" -ipython = "^7.13.0" +ipython = "^7.13.0" # Better Python shell pre-commit = "^2.2.0" prospector = ">1.1.6.4" Faker = "^4.0.2" black = "^19.10b0" -flake8 = "^1.3.5" -pytest = "<5.4.0" -autopep8 = "<1.3.6" +flake8 = "<=3.4.0" # Old version, because prospector stick with old deps of pyflake and pycodestyles +pytest = "<5.4.0" # Better testing +autopep8 = "<=1.3.5" # Old version, because prospector stick with old deps of pyflake and pycodestyles django-silk = "^4.0.1" pytest-django = "^3.8.0" pytest-xdist = "^1.31.0"