File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ filterwarnings =
22
22
ignore:DateTimeField .* received a naive datetime .* while time zone support is active:RuntimeWarning
23
23
ignore:.*:DeprecationWarning
24
24
25
- ignore:.*:django.utils.deprecation.RemovedInDjango50Warning
25
+ ignore:.*:django.utils.deprecation.RemovedInDjango60Warning
26
26
ignore:.*:elasticsearch.exceptions.ElasticsearchWarning
27
27
ignore:.*:PendingDeprecationWarning
Original file line number Diff line number Diff line change 4
4
import pytest
5
5
from django .conf import settings
6
6
from django .contrib .auth .models import User
7
- from django . core . files .storage import get_storage_class
7
+ from readthedocs .storage import get_storage_class
8
8
from django .test import TestCase
9
9
10
10
from readthedocs .builds .constants import LATEST
Original file line number Diff line number Diff line change 3
3
4
4
import pytest
5
5
from django .conf import settings
6
- from django . core . files .storage import get_storage_class
6
+ from readthedocs .storage import get_storage_class
7
7
from django .test import TestCase
8
8
from django .test .utils import override_settings
9
9
from django_dynamic_fixture import get
Original file line number Diff line number Diff line change 7
7
"""
8
8
9
9
from django .conf import settings
10
- from django .core .files .storage import get_storage_class
11
10
from django .utils .functional import LazyObject
11
+ from django .utils .module_loading import import_string
12
+
13
+
14
+ # Borrowed from Django 4.2 since it was deprecrated and removed in 5.2
15
+ # NOTE: we can use settings.STORAGES for our own storages as well if we want to use the standards.
16
+ #
17
+ # https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-STORAGES)
18
+ # https://github.com/django/django/blob/4.2/django/core/files/storage/__init__.py#L31
19
+ def get_storage_class (import_path = None ):
20
+ return import_string (import_path or settings .DEFAULT_FILE_STORAGE )
12
21
13
22
14
23
class ConfiguredBuildMediaStorage (LazyObject ):
You can’t perform that action at this time.
0 commit comments