Skip to content

Commit

Permalink
Add Django 3.0 and Python 3.8 support (#200)
Browse files Browse the repository at this point in the history
* Update the way that `to_representation` removes already processed (#195)

fields, as per #194

* Upgrade GDAL to v2.x

* Fix test suite for Django v3.0
  • Loading branch information
codingjoe authored and auvipy committed Oct 4, 2019
1 parent bb22de6 commit b4aef41
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ matrix:
- { python: "3.5", env: TOXENV=py35-django22 }
- { python: "3.6", env: TOXENV=py36-django22 }
- { python: "3.7", env: TOXENV=py37-django22 }
- { python: "3.6", env: TOXENV=py36-django30 }
- { python: "3.7", env: TOXENV=py37-django30 }
- { python: "3.8-dev", env: TOXENV=py38-django30 }


branches:
only:
- master

before_install:
- sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y
- sudo apt-get update -q
- sudo apt-get install binutils libproj-dev gdal-bin -y
install:
- pip install coverage tox
- pip install docutils pygments # for setup.py check -r -s
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Compatibility with DRF, Django and Python

=============== ============================ ==================== ==================================
DRF-gis version DRF version Django version Python version
**0.15.x** **3.3** to **3.9** **1.11** to **2.2** **3.4** to **3.7**
**0.15.x** **3.3** to **3.9** **1.11** to **3.0** **3.4** to **3.8**
**0.14.x** **3.3** to **3.9** **1.11** to **2.1** **3.4** to **3.7**
**0.13.x** **3.3** to **3.8** **1.11** to **2.0** **2.7** to **3.6**
**0.12.x** **3.1** to **3.7** **1.11** to **2.0** **2.7** to **3.6**
Expand Down
2 changes: 1 addition & 1 deletion tests/django_restframework_gis_tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def setUp(self):
self.geojson_location_list_url = reverse('api_geojson_location_list')
self.geos_error_message = 'Invalid format: string or unicode input unrecognized as GeoJSON, WKT EWKT or HEXEWKB.'
self.gdal_error_message = 'Unable to convert to python object: Invalid geometry pointer returned from "OGR_G_CreateGeometryFromJson".'
if django.VERSION[0] == 2:
if django.VERSION >= (2, 0, 0):
self.value_error_message = "Unable to convert to python object: String input unrecognized as WKT EWKT, and HEXEWKB."
else:
self.value_error_message = "Unable to convert to python object: String or unicode input unrecognized as WKT EWKT, and HEXEWKB."
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
envlist =
py{35,36,py3}-django111{,-pytest}
py{35,36,37,py3}-django{21, 22}{,-pytest}
py{36,37,38,py3}-django{30}{,-pytest}

[testenv]
usedevelop = true
Expand All @@ -16,8 +17,8 @@ commands =

deps =
django111: Django~=1.11
django21: Django~=2.1
django22: Django~=2.2
django30: Django~=3.0a1
djangorestframework~=3.9
-rrequirements-test.txt
pytest: pytest
Expand Down

0 comments on commit b4aef41

Please sign in to comment.