Skip to content

Commit b4aef41

Browse files
codingjoeauvipy
authored andcommitted
Add Django 3.0 and Python 3.8 support (#200)
* 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
1 parent bb22de6 commit b4aef41

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,18 @@ matrix:
1919
- { python: "3.5", env: TOXENV=py35-django22 }
2020
- { python: "3.6", env: TOXENV=py36-django22 }
2121
- { python: "3.7", env: TOXENV=py37-django22 }
22+
- { python: "3.6", env: TOXENV=py36-django30 }
23+
- { python: "3.7", env: TOXENV=py37-django30 }
24+
- { python: "3.8-dev", env: TOXENV=py38-django30 }
25+
2226

2327
branches:
2428
only:
2529
- master
26-
30+
before_install:
31+
- sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y
32+
- sudo apt-get update -q
33+
- sudo apt-get install binutils libproj-dev gdal-bin -y
2734
install:
2835
- pip install coverage tox
2936
- pip install docutils pygments # for setup.py check -r -s

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Compatibility with DRF, Django and Python
3939

4040
=============== ============================ ==================== ==================================
4141
DRF-gis version DRF version Django version Python version
42-
**0.15.x** **3.3** to **3.9** **1.11** to **2.2** **3.4** to **3.7**
42+
**0.15.x** **3.3** to **3.9** **1.11** to **3.0** **3.4** to **3.8**
4343
**0.14.x** **3.3** to **3.9** **1.11** to **2.1** **3.4** to **3.7**
4444
**0.13.x** **3.3** to **3.8** **1.11** to **2.0** **2.7** to **3.6**
4545
**0.12.x** **3.1** to **3.7** **1.11** to **2.0** **2.7** to **3.6**

tests/django_restframework_gis_tests/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def setUp(self):
3535
self.geojson_location_list_url = reverse('api_geojson_location_list')
3636
self.geos_error_message = 'Invalid format: string or unicode input unrecognized as GeoJSON, WKT EWKT or HEXEWKB.'
3737
self.gdal_error_message = 'Unable to convert to python object: Invalid geometry pointer returned from "OGR_G_CreateGeometryFromJson".'
38-
if django.VERSION[0] == 2:
38+
if django.VERSION >= (2, 0, 0):
3939
self.value_error_message = "Unable to convert to python object: String input unrecognized as WKT EWKT, and HEXEWKB."
4040
else:
4141
self.value_error_message = "Unable to convert to python object: String or unicode input unrecognized as WKT EWKT, and HEXEWKB."

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
envlist =
33
py{35,36,py3}-django111{,-pytest}
44
py{35,36,37,py3}-django{21, 22}{,-pytest}
5+
py{36,37,38,py3}-django{30}{,-pytest}
56

67
[testenv]
78
usedevelop = true
@@ -16,8 +17,8 @@ commands =
1617

1718
deps =
1819
django111: Django~=1.11
19-
django21: Django~=2.1
2020
django22: Django~=2.2
21+
django30: Django~=3.0a1
2122
djangorestframework~=3.9
2223
-rrequirements-test.txt
2324
pytest: pytest

0 commit comments

Comments
 (0)