coderholic / django-cities

Countries and cities of the world for Django projects
MIT License
913 stars 377 forks source link

fix: support for Django 3 and dropped Python 2 support #214

Closed mxschmitt closed 4 years ago

mxschmitt commented 4 years ago

In Django 3 django.utils.encoding.python_2_unicode_compatible was removed which was originally only an alias. This PR adds the original six import as a fallback.

https://docs.djangoproject.com/en/3.0/releases/3.0/#removed-private-python-2-compatibility-apis

Also I've removed the support for Python 2.7 and 3.4 due it reached EOL for updates at 01.01.2020: https://www.python.org/dev/peps/pep-0373/ And removed old not anymore supported Django versions. (https://www.djangoproject.com/download/ there is the overview of which one are still supported)

Fix #215 Fix #216 Fix #217

blag commented 4 years ago

@mxschmitt If you can fix the test failures (besides the tests that are allowed to fail), I'll definitely merge this. Thanks!

Fixes #215. Fixes #216. Fixes #217.

mxschmitt commented 4 years ago

@blag should be ready now. Is it okay, that I have removed that many OS/Django version combinations?

What's left is now only something in the README, that we have dropped the support for Python 2.

blag commented 4 years ago

Dropping versions of Django and versions of Python that are no longer supported is fine.

So for Python 3.6 and 3.7, keep support for Django 1.11, 2.2, and 3.0+. For Python 3.8, we only need to support Django 2.2 and 3.0+, not Django 1.11.

If the tests don't fail for older versions of Python/Django, you can simply move those combinations to the allowed-to-fail part of the Travis build matrix.

I'm in the middle of a thing right now, so I hope that makes sense. I'll be able to review this later today or tomorrow and clarify anything for you.

Thanks for this contribution, I very much appreciate it!

mxschmitt commented 4 years ago

sorry @blag for the late response, had not much time in the past few weeks. But now let's try to finish the Pull Request. :) Most of your comments are applied, thx!

blag commented 4 years ago

Once the last .gitignore bit is fixed, this looks good to merge. Thanks for your diligence!

mxschmitt commented 4 years ago

fixed @blag. Thanks!

mxschmitt commented 4 years ago

Friendly ping @blag 🙈

blag commented 4 years ago

Thanks!

Siecje commented 4 years ago

Thank you for merging this. Do you know when this will be available on PyPI?

blag commented 4 years ago

Released to PyPI as version 0.6. Thanks for the contributions!