Skip to content

Commit 4dfd73c

Browse files
committed
Remove support for Django < 3.2
1 parent 062e5fe commit 4dfd73c

File tree

4 files changed

+49
-41
lines changed

4 files changed

+49
-41
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,25 @@
33

44
name: Python application
55

6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
6+
on: [push, pull_request]
117

128
jobs:
139
tests_python:
1410
name: Test on Python ${{ matrix.python_version }} and Django ${{ matrix.django_version }}
1511
runs-on: ubuntu-latest
1612
strategy:
1713
matrix:
18-
django_version: [ '2.2', '3.0', '3.1', '3.2' ]
19-
python_version: [ '3.5', '3.6', '3.7', '3.8', '3.9' ]
14+
django_version: [ '3.2', '4.0', '4.1' ]
15+
python_version: [ '3.7', '3.8', '3.9', '3.10' ]
2016
exclude:
21-
- django_version: '3.0'
22-
python_version: '3.5'
2317

24-
- django_version: '3.1'
25-
python_version: '3.5'
18+
- django_version: '4.0'
19+
python_version: '3.7'
2620

27-
- django_version: '3.2'
28-
python_version: '3.5'
21+
- django_version: '4.1'
22+
python_version: '3.7'
2923
env:
30-
SPATIALITE_LIBRARY_PATH: 'mod_spatialite.so'
3124
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
3325

3426
steps:
3527
- uses: actions/checkout@v2
@@ -49,14 +41,15 @@ jobs:
4941
sudo apt-get install -y libproj-dev libgeos-dev gdal-bin libgdal-dev libsqlite3-mod-spatialite
5042
python -m pip install --upgrade pip
5143
pip install -U flake8 coveralls argparse jsonfield
52-
pip install -U Django~=${{ matrix.django_version }}.0
44+
pip install -U Django~=${{ matrix.django_version }}
5345
- name: Lint with flake8
5446
run: |
5547
flake8 --ignore=E501,W504 djgeojson
56-
- name: Test
48+
- name: Test Django
5749
run: |
58-
python -W error::DeprecationWarning -W error::PendingDeprecationWarning -m coverage run ./quicktest.py djgeojson
50+
python -m coverage run ./quicktest.py djgeojson
51+
# python -W error::DeprecationWarning -W error::PendingDeprecationWarning -m coverage run ./quicktest.py djgeojson
5952
- name: Coverage
6053
if: ${{ success() }}
6154
run: |
62-
coveralls
55+
coveralls --service=github

CHANGES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
CHANGELOG
33
=========
44

5-
3.2.2 (unreleased)
5+
3.3.0 (unreleased)
66
==================
77

8-
-
8+
- Drop support for Python < 3.7 / Django < 3.2
99

1010
3.2.1 (2022-02-21)
1111
==================

djgeojson/tests.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import unicode_literals
22

33
import json
4-
import unittest
54

65
import django
76
from django.test import TestCase
@@ -153,8 +152,6 @@ def test_basic(self):
153152
self.assertEqual(actual_geojson_with_prop,
154153
{"crs": {"type": "link", "properties": {"href": "http://spatialreference.org/ref/epsg/4326/", "type": "proj4"}}, "type": "FeatureCollection", "features": [{"geometry": {"type": "LineString", "coordinates": [[0.0, 0.0], [1.0, 1.0]]}, "type": "Feature", "properties": {"picture": "image.png", "model": "djgeojson.route", "upper_name": "GREEN", "name": "green"}, "id": route1.pk}, {"geometry": {"type": "LineString", "coordinates": [[0.0, 0.0], [1.0, 1.0]]}, "type": "Feature", "properties": {"picture": "image.png", "model": "djgeojson.route", "upper_name": "BLUE", "name": "blue"}, "id": route2.pk}, {"geometry": {"type": "LineString", "coordinates": [[0.0, 0.0], [1.0, 1.0]]}, "type": "Feature", "properties": {"picture": "image.png", "model": "djgeojson.route", "upper_name": "RED", "name": "red"}, "id": route3.pk}]})
155154

156-
# x y are reversed on CI
157-
@unittest.expectedFailure
158155
def test_precision(self):
159156
serializer = Serializer()
160157
features = json.loads(serializer.serialize(
@@ -677,8 +674,6 @@ def setUp(self):
677674
self.p1 = FixedSridPoint.objects.create(geom=Point(253286, 531490))
678675
self.p2 = FixedSridPoint.objects.create(geom=Point(253442, 532897))
679676

680-
# x y are reversed on CI
681-
@unittest.expectedFailure
682677
def test_within_viewport(self):
683678
self.view.args = [12, 2125, 1338]
684679
response = self.view.render_to_response(context={})

tox.ini

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,41 @@
1-
# Tox (http://tox.testrun.org/) is a tool for running tests
2-
# in multiple virtualenvs. This configuration file will run the
3-
# test suite on all supported python versions. To use it, "pip install tox"
4-
# and then run "tox" from this directory.
5-
61
[tox]
2+
skipsdist = True
73
envlist =
8-
py35-django{22}
9-
py36-django{22,30,31,32}
10-
py37-django{22,30,31,32}
11-
py38-django{22,30,31,32}
12-
py39-django{22,30,31,32}
4+
{py37}-django-{32}
5+
{py38}-django-{32,40,41}
6+
{py39}-django-{32,40,41}
7+
{py310}-django-{32,40,41}
8+
{py310}-isort
9+
{py310}-flake8
1310

1411
[testenv]
15-
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning -W ignore:::site -W ignore:::distutils quicktest.py djgeojson
12+
setenv =
13+
PYTHONPATH = {toxinidir}:{toxinidir}
1614
deps =
17-
django22: django>=2.2,<3.0
18-
django30: django>=3.0,<3.1
19-
django31: django>=3.1,<3.2
20-
django32: django>=3.2,<4.0
2115
jsonfield
16+
flake8: flake8>=2.0,<3.0
17+
django-32: Django>=3.2,<3.3
18+
django-40: Django>=4.0,<4.1
19+
django-41: Django>=4.1,<4.2
20+
isort: isort
21+
commands =
22+
isort: isort .
23+
flake8: flake8 safedelete --ignore=E501
24+
# django: python -W error::DeprecationWarning -W error::PendingDeprecationWarning -W ignore:::site -W ignore:::distutils {toxinidir}/quicktest.py djgeojson
25+
django: python {toxinidir}/quicktest.py djgeojson
26+
27+
[testenv:docs]
28+
basepython = python
29+
changedir = docs
30+
deps =
31+
sphinx
32+
sphinx_rtd_theme
33+
Django>=3.2,<4.1
34+
commands =
35+
sphinx-build -W -b html -d build/doctrees . build/html
36+
37+
[isort]
38+
skip_gitignore = true
39+
include_trailing_comma = true
40+
multi_line_output = 3
41+
line_length = 80

0 commit comments

Comments
 (0)