diff --git a/.zuul.yaml b/.zuul.yaml index c97920cf88..67fa310079 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -32,12 +32,6 @@ required-projects: - name: openstack/horizon -- job: - name: horizon-tox-python3-django111 - parent: horizon-tox-python3-django - vars: - django_version: '>=1.11,<2.0' - - job: name: horizon-tox-python3-django22 parent: horizon-tox-python3-django @@ -173,11 +167,9 @@ Run unit tests with non-primary Django versions. check: jobs: - - horizon-tox-python3-django111 - horizon-tox-python3-django22 gate: jobs: - - horizon-tox-python3-django111 - horizon-tox-python3-django22 - project: diff --git a/horizon/test/unit/management/commands/test_startdash.py b/horizon/test/unit/management/commands/test_startdash.py index 9c11be24e0..fc67d8d174 100644 --- a/horizon/test/unit/management/commands/test_startdash.py +++ b/horizon/test/unit/management/commands/test_startdash.py @@ -14,7 +14,6 @@ import mock -import django from django.core.management import call_command from django.core.management import CommandError from django.test import TestCase @@ -30,17 +29,9 @@ class CommandsTestCase(TestCase): def test_startdash_usage_correct(self, handle): call_command('startdash', 'test_dash') - if django.VERSION >= (2, 2): - handle.assert_called_with( - dash_name='test_dash', - extensions=["py", "tmpl", "html", "js", "css"], - files=[], force_color=False, no_color=False, pythonpath=None, - settings=None, skip_checks=True, target=None, template=None, - traceback=False, verbosity=1) - else: - handle.assert_called_with( - dash_name='test_dash', - extensions=["py", "tmpl", "html", "js", "css"], - files=[], no_color=False, pythonpath=None, - settings=None, skip_checks=True, target=None, template=None, - traceback=False, verbosity=1) + handle.assert_called_with( + dash_name='test_dash', + extensions=["py", "tmpl", "html", "js", "css"], + files=[], force_color=False, no_color=False, pythonpath=None, + settings=None, skip_checks=True, target=None, template=None, + traceback=False, verbosity=1) diff --git a/horizon/test/unit/management/commands/test_startpanel.py b/horizon/test/unit/management/commands/test_startpanel.py index 7c95414c1a..27d8999f3f 100644 --- a/horizon/test/unit/management/commands/test_startpanel.py +++ b/horizon/test/unit/management/commands/test_startpanel.py @@ -14,7 +14,6 @@ import mock -import django from django.core.management import call_command from django.core.management import CommandError from django.test import TestCase @@ -30,17 +29,9 @@ class CommandsTestCase(TestCase): def test_startpanel_usage_correct(self, handle): call_command('startpanel', 'test_dash', '--dashboard=foo.bar') - if django.VERSION >= (2, 2): - handle.assert_called_with( - panel_name='test_dash', dashboard='foo.bar', - extensions=["py", "tmpl", "html"], - files=[], force_color=False, no_color=False, pythonpath=None, - settings=None, skip_checks=True, target=None, - template=None, traceback=False, verbosity=1) - else: - handle.assert_called_with( - panel_name='test_dash', dashboard='foo.bar', - extensions=["py", "tmpl", "html"], - files=[], no_color=False, pythonpath=None, - settings=None, skip_checks=True, target=None, - template=None, traceback=False, verbosity=1) + handle.assert_called_with( + panel_name='test_dash', dashboard='foo.bar', + extensions=["py", "tmpl", "html"], + files=[], force_color=False, no_color=False, pythonpath=None, + settings=None, skip_checks=True, target=None, + template=None, traceback=False, verbosity=1) diff --git a/horizon/test/unit/tables/test_tables.py b/horizon/test/unit/tables/test_tables.py index 7ae68ee6c2..0c8b53c910 100644 --- a/horizon/test/unit/tables/test_tables.py +++ b/horizon/test/unit/tables/test_tables.py @@ -18,7 +18,6 @@ import unittest import uuid -import django from django import forms from django import http from django import shortcuts @@ -669,12 +668,8 @@ class DataTableTests(test.TestCase): row = self.table.get_rows()[0] self.assertEqual(35, len(row.cells['status'].data)) - if django.VERSION >= (2, 2): - self.assertEqual(u'A Status that is longer than 35 ch…', - row.cells['status'].data) - else: - self.assertEqual(u'A Status that is longer than 35 ...', - row.cells['status'].data) + self.assertEqual(u'A Status that is longer than 35 ch…', + row.cells['status'].data) def test_table_rendering(self): self.table = MyTable(self.request, TEST_DATA) diff --git a/lower-constraints.txt b/lower-constraints.txt index b8a6b90319..6e2ea44a6a 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -16,7 +16,7 @@ cryptography==2.1 debtcollector==1.2.0 decorator==3.4.0 deprecation==1.0 -Django==1.11 +Django==2.2 django-appconf==1.0.2 django-babel==0.6.2 django-compressor==2.0 diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py index 15099f7d3a..641847b2e2 100644 --- a/openstack_dashboard/dashboards/project/instances/tests.py +++ b/openstack_dashboard/dashboards/project/instances/tests.py @@ -4906,17 +4906,11 @@ class InstanceTests2(InstanceTestBase, InstanceTableTestMixin): self.assertEqual(res.context['form'].errors['__all__'], ["Passwords do not match."]) - if django.VERSION >= (1, 9): - image_list_count = 8 - ext_count = 2 - else: - image_list_count = 5 - ext_count = 1 self.mock_server_get.assert_called_once_with( helpers.IsHttpRequest(), server.id) - self._check_glance_image_list_detailed(count=image_list_count) + self._check_glance_image_list_detailed(count=8) self.assert_mock_multiple_calls_with_same_arguments( - self.mock_extension_supported, ext_count, + self.mock_extension_supported, 2, mock.call('DiskConfig', helpers.IsHttpRequest())) self.assert_mock_multiple_calls_with_same_arguments( self.mock_is_feature_available, 2, diff --git a/releasenotes/notes/drop-django111-support-8803cfa3a6402dbe.yaml b/releasenotes/notes/drop-django111-support-8803cfa3a6402dbe.yaml new file mode 100644 index 0000000000..4a514cbc1a --- /dev/null +++ b/releasenotes/notes/drop-django111-support-8803cfa3a6402dbe.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Django 1.11 support was dropped. Django 1.11 ends its extended support + in April 2020 which is before Ussuri release. Considering this, horizon + dropped Django 1.11 support and use Django 2.2 as default. diff --git a/requirements.txt b/requirements.txt index c9481c8c30..55d82dcf70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 # Horizon Core Requirements Babel!=2.4.0,>=2.3.4 # BSD debtcollector>=1.2.0 # Apache-2.0 -Django>=1.11 # BSD +Django>=2.2 # BSD django-babel>=0.6.2 # BSD django-compressor>=2.0 # MIT django-debreach>=1.4.2 # BSD License (2 clause)