Skip to content

Use gettext_lazy for Python 3 code #99

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

Merged
merged 2 commits into from
Aug 25, 2020
Merged

Conversation

noisecapella
Copy link
Contributor

I upgraded a project of ours to Python 3.8 and started seeing this deprecation warning: django.utils.deprecation.RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().. According to the Django docs, ugettext_lazy and gettext_lazy are interchangable for Python 3. This PR should address that deprecation warning by keeping ugettext_lazy for Python 2.x and using gettext_lazy in Python 3.

@codecov
Copy link

codecov bot commented Mar 10, 2020

Codecov Report

Merging #99 into master will increase coverage by 1.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   80.71%   81.87%   +1.16%     
==========================================
  Files           7        7              
  Lines         140      149       +9     
  Branches       16       19       +3     
==========================================
+ Hits          113      122       +9     
  Misses         20       20              
  Partials        7        7
Impacted Files Coverage Δ
src/robots/forms.py 78.57% <100%> (+5.84%) ⬆️
src/robots/models.py 84.21% <100%> (+1.35%) ⬆️
src/robots/admin.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 156fb13...05017fa. Read the comment docs.

@jezdez jezdez merged commit fe44e5a into jazzband:master Aug 25, 2020
@jezdez
Copy link
Member

jezdez commented Aug 25, 2020

Thanks!

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