From 35d57d048bab0b22e54999100707833a6150b335 Mon Sep 17 00:00:00 2001 From: enchance Date: Fri, 24 Jul 2020 00:53:56 +0800 Subject: [PATCH 1/8] Compatibility issue for mypy 0.782. Must be mypy 0.770 because it uses djago-stubs 1.5.0. --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index cbb8dc31..f315d9dc 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.782 # https://github.com/python/mypy +mypy==0.770 # https://github.com/python/mypy django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs pytest==5.4.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar From 160ed6cb6d5ee552bef7fc5538255a074e85624f Mon Sep 17 00:00:00 2001 From: enchance Date: Fri, 24 Jul 2020 01:00:56 +0800 Subject: [PATCH 2/8] Added name to CONTRIBUTORS.txt --- {{cookiecutter.project_slug}}/CONTRIBUTORS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt b/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt index 82a80bfc..e8450c4c 100644 --- a/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt +++ b/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt @@ -1 +1 @@ -{{ cookiecutter.author_name }} +enchance \ No newline at end of file From dd6c76f3be0aec82ac131b7cbbd2ba8f12e6a789 Mon Sep 17 00:00:00 2001 From: Jan Fabry Date: Tue, 4 Aug 2020 17:06:37 +0200 Subject: [PATCH 3/8] Run isort as pre-commit hook Run it before flake8, so any errors will get fixed automatically. Fixes #2711 --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 6aa9207a..734a0a71 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -15,6 +15,11 @@ repos: hooks: - id: black + - repo: https://github.com/timothycrosley/isort + rev: 4.3.21 + hooks: + - id: isort + - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.3 hooks: From 4c9f338ec9e35b8c6af4a763c6b15c1bc1434ae7 Mon Sep 17 00:00:00 2001 From: Jan Fabry Date: Tue, 4 Aug 2020 17:12:20 +0200 Subject: [PATCH 4/8] Update CONTRIBUTORS.md Add myself, and fix link to @Sorasful --- CONTRIBUTORS.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index f1b5e0f0..eab2132f 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -141,6 +141,7 @@ Listed in alphabetical order. Isaac12x `@Isaac12x`_ Ivan Khomutov `@ikhomutov`_ James Williams `@jameswilliams1`_ + Jan Fabry `@janfabry`_ Jan Van Bruggen `@jvanbrug`_ Jelmer Draaijer `@foarsitter`_ Jerome Caisip `@jeromecaisip`_ @@ -331,6 +332,7 @@ Listed in alphabetical order. .. _@ikkebr: https://github.com/ikkebr .. _@Isaac12x: https://github.com/Isaac12x .. _@iynaix: https://github.com/iynaix +.. _@janfabry: https://github.com/janfabry .. _@jangeador: https://github.com/jangeador .. _@jazztpt: https://github.com/jazztpt .. _@jcass77: https://github.com/jcass77 @@ -392,7 +394,7 @@ Listed in alphabetical order. .. _@siauPatrick: https://github.com/siauPatrick .. _@sladinji: https://github.com/sladinji .. _@slafs: https://github.com/slafs -.. _@sorasful:: https://github.com/sorasful +.. _@sorasful: https://github.com/sorasful .. _@ssteinerX: https://github.com/ssteinerx .. _@step21: https://github.com/step21 .. _@stepmr: https://github.com/stepmr From 0c8cfc65aa9c6a25cd15527b2c8ca4a5e9b15822 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 11 Aug 2020 01:42:06 -0700 Subject: [PATCH 5/8] Update flake8-isort from 3.0.1 to 4.0.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1fbc8d16..fd88434d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ binaryornot==0.4.4 black==19.10b0 isort==4.3.21 flake8==3.8.3 -flake8-isort==3.0.1 +flake8-isort==4.0.0 # Testing # ------------------------------------------------------------------------------ From 85cfe02437fa094b779193260a87ee372f88fd06 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 11 Aug 2020 01:42:07 -0700 Subject: [PATCH 6/8] Update flake8-isort from 3.0.1 to 4.0.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 028b36a9..6b6f00e9 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -26,7 +26,7 @@ sphinx-autobuild==0.7.1 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ flake8==3.8.3 # https://github.com/PyCQA/flake8 -flake8-isort==3.0.1 # https://github.com/gforcada/flake8-isort +flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort coverage==5.2.1 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black pylint-django==2.3.0 # https://github.com/PyCQA/pylint-django From 97e18889c68b55326fbf11685ebc7d239ac7ed72 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 11 Aug 2020 16:05:14 +0100 Subject: [PATCH 7/8] Revert "Added name to CONTRIBUTORS.txt" This reverts commit 160ed6cb --- {{cookiecutter.project_slug}}/CONTRIBUTORS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt b/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt index e8450c4c..82a80bfc 100644 --- a/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt +++ b/{{cookiecutter.project_slug}}/CONTRIBUTORS.txt @@ -1 +1 @@ -enchance \ No newline at end of file +{{ cookiecutter.author_name }} From 1645b8826d49a8bd57c8843bc8e78df0708163d3 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 11 Aug 2020 16:20:10 +0100 Subject: [PATCH 8/8] Use the pip resolver to avoid broken deps --- tests/test_bare.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_bare.sh b/tests/test_bare.sh index 7021a7e4..28f9b7bf 100755 --- a/tests/test_bare.sh +++ b/tests/test_bare.sh @@ -5,6 +5,10 @@ set -o errexit +# Install modern pip to use new resolver: +# https://blog.python.org/2020/07/upgrade-pip-20-2-changes-20-3.html +pip install 'pip>=20.2' + # install test requirements pip install -r requirements.txt @@ -20,7 +24,7 @@ cd my_awesome_project sudo utility/install_os_dependencies.sh install # Install Python deps -pip install -r requirements/local.txt +pip install --use-feature=2020-resolver -r requirements/local.txt # run the project's tests pytest