Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing imports to have Django 3 compatibility. #219

Merged
merged 1 commit into from
May 20, 2020
Merged

Changing imports to have Django 3 compatibility. #219

merged 1 commit into from
May 20, 2020

Conversation

javiermatos
Copy link
Contributor

I have made some corrections to fix compatibility for Django 3. Also, I have normalized imports to use version checks instead of the try except pattern.

This was referenced Apr 24, 2020
Copy link
Contributor

@rtpg rtpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this submission! I'm glad to see that the upgrade to Django 3 can go smoothly.

Since we are focusing on sticking to supported versions of Django, rather than add a six dependency in tests, perhaps we can just rip out Python 2 stuff entirely.

Have you had an opportunity to run these changes in production anywhere yet?

from django.utils.encoding import force_str
except ImportError:
# Required for Django < 1.5
if django.VERSION < (1, 5):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't support Django 1.5 anymore so we can outright remove this branch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have test these changes in production for my user case (just pretty maps for GeoDjango for some locations) and it works. Tests are fine and the upgrade to Django 3 was just six dependency. I do not think it will break anything. If you want, I can remove all Django 1.5 references for this pull request.

@rtpg
Copy link
Contributor

rtpg commented May 19, 2020

Alright, I took these changes and slightly modified them over in #222 , I'm going to leave it open for a day and if it looks good I'll prepare a new release with these changes.

Thank you again for the work in sending in this changeset, really wish I had noticed this earlier

@rtpg rtpg merged commit acc4973 into jazzband:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants