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
RemovedInDjango31Warning: The FILE_CHARSET setting is deprecated #932
Comments
The release note says:
|
The related commit in Django: The ticket: |
Is it enough just to replace all |
thanks for reporting. replacing all the occurrences with |
@karyon thank you for your response. I tried writing a patch. I'd like you to review if my understanding is correct. This is the first time for me to send PR to this repo and I might have missed something important. If you find anything wrong, please let me know. Thank you in advance. |
fixed in #934 |
The new code seems to cause a very similar warning in my setup:
with
|
It appears that any access to If we want to keep backward compatibility the simplest way is to disable this warning for this specific line of the code using something like this: import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", message="popo popo")
warnings.warn("popo popo") # the code that will trigger the warning
# warnings are back to normal filtering from here If such solution seems ok for you I can provide a PR. |
yes, a PR would be nice. if necessary you can start by reverting the original PR :) |
While writting the patch for the PR I discovered the warning was in fact triggered by a very weird falty detection of But if I test on an minimal django project with just django-compressor installed --> no warning So my PR is in fact not necessary: Even the test I added to the django-compressor code base to detect any regression on this warning pb, are not that much ineressting : django/django@3d716467 commit (included in soon-to-come django 3.1) has just removed the said warning, following the django deprecation timeline. Bright side of things: I tested the django-compressor against the new django code (the one where Sorry for the inconvenience. I think you can close (again) the issue. |
I met the following warning when I ran a test with my Django environment.
It seems that the usage of
settings.FILE_CHARSET
is discouraged.versions:
The text was updated successfully, but these errors were encountered: