Skip to content

Commit 5e1cf86

Browse files
authored
Merge pull request #212 from blag/few-updates
Update Travis test matrix and supported compatibility table
2 parents 355a272 + 98dcef6 commit 5e1cf86

File tree

4 files changed

+55
-42
lines changed

4 files changed

+55
-42
lines changed

.travis.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,76 @@
1+
# We need to use Ubuntu 16.04 (Xenial Xerus) to get Python 3.7
2+
dist: xenial
3+
14
language: python
25

36
services:
47
- postgresql
58

69
addons:
710
postgresql: "9.6"
8-
apt:
9-
packages:
10-
- postgresql-9.6-postgis-2.3
11+
# https://gis.stackexchange.com/a/252610
12+
# apt:
13+
# packages:
14+
# - postgresql-9.6-postgis-2.3
1115

1216
python:
1317
- "2.7"
14-
- "3.3"
1518
- "3.4"
1619
- "3.5"
1720
- "3.6"
21+
- "3.7"
1822

1923
env:
20-
- DJANGO_VERSION='Django>=1.7,<1.8'
2124
- DJANGO_VERSION='Django>=1.8,<1.9'
2225
- DJANGO_VERSION='Django>=1.9,<1.10'
2326
- DJANGO_VERSION='Django>=1.10,<1.11'
2427
- DJANGO_VERSION='Django>=1.11,<2.0'
2528
- DJANGO_VERSION='Django>=2.0,<2.1'
29+
- DJANGO_VERSION='Django>=2.1,<2.2'
2630
- DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
2731

2832
matrix:
2933
exclude:
30-
- python: "3.5"
31-
env: DJANGO_VERSION='Django>=1.7,<1.8'
32-
- python: "3.6"
33-
env: DJANGO_VERSION='Django>=1.7,<1.8'
34-
- python: "3.3"
35-
env: DJANGO_VERSION='Django>=1.9,<1.10'
36-
- python: "3.3"
37-
env: DJANGO_VERSION='Django>=1.10,<1.11'
38-
- python: "3.3"
39-
env: DJANGO_VERSION='Django>=1.11,<2.0'
4034
- python: "2.7"
4135
env: DJANGO_VERSION='Django>=2.0,<2.1'
42-
- python: "3.3"
43-
env: DJANGO_VERSION='Django>=2.0,<2.1'
4436
- python: "2.7"
45-
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
46-
- python: "3.3"
37+
env: DJANGO_VERSION='Django>=2.1,<2.2'
38+
- python: "3.4"
39+
env: DJANGO_VERSION='Django>=2.1,<2.2'
40+
- python: "2.7"
4741
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
4842
- python: "3.4"
4943
env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
5044
allow_failures:
51-
- env: DJANGO_VERSION='Django>=1.7,<1.8'
5245
- python: "3.6"
5346
env: DJANGO_VERSION='Django>=1.8,<1.9'
47+
- python: "3.7"
48+
env: DJANGO_VERSION='Django>=1.8,<1.9'
49+
- python: "3.6"
50+
env: DJANGO_VERSION='Django>=1.9,<1.10'
51+
- python: "3.7"
52+
env: DJANGO_VERSION='Django>=1.9,<1.10'
53+
- python: "3.6"
54+
env: DJANGO_VERSION='Django>=1.10,<1.11'
55+
- python: "3.7"
56+
env: DJANGO_VERSION='Django>=1.10,<1.11'
5457
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
5558

59+
before_install:
60+
# https://gis.stackexchange.com/a/252610
61+
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
62+
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
63+
- sudo apt-get install --yes postgresql-9.6-postgis-2.4
64+
5665
install:
5766
- pip install -q $DJANGO_VERSION
5867
- pip install -q django-model-utils flake8 psycopg2 six swapper tox tqdm
5968

6069
before_script:
61-
- psql -U postgres -c "CREATE EXTENSION postgis;"
70+
# - psql -U postgres -c "CREATE EXTENSION postgis;"
6271
- psql -c 'create database django_cities;' -U postgres
6372
- psql -U postgres -c 'CREATE EXTENSION postgis;' -d django_cities
6473

6574
script:
66-
- flake8 --ignore=E501
75+
- flake8
6776
- PYTHONPATH=. python test_project/manage.py test test_app --noinput

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,23 @@ django-cities provides you with place related models (eg. Country, Region, City)
1212

1313
This package officially supports all currently supported versions of Python/Django:
1414

15-
| Python | 2.7 | 3.3 | 3.4 | 3.5 | 3.6 |
16-
| :------------ | --- | --- | --- | --- | --- |
17-
| Django 1.7 | :x: | :x: | :x: | :x: | :x: |
18-
| Django 1.8 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :large_blue_circle: |
19-
| Django 1.9 | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :large_blue_circle: |
20-
| Django 1.10 | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :large_blue_circle: |
21-
| Django 1.11 | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
22-
| Django 2.0 | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
23-
| Django [master](https://github.com/django/django/archive/master.tar.gz) | :x: | :x: | :x: | :x: | :x: |
24-
25-
| Key | |
26-
| :-: | :------------------------------------------------------------------ |
27-
| :white_check_mark: | Officially supported, tested, and passing |
28-
| :large_blue_circle: | Tested and passing, but not officially supported |
29-
| :white_square_button: | Not officially supported, may break at any time, most tests passing |
30-
| :x: | Known incompatibilities |
15+
| Python | 2.7 | 3.4 | 3.5 | 3.6 | 3.7 |
16+
| :------------ | ------------------ | ------------------- | ------------------ | ------------------- | --------------------- |
17+
| Django 1.7 | :x: | :x: | :x: | :x: | :x: |
18+
| Django 1.8 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :large_blue_circle: | :large_blue_circle: |
19+
| Django 1.9 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :large_blue_circle: | :large_blue_circle: |
20+
| Django 1.10 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :large_blue_circle: | :large_blue_circle: |
21+
| Django 1.11 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
22+
| Django 2.0 | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
23+
| Django 2.1 | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
24+
<!-- | Django [master](https://github.com/django/django/archive/master.tar.gz) | :x: | :x: | :x: | :x: | :x: | -->
25+
<!-- 2.7 3.4 3.5 3.6 3.7 -->
26+
27+
| Key | |
28+
| :-------------------: | :------------------------------------------------------------------ |
29+
| :white_check_mark: | Officially supported, tested, and passing |
30+
| :large_blue_circle: | Tested and passing, but not officially supported |
31+
| :x: | Known incompatibilities |
3132

3233
Authored by [Ben Dowling](http://www.coderholic.com), and some great [contributors](https://github.com/coderholic/django-cities/contributors).
3334

cities/management/commands/cities.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def add_arguments(self, parser):
118118
metavar="DATA_TYPES",
119119
default='all',
120120
dest="import",
121-
help='Selectively import data. Comma separated list of data ' +
121+
help='Selectively import data. Comma separated list of data '
122122
'types: ' + str(import_opts).replace("'", '')
123123
)
124124
parser.add_argument(
@@ -752,7 +752,7 @@ def import_alt_name(self):
752752
geo_info['type'].__name__,
753753
item['name']))
754754
continue
755-
alt.is_historic = True if ((item['isHistoric']and
755+
alt.is_historic = True if ((item['isHistoric'] and
756756
item['isHistoric'] != '\n') or
757757
locale == 'fr_1793') else False
758758

@@ -789,8 +789,8 @@ def import_alt_name(self):
789789
continue
790790

791791
if hasattr(alt, 'kind'):
792-
if (locale in ('abbr', 'link', 'name') or
793-
INCLUDE_AIRPORT_CODES and locale in ('iana', 'icao', 'faac')):
792+
if locale in ('abbr', 'link', 'name') or \
793+
INCLUDE_AIRPORT_CODES and locale in ('iana', 'icao', 'faac'):
794794
alt.kind = locale
795795
elif locale not in settings.locales and 'all' not in settings.locales:
796796
self.logger.debug("Unknown alternative name type: {} -- skipping".format(locale))

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
ignore = W504,E501
3+
exclude = build,dist

0 commit comments

Comments
 (0)