diff --git a/.travis.yml b/.travis.yml index 3b06548f..a9eca8d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,29 +8,21 @@ services: python: - "3.5" - "3.4" - - "3.3" - - "3.2" - "2.7" - - "2.6" + env: - - DJANGO="django==1.8.5" - - DJANGO="django==1.7.10" - - DJANGO="django==1.6.11" - - DJANGO="django==1.5.12" + - DJANGO="django==1.8.7" + - DJANGO="django==1.7.11" + - DJANGO="django==1.9" + matrix: exclude: - python: "3.5" - env: DJANGO="django==1.7.10" - - python: "3.5" - env: DJANGO="django==1.6.11" - - python: "3.5" - env: DJANGO="django==1.5.12" - - python: "2.6" - env: DJANGO="django==1.7.10" - - python: "2.6" - env: DJANGO="django==1.8.5" + env: DJANGO="django==1.7.11" + + branches: only: diff --git a/requirements-test.txt b/requirements-test.txt index 1d80ace6..eeb88803 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ psycopg2 -djangorestframework>=3.0.4 +djangorestframework>=3.3 coverage==3.7.1 # rq.filter: >=3,<4 coveralls django-filter diff --git a/requirements.txt b/requirements.txt index c6c4f3fb..770197ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -djangorestframework>=3.0.4,<3.3 +djangorestframework>=3.3 diff --git a/rest_framework_gis/__init__.py b/rest_framework_gis/__init__.py index dbbbc6bf..40fb1155 100644 --- a/rest_framework_gis/__init__.py +++ b/rest_framework_gis/__init__.py @@ -15,27 +15,3 @@ def get_version(): default_app_config = 'rest_framework_gis.apps.AppConfig' - -# maintain support for django 1.5 and 1.6 -# TODO: remove in version 1.0 -try: - import os - import django - - if os.environ.get('DJANGO_SETTINGS_MODULE'): - from django.conf import settings - from .apps import AppConfig - - if 'rest_framework_gis' not in settings.INSTALLED_APPS: - import warnings - warnings.simplefilter('always', DeprecationWarning) - warnings.warn('\nGeoModelSerializer is deprecated, ' - 'add "rest_framework_gis" to settings.INSTALLED_APPS and use ' - '"rest_framework.ModelSerializer" instead', - DeprecationWarning) - - if django.get_version() < '1.7' or 'rest_framework_gis' not in settings.INSTALLED_APPS: - import rest_framework_gis - AppConfig('rest_framework_gis', rest_framework_gis).ready() -except ImportError: - pass diff --git a/rest_framework_gis/apps.py b/rest_framework_gis/apps.py index 43767c77..8ae6249f 100644 --- a/rest_framework_gis/apps.py +++ b/rest_framework_gis/apps.py @@ -1,10 +1,4 @@ -try: - from django.apps import AppConfig as BaseConfig -except ImportError: # pragma: nocover - # django <= 1.6 - class BaseConfig(object): - def __init__(self, *args): - pass +from django.apps import AppConfig as BaseConfig class AppConfig(BaseConfig): diff --git a/rest_framework_gis/utils.py b/rest_framework_gis/utils.py index d2e2fd81..9098713d 100644 --- a/rest_framework_gis/utils.py +++ b/rest_framework_gis/utils.py @@ -1,5 +1 @@ -try: - from collections import OrderedDict # noqa -# python 2.6 -except ImportError: # pragma: no cover - from ordereddict import OrderedDict # noqa +from collections import OrderedDict # noqa diff --git a/setup.py b/setup.py index dc9f433e..02b53345 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,6 @@ def get_install_requires(): 'Operating System :: OS Independent', 'Framework :: Django', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', diff --git a/tests/urls.py b/tests/urls.py index 9638d6cd..3f143188 100644 --- a/tests/urls.py +++ b/tests/urls.py @@ -1,16 +1,17 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.contrib import admin admin.autodiscover() -urlpatterns = patterns('', +urlpatterns = [ # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), - + url(r'', include('django_restframework_gis_tests.urls')), - + url(r'^static/(?P.*)$', 'django.contrib.staticfiles.views.serve'), -) + +]