summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-05-27 08:19:32 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-05-27 12:32:35 (GMT)
commit496bdb525f67bf87abe78f31178810e0d8e91d75 (patch)
treee53c71b78317ee2ce10f2a67e49bffe4ab39cdf9
parent1f5bc0162740da1179ac9fc78914ab8df1709304 (diff)
downloadcombo-496bdb525f67bf87abe78f31178810e0d8e91d75.zip
combo-496bdb525f67bf87abe78f31178810e0d8e91d75.tar.gz
combo-496bdb525f67bf87abe78f31178810e0d8e91d75.tar.bz2
general: stop supporting django 1.8 (#33423)
-rw-r--r--Jenkinsfile2
-rw-r--r--combo/apps/maps/forms.py21
-rw-r--r--combo/profile/utils.py7
-rw-r--r--combo/utils/forms.py7
-rw-r--r--debian/control2
-rw-r--r--setup.py2
-rw-r--r--tox.ini13
7 files changed, 13 insertions, 41 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index ce6b5e8..f9c4675 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,7 +24,7 @@ pipeline {
steps {
script {
if (env.JOB_NAME == 'combo' && env.GIT_BRANCH == 'origin/master') {
- sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder combo'
+ sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d stretch combo'
}
}
}
diff --git a/combo/apps/maps/forms.py b/combo/apps/maps/forms.py
index 908adaa..75d2539 100644
--- a/combo/apps/maps/forms.py
+++ b/combo/apps/maps/forms.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import django
from django import forms
from django.utils.encoding import force_text
from django.utils.text import slugify
@@ -22,24 +21,8 @@ from django.utils.text import slugify
from .models import MapLayer
-if django.VERSION < (1, 11, 0):
- class RadioChoiceInput(forms.widgets.RadioChoiceInput):
- def render(self, name=None, value=None, *args, **kwargs):
- value = super(RadioChoiceInput, self).render(name=name, value=value, *args, **kwargs)
- return u'<span class="icon-%s">%s</span>' % (self.choice_value, value)
-
-
- class RadioFieldRenderer(forms.widgets.RadioFieldRenderer):
- choice_input_class = RadioChoiceInput
-
-
- class IconRadioSelect(forms.RadioSelect):
- renderer = RadioFieldRenderer
-
-else:
-
- class IconRadioSelect(forms.RadioSelect):
- option_template_name = 'maps/icon_radio_option.html'
+class IconRadioSelect(forms.RadioSelect):
+ option_template_name = 'maps/icon_radio_option.html'
class MapNewLayerForm(forms.ModelForm):
diff --git a/combo/profile/utils.py b/combo/profile/utils.py
index 357cccf..22cb55e 100644
--- a/combo/profile/utils.py
+++ b/combo/profile/utils.py
@@ -16,12 +16,7 @@
from django.conf import settings
from django.contrib.auth.models import User
-
-import django
-if django.VERSION < (1, 11, 0):
- CallableFalse, CallableTrue = False, True
-else:
- from django.utils.deprecation import CallableFalse, CallableTrue
+from django.utils.deprecation import CallableFalse, CallableTrue
if 'mellon' in settings.INSTALLED_APPS:
from mellon.models import UserSAMLIdentifier
diff --git a/combo/utils/forms.py b/combo/utils/forms.py
index 33398fb..c1d12b5 100644
--- a/combo/utils/forms.py
+++ b/combo/utils/forms.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import django
from django import forms
from django.utils.datastructures import MultiValueDict
from django.utils.safestring import mark_safe
@@ -41,11 +40,7 @@ class MultiSortWidget(forms.SelectMultiple):
self.choices.insert(0, option_tuple)
# render the <select multiple>
- if django.VERSION < (1, 11, 0):
- rendered = super(MultiSortWidget, self).render(name, value,
- attrs=attrs, choices=choices)
- else:
- rendered = super(MultiSortWidget, self).render(name, value,
+ rendered = super(MultiSortWidget, self).render(name, value,
attrs=attrs)
# include it in a <div> that will be turned into an appropriate widget
diff --git a/debian/control b/debian/control
index a4ff06b..4c12d6d 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ X-Python-Version: >= 2.7
Package: python-combo
Architecture: all
Depends: ${misc:Depends}, ${python:Depends},
- python-django (>= 1.8),
+ python-django (>= 1:1.11),
python-djangorestframework (>= 3.3),
python-gadjo (>= 0.53),
python-pyproj,
diff --git a/setup.py b/setup.py
index 1a577c4..70086d6 100644
--- a/setup.py
+++ b/setup.py
@@ -146,7 +146,7 @@ setup(
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
- install_requires=['django>=1.8, <1.12',
+ install_requires=['django>=1.11, <1.12',
'django-ckeditor<=4.5.3',
'gadjo>=0.53',
'feedparser',
diff --git a/tox.ini b/tox.ini
index eb2de1c..71d9fec 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo/{env:BRANCH_NAME:}
-envlist = py2-django18,coverage-py2-django111-pylint,py3-django111
+envlist = coverage-py2-pylint,py3
[testenv]
usedevelop = True
@@ -9,10 +9,10 @@ setenv =
py2: WCSCTL=wcs/wcsctl.py
DJANGO_SETTINGS_MODULE=combo.settings
COMBO_SETTINGS_FILE=tests/settings.py
+ coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo/
deps =
- django18: django>=1.8,<1.9
- django111: django>=1.11,<1.12
- django111: pywebpush
+ django>=1.11,<1.12
+ pywebpush
pytest-cov
pytest-django
pytest-freezegun
@@ -32,6 +32,5 @@ commands =
./getlasso.sh
python manage.py compilemessages
./get_wcs.sh
- django18: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=combo/ tests/}
- django18: ./pylint.sh combo/
- django111: py.test {posargs: --junitxml=test_{envname}_results.xml tests/}
+ py.test {env:COVERAGE:} {posargs: --junitxml=test_{envname}_results.xml tests/}
+ pylint: ./pylint.sh combo/