From ff509a3dfc0e30a6549d9dedfb0721f249a5e816 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 23:45:55 +0300 Subject: [PATCH 01/11] build(deps-dev): bump ipython from 7.19.0 to 7.21.0 (#107) Bumps [ipython](https://github.com/ipython/ipython) from 7.19.0 to 7.21.0. - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](https://github.com/ipython/ipython/compare/7.19.0...7.21.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index dfdfde7..b1e6d18 100644 --- a/poetry.lock +++ b/poetry.lock @@ -586,7 +586,7 @@ python-versions = "*" [[package]] name = "ipython" -version = "7.19.0" +version = "7.21.0" description = "IPython: Productive Interactive Computing" category = "dev" optional = false @@ -597,7 +597,7 @@ appnope = {version = "*", markers = "sys_platform == \"darwin\""} backcall = "*" colorama = {version = "*", markers = "sys_platform == \"win32\""} decorator = "*" -jedi = ">=0.10" +jedi = ">=0.16" pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} pickleshare = "*" prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" @@ -1143,7 +1143,7 @@ typing_extensions = ">=3.6,<4.0" [metadata] lock-version = "1.1" python-versions = "~3.8" -content-hash = "e77ddfe7ad1a380499344accc2b8da597a8c88b3e2ff6af888f1595ace6d538c" +content-hash = "e20a3d95570522ae48e9ba617271b2e5fde7524fafe706b395a457a1fa8d2403" [metadata.files] amqp = [ @@ -1389,8 +1389,8 @@ iniconfig = [ {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] ipython = [ - {file = "ipython-7.19.0-py3-none-any.whl", hash = "sha256:c987e8178ced651532b3b1ff9965925bfd445c279239697052561a9ab806d28f"}, - {file = "ipython-7.19.0.tar.gz", hash = "sha256:cbb2ef3d5961d44e6a963b9817d4ea4e1fa2eb589c371a470fed14d8d40cbd6a"}, + {file = "ipython-7.21.0-py3-none-any.whl", hash = "sha256:34207ffb2f653bced2bc8e3756c1db86e7d93e44ed049daae9814fed66d408ec"}, + {file = "ipython-7.21.0.tar.gz", hash = "sha256:04323f72d5b85b606330b6d7e2dc8d2683ad46c3905e955aa96ecc7a99388e70"}, ] ipython-genutils = [ {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, diff --git a/pyproject.toml b/pyproject.toml index bf9f210..f49e52d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ flake8-use-fstring = "~1.1" flake8-django = "~1.1.1" flake8-type-annotations = "~0.1.0" flake8-annotations-coverage = "~0.0.4" -ipython = "^7.19.0" +ipython = "^7.21.0" [build-system] requires = ["poetry>=1.0.5"] From 5bb4631793c84556f1f909f20e5377c0dfb29e24 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 01:36:31 +0300 Subject: [PATCH 02/11] build(deps-dev): bump flake8-annotations-coverage from 0.0.4 to 0.0.5 (#94) Bumps [flake8-annotations-coverage](https://github.com/best-doctor/flake8-annotations-coverage) from 0.0.4 to 0.0.5. - [Release notes](https://github.com/best-doctor/flake8-annotations-coverage/releases) - [Commits](https://github.com/best-doctor/flake8-annotations-coverage/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index b1e6d18..108f261 100644 --- a/poetry.lock +++ b/poetry.lock @@ -326,7 +326,7 @@ pyflakes = ">=2.2.0,<2.3.0" [[package]] name = "flake8-annotations-coverage" -version = "0.0.4" +version = "0.0.5" description = "A flake8 extension that checks for type annotations coverage" category = "dev" optional = false @@ -1143,7 +1143,7 @@ typing_extensions = ">=3.6,<4.0" [metadata] lock-version = "1.1" python-versions = "~3.8" -content-hash = "e20a3d95570522ae48e9ba617271b2e5fde7524fafe706b395a457a1fa8d2403" +content-hash = "7426f22a5cdd46d62271e03e371ef52d65e02a2e6bcc8346bef3bfb731fedbe9" [metadata.files] amqp = [ @@ -1303,7 +1303,7 @@ flake8 = [ {file = "flake8-3.8.4.tar.gz", hash = "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b"}, ] flake8-annotations-coverage = [ - {file = "flake8_annotations_coverage-0.0.4.tar.gz", hash = "sha256:65ef219d103f95d56e78604a335edb52b8de73baa85f6a975a20967cfb0f4c57"}, + {file = "flake8_annotations_coverage-0.0.5.tar.gz", hash = "sha256:6a209073d1afd31352ff8eedb4521d6210993cba51fbfff850e3d80c6b528f58"}, ] flake8-bandit = [ {file = "flake8_bandit-2.1.2.tar.gz", hash = "sha256:687fc8da2e4a239b206af2e54a90093572a60d0954f3054e23690739b0b0de3b"}, diff --git a/pyproject.toml b/pyproject.toml index f49e52d..6424ff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ wemake-python-styleguide = "~0.14.1" flake8-use-fstring = "~1.1" flake8-django = "~1.1.1" flake8-type-annotations = "~0.1.0" -flake8-annotations-coverage = "~0.0.4" +flake8-annotations-coverage = "~0.0.5" ipython = "^7.21.0" [build-system] From 790cb6031a38bbfcb668839d01eb7203bee52470 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 01:46:32 +0300 Subject: [PATCH 03/11] build(deps): bump django from 3.1.4 to 3.1.7 (#104) Bumps [django](https://github.com/django/django) from 3.1.4 to 3.1.7. - [Release notes](https://github.com/django/django/releases) - [Commits](https://github.com/django/django/compare/3.1.4...3.1.7) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 108f261..5449fef 100644 --- a/poetry.lock +++ b/poetry.lock @@ -241,7 +241,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*" [[package]] name = "django" -version = "3.1.4" +version = "3.1.7" description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." category = "main" optional = false @@ -1273,8 +1273,8 @@ decorator = [ {file = "decorator-4.4.2.tar.gz", hash = "sha256:e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7"}, ] django = [ - {file = "Django-3.1.4-py3-none-any.whl", hash = "sha256:5c866205f15e7a7123f1eec6ab939d22d5bde1416635cab259684af66d8e48a2"}, - {file = "Django-3.1.4.tar.gz", hash = "sha256:edb10b5c45e7e9c0fb1dc00b76ec7449aca258a39ffd613dbd078c51d19c9f03"}, + {file = "Django-3.1.7-py3-none-any.whl", hash = "sha256:baf099db36ad31f970775d0be5587cc58a6256a6771a44eb795b554d45f211b8"}, + {file = "Django-3.1.7.tar.gz", hash = "sha256:32ce792ee9b6a0cbbec340123e229ac9f765dff8c2a4ae9247a14b2ba3a365a7"}, ] django-debug-toolbar = [ {file = "django-debug-toolbar-3.2.tar.gz", hash = "sha256:84e2607d900dbd571df0a2acf380b47c088efb787dce9805aefeb407341961d2"}, From c726c58f1a941f0d6d34c4447161d0b75c3bd8c1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 01:49:05 +0300 Subject: [PATCH 04/11] build(deps): bump uvicorn from 0.13.2 to 0.13.4 (#105) Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.13.2 to 0.13.4. - [Release notes](https://github.com/encode/uvicorn/releases) - [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/uvicorn/compare/0.13.2...0.13.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5449fef..22b8337 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1082,7 +1082,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "uvicorn" -version = "0.13.2" +version = "0.13.4" description = "The lightning-fast ASGI server." category = "main" optional = false @@ -1093,7 +1093,7 @@ click = ">=7.0.0,<8.0.0" h11 = ">=0.8" [package.extras] -standard = ["websockets (>=8.0.0,<9.0.0)", "watchgod (>=0.6,<0.7)", "python-dotenv (>=0.13)", "PyYAML (>=5.1)", "httptools (>=0.1.0,<0.2.0)", "uvloop (>=0.14.0)", "colorama (>=0.4)"] +standard = ["websockets (>=8.0.0,<9.0.0)", "watchgod (>=0.6)", "python-dotenv (>=0.13)", "PyYAML (>=5.1)", "httptools (>=0.1.0,<0.2.0)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "colorama (>=0.4)"] [[package]] name = "vine" @@ -1143,7 +1143,7 @@ typing_extensions = ">=3.6,<4.0" [metadata] lock-version = "1.1" python-versions = "~3.8" -content-hash = "7426f22a5cdd46d62271e03e371ef52d65e02a2e6bcc8346bef3bfb731fedbe9" +content-hash = "b627f212c47c86a6beb1dec0f80542c8a234cc1f46c4e0e87c4859c3f02cd41f" [metadata.files] amqp = [ @@ -1585,8 +1585,8 @@ urllib3 = [ {file = "urllib3-1.26.2.tar.gz", hash = "sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08"}, ] uvicorn = [ - {file = "uvicorn-0.13.2-py3-none-any.whl", hash = "sha256:6707fa7f4dbd86fd6982a2d4ecdaad2704e4514d23a1e4278104311288b04691"}, - {file = "uvicorn-0.13.2.tar.gz", hash = "sha256:d19ca083bebd212843e01f689900e5c637a292c63bb336c7f0735a99300a5f38"}, + {file = "uvicorn-0.13.4-py3-none-any.whl", hash = "sha256:7587f7b08bd1efd2b9bad809a3d333e972f1d11af8a5e52a9371ee3a5de71524"}, + {file = "uvicorn-0.13.4.tar.gz", hash = "sha256:3292251b3c7978e8e4a7868f4baf7f7f7bb7e40c759ecc125c37e99cdea34202"}, ] vine = [ {file = "vine-5.0.0-py2.py3-none-any.whl", hash = "sha256:4c9dceab6f76ed92105027c49c823800dd33cacce13bdedc5b914e3514b7fb30"}, diff --git a/pyproject.toml b/pyproject.toml index 6424ff3..4985d4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ python = "~3.8" django = "~3.1" django-simpleui = "~2021.1" -uvicorn = "~0.13.2" +uvicorn = "~0.13.4" psycopg2 = "~2.8.6" django-environ = "^0.4.5" django-extensions = "^3.1.0" From 2d99c5d782819efdf82f0ef434e3f3511377966c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 01:55:21 +0300 Subject: [PATCH 05/11] build(deps-dev): bump pytest from 6.2.1 to 6.2.2 (#97) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.1...6.2.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 22b8337..380ecad 100644 --- a/poetry.lock +++ b/poetry.lock @@ -841,7 +841,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "6.2.1" +version = "6.2.2" description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -1490,8 +1490,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.2.1-py3-none-any.whl", hash = "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8"}, - {file = "pytest-6.2.1.tar.gz", hash = "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306"}, + {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, + {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, ] pytest-cov = [ {file = "pytest-cov-2.10.1.tar.gz", hash = "sha256:47bd0ce14056fdd79f93e1713f88fad7bdcc583dcd7783da86ef2f085a0bb88e"}, From 67583d7a29d7b6c402723e80efb71d783cb2d3cf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 01:57:45 +0300 Subject: [PATCH 06/11] build(deps-dev): bump pytest-cov from 2.10.1 to 2.11.1 (#96) Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.10.1 to 2.11.1. - [Release notes](https://github.com/pytest-dev/pytest-cov/releases) - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...v2.11.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 380ecad..a4f91d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -862,14 +862,14 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-cov" -version = "2.10.1" +version = "2.11.1" description = "Pytest plugin for measuring coverage." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -coverage = ">=4.4" +coverage = ">=5.2.1" pytest = ">=4.6" [package.extras] @@ -1143,7 +1143,7 @@ typing_extensions = ">=3.6,<4.0" [metadata] lock-version = "1.1" python-versions = "~3.8" -content-hash = "b627f212c47c86a6beb1dec0f80542c8a234cc1f46c4e0e87c4859c3f02cd41f" +content-hash = "8634fe877815ea1e619acd0e2346915daf9e0296554481cce1767e37d4f8ed05" [metadata.files] amqp = [ @@ -1494,8 +1494,8 @@ pytest = [ {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, ] pytest-cov = [ - {file = "pytest-cov-2.10.1.tar.gz", hash = "sha256:47bd0ce14056fdd79f93e1713f88fad7bdcc583dcd7783da86ef2f085a0bb88e"}, - {file = "pytest_cov-2.10.1-py2.py3-none-any.whl", hash = "sha256:45ec2d5182f89a81fc3eb29e3d1ed3113b9e9a873bcddb2a71faaab066110191"}, + {file = "pytest-cov-2.11.1.tar.gz", hash = "sha256:359952d9d39b9f822d9d29324483e7ba04a3a17dd7d05aa6beb7ea01e359e5f7"}, + {file = "pytest_cov-2.11.1-py2.py3-none-any.whl", hash = "sha256:bdb9fdb0b85a7cc825269a4c56b48ccaa5c7e365054b6038772c32ddcdc969da"}, ] pytest-django = [ {file = "pytest-django-4.1.0.tar.gz", hash = "sha256:26f02c16d36fd4c8672390deebe3413678d89f30720c16efb8b2a6bf63b9041f"}, diff --git a/pyproject.toml b/pyproject.toml index 4985d4e..af4bda4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ requests = "^2.25.1" [tool.poetry.dev-dependencies] pytest = "~6.2" pytest-django = "~4.1.0" -pytest-cov = "~2.10.1" +pytest-cov = "~2.11.1" pytest-freezegun = "^0.4.2" wemake-python-styleguide = "~0.14.1" flake8-use-fstring = "~1.1" From 989ebd36f78f5019b7f2c373f28c03226658382f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 02:06:42 +0300 Subject: [PATCH 07/11] build(deps): bump django-extensions from 3.1.0 to 3.1.1 (#101) Bumps [django-extensions](https://github.com/django-extensions/django-extensions) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/django-extensions/django-extensions/releases) - [Changelog](https://github.com/django-extensions/django-extensions/blob/master/CHANGELOG.md) - [Commits](https://github.com/django-extensions/django-extensions/compare/3.1.0...3.1.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index a4f91d1..4c6dce2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -278,11 +278,11 @@ python-versions = "*" [[package]] name = "django-extensions" -version = "3.1.0" +version = "3.1.1" description = "Extensions for Django" category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] name = "django-simpleui" @@ -1143,7 +1143,7 @@ typing_extensions = ">=3.6,<4.0" [metadata] lock-version = "1.1" python-versions = "~3.8" -content-hash = "8634fe877815ea1e619acd0e2346915daf9e0296554481cce1767e37d4f8ed05" +content-hash = "96c005cf6f841cb2b4979e114fe2f7c4cdbaefc38fb0824fbcf394ec8752eab2" [metadata.files] amqp = [ @@ -1285,8 +1285,8 @@ django-environ = [ {file = "django_environ-0.4.5-py2.py3-none-any.whl", hash = "sha256:c57b3c11ec1f319d9474e3e5a79134f40174b17c7cc024bbb2fad84646b120c4"}, ] django-extensions = [ - {file = "django-extensions-3.1.0.tar.gz", hash = "sha256:7cd002495ff0a0e5eb6cdd6be759600905b4e4079232ea27618fc46bdd853651"}, - {file = "django_extensions-3.1.0-py3-none-any.whl", hash = "sha256:c7f88625a53f631745d4f2bef9ec4dcb999ed59476393bdbbe99db8596778846"}, + {file = "django-extensions-3.1.1.tar.gz", hash = "sha256:674ad4c3b1587a884881824f40212d51829e662e52f85b012cd83d83fe1271d9"}, + {file = "django_extensions-3.1.1-py3-none-any.whl", hash = "sha256:9507f8761ee760748938fd8af766d0608fb2738cf368adfa1b2451f61c15ae35"}, ] django-simpleui = [ {file = "django-simpleui-2021.1.1.tar.gz", hash = "sha256:1f111be0ffab9132980762a5cc9d4d25fb4abc61c93cee406f6d5cf85d0b4a51"}, diff --git a/pyproject.toml b/pyproject.toml index af4bda4..8eb4fa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ django-simpleui = "~2021.1" uvicorn = "~0.13.4" psycopg2 = "~2.8.6" django-environ = "^0.4.5" -django-extensions = "^3.1.0" +django-extensions = "^3.1.1" django-debug-toolbar = "^3.1.1" celery = {extras = ["redis"], version = "^5.0.4"} RestrictedPython = "~5.1" From d1b21e209dc137e63435df9f543d8c51d015ab78 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 16 Mar 2021 02:14:58 +0300 Subject: [PATCH 08/11] build(deps): bump django-simpleui from 2021.1.1 to 2021.3 (#106) Bumps [django-simpleui](https://github.com/newpanjing/simpleui) from 2021.1.1 to 2021.3. - [Release notes](https://github.com/newpanjing/simpleui/releases) - [Commits](https://github.com/newpanjing/simpleui/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4c6dce2..79e5b21 100644 --- a/poetry.lock +++ b/poetry.lock @@ -286,7 +286,7 @@ python-versions = ">=3.6" [[package]] name = "django-simpleui" -version = "2021.1.1" +version = "2021.3" description = "django admin theme 后台模板" category = "main" optional = false @@ -1143,7 +1143,7 @@ typing_extensions = ">=3.6,<4.0" [metadata] lock-version = "1.1" python-versions = "~3.8" -content-hash = "96c005cf6f841cb2b4979e114fe2f7c4cdbaefc38fb0824fbcf394ec8752eab2" +content-hash = "8ffd267bad51b64dbdf55c52383d6dfce4ca70d71321135484c7ec4cef0fe49b" [metadata.files] amqp = [ @@ -1289,7 +1289,7 @@ django-extensions = [ {file = "django_extensions-3.1.1-py3-none-any.whl", hash = "sha256:9507f8761ee760748938fd8af766d0608fb2738cf368adfa1b2451f61c15ae35"}, ] django-simpleui = [ - {file = "django-simpleui-2021.1.1.tar.gz", hash = "sha256:1f111be0ffab9132980762a5cc9d4d25fb4abc61c93cee406f6d5cf85d0b4a51"}, + {file = "django-simpleui-2021.3.tar.gz", hash = "sha256:6daa6717cc1b74bc3f00206bd4b45c51c79afa9e40a7190d198bce990b9cda96"}, ] docutils = [ {file = "docutils-0.16-py2.py3-none-any.whl", hash = "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af"}, diff --git a/pyproject.toml b/pyproject.toml index 8eb4fa6..7c6c66f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ [tool.poetry.dependencies] python = "~3.8" django = "~3.1" -django-simpleui = "~2021.1" +django-simpleui = "~2021.3" uvicorn = "~0.13.4" psycopg2 = "~2.8.6" django-environ = "^0.4.5" From 11a008f218267dac9160296efe1a5a187b62dd39 Mon Sep 17 00:00:00 2001 From: lowitea Date: Thu, 18 Mar 2021 02:18:10 +0300 Subject: [PATCH 09/11] issue-76: Disable the log for a specific stub (#110) * issue-76: Disable the log for a specific stub * issue-76: fixes partial coverage * issue-76: replaces is_logging_enabled with enable_logging * issue-76: moves enable_logging to top --- .../0006_httpstub_is_logging_enabled.py | 18 +++++++++++++++ http_stubs/models.py | 5 ++++ http_stubs/tasks.py | 23 ++++++++++++++----- http_stubs/tests/test_tasks.py | 11 ++++++++- http_stubs/tests/test_views.py | 17 ++++++++++++-- http_stubs/views.py | 23 +++++++++++-------- 6 files changed, 78 insertions(+), 19 deletions(-) create mode 100644 http_stubs/migrations/0006_httpstub_is_logging_enabled.py diff --git a/http_stubs/migrations/0006_httpstub_is_logging_enabled.py b/http_stubs/migrations/0006_httpstub_is_logging_enabled.py new file mode 100644 index 0000000..50bb11f --- /dev/null +++ b/http_stubs/migrations/0006_httpstub_is_logging_enabled.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.4 on 2021-03-16 22:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('http_stubs', '0005_httpstub_request_script_logentry_result_script'), + ] + + operations = [ + migrations.AddField( + model_name='httpstub', + name='enable_logging', + field=models.BooleanField(default=False, help_text='Enables logging of requests', verbose_name='Logging'), + ), + ] diff --git a/http_stubs/models.py b/http_stubs/models.py index fd5cea0..8372400 100644 --- a/http_stubs/models.py +++ b/http_stubs/models.py @@ -53,6 +53,11 @@ class HTTPStub(models.Model): help_text='Path is a regular expression', default=False, ) + enable_logging = models.BooleanField( + verbose_name='Logging', + help_text='Enables logging of requests', + default=False, + ) method = models.CharField( verbose_name='Request method', max_length=10, diff --git a/http_stubs/tasks.py b/http_stubs/tasks.py index 7b48de1..aff130c 100644 --- a/http_stubs/tasks.py +++ b/http_stubs/tasks.py @@ -1,4 +1,5 @@ import json +from typing import Optional import requests from billiard.exceptions import SoftTimeLimitExceeded @@ -25,22 +26,32 @@ @celery_app.task() -def run_request_script(log_id: int, script: str, request_body: str) -> None: +def run_request_script( + script: str, + request_body: str, + log_id: Optional[int] = None, +) -> None: """Task for run custom scripts from http stubs. :param log_id: LogEntry.id :param script: HTTPStub.request_script :param request_body: text body from a request """ - log: LogEntry = LogEntry.objects.get(pk=log_id) + log: Optional[LogEntry] = None + if log_id is not None: + log = LogEntry.objects.get(pk=log_id) + loc = {'request_body': request_body, **restricted_builtins} byte_code = compile_restricted(script) try: exec(byte_code, loc, None) # noqa: S102, WPS421 except SoftTimeLimitExceeded: - log.result_script = 'Error: Execution time limit exceeded' + log_msg = 'Error: Execution time limit exceeded' except Exception as err: - log.result_script = f'Error: {err}' + log_msg = f'Error: {err}' else: - log.result_script = 'Done' - log.save() + log_msg = 'Done' + + if log is not None: + log.result_script = log_msg + log.save() diff --git a/http_stubs/tests/test_tasks.py b/http_stubs/tests/test_tasks.py index 401e40f..78357d8 100644 --- a/http_stubs/tests/test_tasks.py +++ b/http_stubs/tests/test_tasks.py @@ -33,6 +33,15 @@ def test_run_request_script(script, expect, log_entity_factory): :param log_entity_factory: a factory for make LogEntity """ log = log_entity_factory() - run_request_script.delay(log_id=log.id, script=script, request_body='') + run_request_script.delay(script=script, request_body='', log_id=log.id) log.refresh_from_db() assert log.result_script == expect + + +@pytest.mark.parametrize('script', ('a = 1', '1 / 0')) +def test_run_without_log(script): + """Tests run task without log_id. + + :param script: a request script + """ + run_request_script.run(script=script, request_body='') diff --git a/http_stubs/tests/test_views.py b/http_stubs/tests/test_views.py index 054bb40..0fa3594 100644 --- a/http_stubs/tests/test_views.py +++ b/http_stubs/tests/test_views.py @@ -48,11 +48,12 @@ def test_write_log(self, http_stub_factory, client): :param client: http client fixture """ content_type = 'text/plain' - http_body = http_stub_factory( + http_stub = http_stub_factory( method=HTTPMethod.POST.name, path='/regex/', regex_path=True, request_script='a = 1', + enable_logging=True, ) request_path = f'/regex/?query={"search" * 300}' @@ -78,11 +79,23 @@ def _datefmt(date) -> str: # noqa:WPS430 'Cookie': '', } assert log.body == 'test' - assert log.http_stub == http_body + assert log.http_stub == http_stub assert log.method == HTTPMethod.POST.name assert log.path == f'http://testserver{request_path}' assert log.result_script == 'Done' + def test_empty_log(self, http_stub_factory, client): + """Tests http stub without logs. + + :param http_stub_factory: HTTPStub factory + :param client: http client fixture + """ + stub_path = '/test/' + http_stub_factory(method=HTTPMethod.POST.name, path=stub_path) + response = client.post(stub_path) + assert response.status_code == HTTPStatus.OK + assert LogEntry.objects.last() is None + @pytest.mark.parametrize('method', HTTPMethod.names()) def test_exist_regexp_stub(self, method: str, http_stub_factory, client): """Tests response for the regex stub. diff --git a/http_stubs/views.py b/http_stubs/views.py index 6773d60..9b256e0 100644 --- a/http_stubs/views.py +++ b/http_stubs/views.py @@ -49,21 +49,24 @@ def dispatch(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: if not stub: return HttpResponseNotFound() - log = LogEntry.objects.create( - path=request.build_absolute_uri(), - method=request.method, - source_ip=request.META['REMOTE_ADDR'], - body=request.body.decode('utf-8'), - headers=dict(request.headers), - http_stub=stub, - result_script='Was launched' if stub.request_script else '', - ) + log = None + + if stub.enable_logging: + log = LogEntry.objects.create( + path=request.build_absolute_uri(), + method=request.method, + source_ip=request.META['REMOTE_ADDR'], + body=request.body.decode('utf-8'), + headers=dict(request.headers), + http_stub=stub, + result_script='Was launched' if stub.request_script else '', + ) if stub.request_script: run_request_script.delay( - log_id=log.pk, script=stub.request_script, request_body=request.body.decode('utf-8'), + log_id=log.pk if log else None, ) sleep(stub.resp_delay / 1000) From c783f7c56ecf428db5cc62e07c7e55a87551b287 Mon Sep 17 00:00:00 2001 From: lowit Date: Thu, 18 Mar 2021 02:29:35 +0300 Subject: [PATCH 10/11] release/1.1.0: update changelog --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2193569..fae38bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ # Version history We follow [Semantic Versions](https://semver.org/). +## 1.1.0 - Disable logs by default + +### Important changes +- Disable the log for a specific stub [#110](https://github.com/Uma-Tech/parrot/pull/110) + +### Updating dependencies +- django-simpleui from 2021.1.1 to 2021.3 [#106](https://github.com/Uma-Tech/parrot/pull/106) +- django-extensions from 3.1.0 to 3.1.1 [#101](https://github.com/Uma-Tech/parrot/pull/101) +- pytest-cov from 2.10.1 to 2.11.1 [#96](https://github.com/Uma-Tech/parrot/pull/96) +- pytest from 6.2.1 to 6.2.2 [#97](https://github.com/Uma-Tech/parrot/pull/97) +- uvicorn from 0.13.2 to 0.13.4 [#105](https://github.com/Uma-Tech/parrot/pull/105) +- django from 3.1.4 to 3.1.7 [#104](https://github.com/Uma-Tech/parrot/pull/104) +- flake8-annotations-coverage from 0.0.4 to 0.0.5 [#94](https://github.com/Uma-Tech/parrot/pull/94) +- ipython from 7.19.0 to 7.21.0 [#107](https://github.com/Uma-Tech/parrot/pull/107) + ## 1.0.1 - Improving docs ### Important changes From 58c684bcd3d158d10765ac88325c5f1a5a87e485 Mon Sep 17 00:00:00 2001 From: lowit Date: Thu, 18 Mar 2021 02:30:01 +0300 Subject: [PATCH 11/11] release/1.1.0: bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c6c66f..5c018c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "parrot" -version = "1.0.1" +version = "1.1.0" description = "Service for testing http requests and webhooks." authors = ["Evgeniy Mitin "] maintainers = ["Evgeniy Mitin "]