-
Notifications
You must be signed in to change notification settings - Fork 195
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
Fix storages deprecation warnings #372
Fix storages deprecation warnings #372
Conversation
Not a great solution, but a workaround.
This isn't really used, but I think having caching is a win
637fa4e
to
4abfa8e
Compare
from django.conf import settings | ||
from django.core.files.base import ContentFile | ||
from django.core.files.storage import get_storage_class | ||
|
||
if django.VERSION >= (4, 2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used the versioned block approach over the try/catch ImportError
as this is automatically fixable by django-upgrade
when we'll need to remove it.
Hey @frankwiles and @jefftriplett, Can you please check this and the other compatibility improvement PR (#363)? Thank you! |
@KOliver94 I'll ping Frank and see if he has time tomorrow to check it. He's a little closer to the project than me, and he can cut release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
3d59bd0
to
8969b61
Compare
* ⚙️ Adds Django 4.2 support and fixes trove classifiers * :shirts: Runs black on code to make CI happy * :shirts: Runs isort on code to make CI happy * 💚 Updates test to match exception copy * 📝 mirrors old README.rst to make docs work Not a great solution, but a workaround. * ⚙️ Adds pip cache support * 🔥 Removes 4.0 from grid because it's no longer supported * ⚙️ Updates cache-key This isn't really used, but I think having caching is a win * ⚙️ Adds missing file * 🔥 Removes cache line * Fix storages deprecation warnings (#372) * ⚙️ Adds Django 4.2 support and fixes trove classifiers * :shirts: Runs black on code to make CI happy * :shirts: Runs isort on code to make CI happy * 💚 Updates test to match exception copy * 📝 mirrors old README.rst to make docs work Not a great solution, but a workaround. * ⚙️ Adds pip cache support * 🔥 Removes 4.0 from grid because it's no longer supported * ⚙️ Updates cache-key This isn't really used, but I think having caching is a win * ⚙️ Adds missing file * 🔥 Removes cache line * Fix storages deprecation warnings --------- Co-authored-by: Jeff Triplett <[email protected]> * Fix isort ordering --------- Co-authored-by: Bruno Alla <[email protected]> Co-authored-by: Frank Wiles <[email protected]>
Builds on top of #363 to resolve the deprecation warning coming out of the new unified
STORAGES
setting.Fix #366
Closes #365