Skip to content

Commit 47ece31

Browse files
New version 3.7.0 (#226)
* Removed six and python 2 compatible code * Updated CHANGELOG and README * Support for Django 3.1 * Travis Django 3.1 * Added my self to author
1 parent 29d3bf7 commit 47ece31

File tree

8 files changed

+24
-20
lines changed

8 files changed

+24
-20
lines changed

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ matrix:
1414
env: TOXENV=py37-django22-sqlite
1515
- python: 3.7
1616
env: TOXENV=py37-django30-sqlite
17+
- python: 3.7
18+
env: TOXENV=py37-django31-sqlite
1719
- python: 3.8
18-
env: TOXENV=py38-django30-sqlite
20+
env: TOXENV=py38-django31-sqlite
1921
- python: 3.7
2022
env: TOXENV=py37-djangodev-sqlite
2123
- python: 3.7

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@
1717
- Charles Sartori @csarcom
1818
- Aaron VanDerlip @aaronvanderlip
1919
- Chris Vigelius @chrisv2
20+
- Mariano Ramirez @marianoeramirez

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2020-08-06 3.7.0
2+
Fix for subregion
3+
Drop support for python 2
4+
Changes dependency from django-autoslug-iplweb to django-autoslug, that
5+
works with Django 3.1
6+
17
2019-04-14 3.6.0
28

39
Add Subregion support by @adamb70 and @Guts

README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ database, you should use
2929

3030
Requirements:
3131

32-
- Python 2.7 or 3.3,
33-
- Django >= 1.8
32+
- Python >= 3.6
33+
- Django >= 1.11
3434
- MySQL or PostgreSQL or SQLite.
3535

3636
Yes, for some reason, code that used to work on MySQL (not without pain xD)
@@ -122,11 +122,11 @@ Running the full test suite::
122122

123123
To run the tests in specific environment use the following command::
124124

125-
tox -e py27-django18-sqlite
125+
tox -e py37-django31-sqlite
126126

127127
And to run one specific test use this one::
128128

129-
tox -e py27-django18-sqlite -- cities_light/tests/test_form.py::FormTestCase::testCountryFormNameAndContinentAlone
129+
tox -e py37-django31-sqlite -- cities_light/tests/test_form.py::FormTestCase::testCountryFormNameAndContinentAlone
130130

131131
To run it even faster, you can switch to specific tox virtualenv::
132132

cities_light/abstract_models.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import autoslug
66
import pytz
77

8-
from six import python_2_unicode_compatible
9-
108
from django.db import models
119
from django.db.models import lookups
1210
from django.utils.encoding import force_str
@@ -18,12 +16,10 @@
1816
from .validators import timezone_validator
1917
from .settings import INDEX_SEARCH_NAMES, CITIES_LIGHT_APP_NAME
2018

21-
2219
__all__ = ['AbstractCountry', 'AbstractRegion',
2320
'AbstractSubRegion', 'AbstractCity',
2421
'CONTINENT_CHOICES']
2522

26-
2723
CONTINENT_CHOICES = (
2824
('OC', _('Oceania')),
2925
('EU', _('Europe')),
@@ -71,10 +67,11 @@ class ToSearchTextField(models.TextField):
7167
Trivial TextField subclass that passes values through to_search
7268
automatically.
7369
"""
70+
71+
7472
ToSearchTextField.register_lookup(ToSearchIContainsLookup)
7573

7674

77-
@python_2_unicode_compatible
7875
class Base(models.Model):
7976
"""
8077
Base model with boilerplate for all models.

cities_light/tests/test_unicode.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import warnings
55

6-
import six
76
import unidecode
87

98
from django.utils.encoding import force_text
@@ -66,5 +65,4 @@ def test_to_ascii(self):
6665
"""Test to_ascii behavior."""
6766
self.assertEqual(to_ascii('République Françaisen'), 'Republique Francaisen')
6867
self.assertEqual(to_ascii('Кемерово'), 'Kemerovo')
69-
# Check that return value is unicode on python 2.7 or str on python 3
70-
self.assertTrue(isinstance(to_ascii('Кемерово'), six.text_type))
68+
self.assertTrue(isinstance(to_ascii('Кемерово'), str))

setup.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def read(fname):
1515

1616
setup(
1717
name='django-cities-light',
18-
version='3.6.0',
18+
version='3.7.0',
1919
description='Simple alternative to django-cities',
2020
author='James Pic,Dominick Rivard,Alexey Evseev',
2121
@@ -27,11 +27,10 @@ def read(fname):
2727
license='MIT',
2828
keywords='django cities countries postal codes',
2929
install_requires=[
30-
'six',
3130
'pytz',
3231
'unidecode>=0.04.13',
33-
'django-autoslug-iplweb>=1.9.4',
34-
'progressbar2>=3.6.0'
32+
'django-autoslug>=1.9.8',
33+
'progressbar2>=3.51.4'
3534
],
3635
classifiers=[
3736
'Development Status :: 5 - Production/Stable',
@@ -41,7 +40,6 @@ def read(fname):
4140
'License :: OSI Approved :: MIT License',
4241
'Operating System :: OS Independent',
4342
'Programming Language :: Python',
44-
'Programming Language :: Python :: 2',
4543
'Programming Language :: Python :: 3',
4644
'Topic :: Internet :: WWW/HTTP',
4745
'Topic :: Software Development :: Libraries :: Python Modules',

tox.ini

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{35,36, 37,38}-django{111,22,30}{-sqlite,-mysql,-postgresql},
3+
py{35,36, 37,38}-django{111,22,30,31}{-sqlite,-mysql,-postgresql},
44
py{35,36, 37,38}-djangodev{-sqlite,-mysql,-postgresql},
55
checkqa,
66
docs
@@ -42,7 +42,7 @@ deps =
4242
djangorestframework
4343
django-dbdiff>=0.4.0
4444
django-ajax-selects==1.6.0
45-
django-autoslug-iplweb==1.9.4.dev0
45+
django-autoslug==1.9.8
4646

4747
[testenv]
4848
skipsdist = true
@@ -58,7 +58,9 @@ deps =
5858
{[test]deps}
5959
django111: Django>=1.11a,<2.0
6060
django20: Django>=2.0,<2.1
61+
django22: Django>=2.2,<3.0
6162
django30: Django>=3.0,<3.1
63+
django31: Django>=3.1,<3.2
6264
djangodev: https://github.com/django/django/archive/master.tar.gz
6365
postgresql: psycopg2
6466
mysql: mysqlclient

0 commit comments

Comments
 (0)