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

Replaced force_text() with force_str(), since its deprecated in Django 3.0. #95

Merged
merged 5 commits into from
Oct 2, 2020

Conversation

coredumperror
Copy link
Contributor

I've checked, and I'm sure that this code will work in Django 3.0 and Django 2.x. force_str() is just an alias of force_text() back to Django 2.0.

This code will run in Django 1.11 (the earliest version that django-js-reverse supports), but I don't know for sure that it'll actually do the right thing. Back then, force_str() was an alias for force_bytes() in Python 2.x, while being an alias for force_text() in Python 3.x. So folks still using Django 1.11 in Python 2.7 might see different behavior. However, since django-js-reverse only uses force_str() to build a dictionary for export as JSON, I don't think this'll be an issue.

@coveralls
Copy link

coveralls commented Jul 15, 2020

Coverage Status

Coverage remained the same at 0.0% when pulling 5458d08 on coredumperror:force-str into 44c1d1e on ierror:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.085% when pulling 44b512b on coredumperror:force-str into ba8ce52 on ierror:master.

@graingert graingert self-requested a review October 1, 2020 15:25
@graingert graingert merged commit 7cab78c into ierror:master Oct 2, 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.

3 participants