Skip to content

Commit ccd20f2

Browse files
committed
Remove modules and methods that are deprecated for a long time.
1 parent 37dcfb5 commit ccd20f2

File tree

5 files changed

+2
-67
lines changed

5 files changed

+2
-67
lines changed

cacheback/base.py

+2-32
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
import hashlib
33
import logging
44
import time
5-
import warnings
65

76
from django.conf import settings
87
from django.core.cache import DEFAULT_CACHE_ALIAS, caches
98
from django.db.models import Model as DjangoModel
10-
from django.utils.deprecation import RenameMethodsBase
119
from django.utils.itercompat import is_iterable
1210

13-
from .utils import RemovedInCacheback13Warning, enqueue_task, get_job_class
11+
from .utils import enqueue_task, get_job_class
1412

1513

1614
logger = logging.getLogger('cacheback')
@@ -39,16 +37,7 @@ def to_bytestring(value):
3937
return bytes(str(value), 'utf8')
4038

4139

42-
class JobBase(RenameMethodsBase):
43-
44-
renamed_methods = (
45-
('get_constructor_args', 'get_init_args', RemovedInCacheback13Warning),
46-
('get_constructor_kwargs', 'get_init_kwargs', RemovedInCacheback13Warning),
47-
('cache_set', 'store', RemovedInCacheback13Warning),
48-
)
49-
50-
51-
class Job(metaclass=JobBase):
40+
class Job(object):
5241
"""
5342
A cached read job.
5443
@@ -387,17 +376,6 @@ def should_missing_item_be_fetched_synchronously(self, *args, **kwargs):
387376
"""
388377
return self.fetch_on_miss
389378

390-
def should_item_be_fetched_synchronously(self, *args, **kwargs):
391-
import warnings
392-
393-
warnings.warn(
394-
"The method 'should_item_be_fetched_synchronously' is deprecated "
395-
"and will be removed in 0.5. Use "
396-
"'should_missing_item_be_fetched_synchronously' instead.",
397-
DeprecationWarning,
398-
)
399-
return self.should_missing_item_be_fetched_synchronously(*args, **kwargs)
400-
401379
def should_stale_item_be_fetched_synchronously(self, delta, *args, **kwargs):
402380
"""
403381
Return whether to refresh an item synchronously when it is found in the
@@ -471,14 +449,6 @@ def process_result(self, result, call, cache_status, sync_fetch=None):
471449
# ASYNC HELPER METHODS
472450
# --------------------
473451

474-
@classmethod
475-
def job_refresh(cls, *args, **kwargs):
476-
warnings.warn(
477-
'`Job.job_refresh` is deprecated, use `perform_async_refresh` instead.',
478-
RemovedInCacheback13Warning,
479-
)
480-
return cls.perform_async_refresh(*args, **kwargs)
481-
482452
@classmethod
483453
def perform_async_refresh(cls, klass_str, obj_args, obj_kwargs, call_args, call_kwargs):
484454
"""

cacheback/conf.py

-11
This file was deleted.

cacheback/function.py

-10
This file was deleted.

cacheback/queryset.py

-10
This file was deleted.

cacheback/utils.py

-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
logger = logging.getLogger('cacheback')
2727

2828

29-
class RemovedInCacheback13Warning(DeprecationWarning):
30-
pass
31-
32-
3329
def get_job_class(klass_str):
3430
"""
3531
Return the job class

0 commit comments

Comments
 (0)