From 8f3acca32a8b4dc251b4d4e9b4588397f1c2036f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Thu, 13 Feb 2020 10:33:31 +0100 Subject: [PATCH 1/9] Add django-simple-captcha into tests/requirements. --- tests/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/requirements.txt b/tests/requirements.txt index 586311d9..39ecac65 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,5 +3,6 @@ tox>=2.9.1 coverage>=4.4.2 django-polymorphic>=1.3,<2.0 djangocms-text-ckeditor>=3.7.0 +django-simple-captcha flake8 isort From 054882ccff0b1ab5ebd65a60aaab5b38e013db7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Thu, 13 Feb 2020 10:46:04 +0100 Subject: [PATCH 2/9] Add icon Travis CI Build into README. --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 67b7b1c5..18d40aa9 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,6 @@ +.. image:: https://secure.travis-ci.org/zbohm/aldryn-forms.png?branch=fix-travis-ci + :target: http://travis-ci.com/zbohm/aldryn-forms + ================ Aldryn Forms App ================ From 0438bda034abed94fc65d0648432db26b7942a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Thu, 13 Feb 2020 10:53:07 +0100 Subject: [PATCH 3/9] Adjust REQUIREMENTS to django>=1.11 in setup. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index aa10a311..90a002ff 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ REQUIREMENTS = [ - 'django>=2.0', + 'django>=1.11', 'aldryn-boilerplates>=0.7.5', 'django-cms>=3.5', 'django-emailit', From 3eb5d645c5fd1c64d79404a923a5f47f7565b9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Thu, 13 Feb 2020 11:21:36 +0100 Subject: [PATCH 4/9] Remove support of py34 due to PyYAML requires Python ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*". --- .travis.yml | 14 -------------- tox.ini | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7bbd4d4..668a55d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,15 +18,6 @@ matrix: - python: 3.5 env: DJANGO='dj111' CMS='cms40' - - python: 3.4 - env: DJANGO='dj111' CMS='cms34' - - python: 3.4 - env: DJANGO='dj111' CMS='cms35' - - python: 3.4 - env: DJANGO='dj111' CMS='cms36' - - python: 3.4 - env: DJANGO='dj111' CMS='cms40' - - python: 2.7 env: DJANGO='dj111' CMS='cms34' - python: 2.7 @@ -36,14 +27,10 @@ matrix: - python: 2.7 env: DJANGO='dj111' CMS='cms40' # Django 2.0 - - python: 3.4 - env: DJANGO='dj20' CMS='cms36' - python: 3.5 env: DJANGO='dj20' CMS='cms36' - python: 3.6 env: DJANGO='dj20' CMS='cms36' - - python: 3.4 - env: DJANGO='dj20' CMS='cms40' - python: 3.5 env: DJANGO='dj20' CMS='cms40' - python: 3.6 @@ -65,7 +52,6 @@ cache: install: - pip install coverage isort tox - "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PY_VER=py27; fi" - - "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PY_VER=py34; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi" - "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi" diff --git a/tox.ini b/tox.ini index 54abe8f5..551b7a3c 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ envlist = flake8 isort - py{27,34,35,36}-dj111-cms{34,35,36,40} - py{34,35,36}-dj20-cms{36,40} + py{27,35,36}-dj111-cms{34,35,36,40} + py{35,36}-dj20-cms{36,40} py{35,36}-dj21-cms{36,40} skip_missing_interpreters=True From 08cce80a004a2133302222d9b1ff6607a623aa4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Thu, 13 Feb 2020 12:50:44 +0100 Subject: [PATCH 5/9] Drop support of Python 2. --- .travis.yml | 9 --------- tox.ini | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 668a55d7..3763828c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,14 +18,6 @@ matrix: - python: 3.5 env: DJANGO='dj111' CMS='cms40' - - python: 2.7 - env: DJANGO='dj111' CMS='cms34' - - python: 2.7 - env: DJANGO='dj111' CMS='cms35' - - python: 2.7 - env: DJANGO='dj111' CMS='cms36' - - python: 2.7 - env: DJANGO='dj111' CMS='cms40' # Django 2.0 - python: 3.5 env: DJANGO='dj20' CMS='cms36' @@ -51,7 +43,6 @@ cache: install: - pip install coverage isort tox - - "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PY_VER=py27; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi" - "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi" diff --git a/tox.ini b/tox.ini index 551b7a3c..9445b186 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = flake8 isort - py{27,35,36}-dj111-cms{34,35,36,40} + py{35,36}-dj111-cms{34,35,36,40} py{35,36}-dj20-cms{36,40} py{35,36}-dj21-cms{36,40} From 40628fdb91f7f30f823f42321e5889b6dc1e7520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Fri, 14 Feb 2020 09:46:27 +0100 Subject: [PATCH 6/9] Update test_views for cms 4.x. --- tests/test_views.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/test_views.py b/tests/test_views.py index a554c06e..7254d905 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -33,9 +33,9 @@ def setUp(self): published=True, apphook='FormsApp', ) - try: + if CMS_3_6: self.placeholder = self.page.placeholders.get(slot='content') - except AttributeError: + else: self.placeholder = self.page.get_placeholders('en').get(slot='content') self.redirect_url = 'http://www.google.com' @@ -91,11 +91,9 @@ def reload_urls(self): def test_form_view_and_submission_with_apphook_django_gte_111(self): if CMS_3_6: public_page = self.page.publisher_public + public_placeholder = public_page.placeholders.first() else: public_page = self.page - try: - public_placeholder = public_page.placeholders.first() - except AttributeError: public_placeholder = public_page.get_placeholders('en').first() public_page_form_plugin = ( @@ -148,7 +146,10 @@ def test_view_submit_one_form_instead_multiple(self): published=True, apphook='FormsApp', ) - placeholder = page.placeholders.get(slot='content') + if CMS_3_6: + placeholder = page.placeholders.get(slot='content') + else: + placeholder = page.get_placeholders('en').get(slot='content') form_plugin = add_plugin( placeholder, @@ -200,7 +201,8 @@ def test_view_submit_one_form_instead_multiple(self): form_plugin2.action_backend = 'default' form_plugin2.save() - page.publish('en') + if CMS_3_6: + page.publish('en') self.reload_urls() self.apphook_clear() @@ -219,7 +221,10 @@ def test_view_submit_one_valid_form_instead_multiple(self): published=True, apphook='FormsApp', ) - placeholder = page.placeholders.get(slot='content') + if CMS_3_6: + placeholder = page.placeholders.get(slot='content') + else: + placeholder = page.get_placeholders('en').get(slot='content') form_plugin = add_plugin( placeholder, @@ -273,7 +278,8 @@ def test_view_submit_one_valid_form_instead_multiple(self): form_plugin2.action_backend = 'default' form_plugin2.save() - page.publish('en') + if CMS_3_6: + page.publish('en') self.reload_urls() self.apphook_clear() From 571edf045e5dce7987e604a3747d8361de0e5459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Fri, 14 Feb 2020 10:31:01 +0100 Subject: [PATCH 7/9] Set branch release/4.0.x for cms in tox.ini. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9445b186..98197ae0 100644 --- a/tox.ini +++ b/tox.ini @@ -48,7 +48,7 @@ deps = cms34: django-cms>=3.4,<3.5 cms35: django-cms>=3.5,<3.6 cms36: django-cms>=3.6,<3.7 - cms40: https://github.com/divio/django-cms/archive/release/4.0.x.zip + cms40: git+https://github.com/divio/django-cms.git@release/4.0.x#egg=cms commands = {envpython} --version {env:COMMAND:coverage} erase From 2191f87ceba969034da32f417a56b5f9e8cbd542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Fri, 14 Feb 2020 10:45:06 +0100 Subject: [PATCH 8/9] CMS 4.x still does not support properly Django 2.x. --- .travis.yml | 8 -------- tox.ini | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3763828c..75ed6208 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,19 +23,11 @@ matrix: env: DJANGO='dj20' CMS='cms36' - python: 3.6 env: DJANGO='dj20' CMS='cms36' - - python: 3.5 - env: DJANGO='dj20' CMS='cms40' - - python: 3.6 - env: DJANGO='dj20' CMS='cms40' # Django 2.1 - python: 3.5 env: DJANGO='dj21' CMS='cms36' - python: 3.6 env: DJANGO='dj21' CMS='cms36' - - python: 3.5 - env: DJANGO='dj21' CMS='cms40' - - python: 3.6 - env: DJANGO='dj21' CMS='cms40' cache: directories: diff --git a/tox.ini b/tox.ini index 98197ae0..1299c09f 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,8 @@ envlist = flake8 isort py{35,36}-dj111-cms{34,35,36,40} - py{35,36}-dj20-cms{36,40} - py{35,36}-dj21-cms{36,40} + py{35,36}-dj20-cms{36} + py{35,36}-dj21-cms{36} skip_missing_interpreters=True From 6a0f1263a3c3a1e901f82deec7a7e9a2df4d681f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20B=C3=B6hm?= Date: Fri, 14 Feb 2020 11:04:39 +0100 Subject: [PATCH 9/9] Extend tests to python 3.7 and 3.8. --- .travis.yml | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++--- tox.ini | 7 ++--- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 75ed6208..dcdb8d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,8 @@ matrix: env: TOX_ENV='flake8' - python: 3.5 env: TOX_ENV='isort' - # Django 1.11 + + # python 3.5 + Django 1.11 + CMS 34, 35, 36, 37, 40 - python: 3.5 env: DJANGO='dj111' CMS='cms34' - python: 3.5 @@ -16,18 +17,84 @@ matrix: - python: 3.5 env: DJANGO='dj111' CMS='cms36' - python: 3.5 + env: DJANGO='dj111' CMS='cms37' + - python: 3.5 + env: DJANGO='dj111' CMS='cms40' + # python 3.6 + Django 1.11 + CMS 34, 35, 36, 37, 40 + - python: 3.6 + env: DJANGO='dj111' CMS='cms34' + - python: 3.6 + env: DJANGO='dj111' CMS='cms35' + - python: 3.6 + env: DJANGO='dj111' CMS='cms36' + - python: 3.6 + env: DJANGO='dj111' CMS='cms37' + - python: 3.6 + env: DJANGO='dj111' CMS='cms40' + # python 3.7 + Django 1.11 + CMS 34, 35, 36, 37, 40 + - python: 3.7 + env: DJANGO='dj111' CMS='cms34' + - python: 3.7 + env: DJANGO='dj111' CMS='cms35' + - python: 3.7 + env: DJANGO='dj111' CMS='cms36' + - python: 3.7 + env: DJANGO='dj111' CMS='cms37' + - python: 3.7 + env: DJANGO='dj111' CMS='cms40' + # python 3.8 + Django 1.11 + CMS 34, 35, 36, 37, 40 + - python: 3.8 + env: DJANGO='dj111' CMS='cms34' + - python: 3.8 + env: DJANGO='dj111' CMS='cms35' + - python: 3.8 + env: DJANGO='dj111' CMS='cms36' + - python: 3.8 + env: DJANGO='dj111' CMS='cms37' + - python: 3.8 env: DJANGO='dj111' CMS='cms40' - # Django 2.0 + # python 3.5 + Django 2.0 + CMS 36, 37 + - python: 3.5 + env: DJANGO='dj20' CMS='cms36' - python: 3.5 + env: DJANGO='dj20' CMS='cms37' + # python 3.6 + Django 2.0 + CMS 36, 37 + - python: 3.6 env: DJANGO='dj20' CMS='cms36' - python: 3.6 + env: DJANGO='dj20' CMS='cms37' + # python 3.7 + Django 2.0 + CMS 36, 37 + - python: 3.7 + env: DJANGO='dj20' CMS='cms36' + - python: 3.7 + env: DJANGO='dj20' CMS='cms37' + # python 3.8 + Django 2.0 + CMS 36, 37 + - python: 3.8 env: DJANGO='dj20' CMS='cms36' - # Django 2.1 + - python: 3.8 + env: DJANGO='dj20' CMS='cms37' + + # python 3.5 + Django 2.1 + CMS 36, 37 - python: 3.5 env: DJANGO='dj21' CMS='cms36' + - python: 3.5 + env: DJANGO='dj21' CMS='cms37' + # python 3.6 + Django 2.1 + CMS 36, 37 - python: 3.6 env: DJANGO='dj21' CMS='cms36' + - python: 3.6 + env: DJANGO='dj21' CMS='cms37' + # python 3.7 + Django 2.1 + CMS 36, 37 + - python: 3.7 + env: DJANGO='dj21' CMS='cms36' + - python: 3.7 + env: DJANGO='dj21' CMS='cms37' + # python 3.8 + Django 2.1 + CMS 36, 37 + - python: 3.8 + env: DJANGO='dj21' CMS='cms36' + - python: 3.8 + env: DJANGO='dj21' CMS='cms37' cache: directories: @@ -37,6 +104,8 @@ install: - pip install coverage isort tox - "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi" + - "if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then export PY_VER=py37; fi" + - "if [[ $TRAVIS_PYTHON_VERSION == '3.8' ]]; then export PY_VER=py38; fi" - "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi" script: diff --git a/tox.ini b/tox.ini index 1299c09f..dc9a179e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,9 +2,9 @@ envlist = flake8 isort - py{35,36}-dj111-cms{34,35,36,40} - py{35,36}-dj20-cms{36} - py{35,36}-dj21-cms{36} + py{35,36,37,38}-dj111-cms{34,35,36,37,40} + py{35,36,37,38}-dj20-cms{36,37} + py{35,36,37,38}-dj21-cms{36,37} skip_missing_interpreters=True @@ -48,6 +48,7 @@ deps = cms34: django-cms>=3.4,<3.5 cms35: django-cms>=3.5,<3.6 cms36: django-cms>=3.6,<3.7 + cms37: django-cms>=3.7,<3.8 cms40: git+https://github.com/divio/django-cms.git@release/4.0.x#egg=cms commands = {envpython} --version