Remove scrapy.pipelines.media.MediaPipeline._make_compatible

This commit is contained in:
Laerte Pereira 2023-10-17 18:14:08 -03:00
parent bdb4abcc7a
commit 83f500a352
1 changed files with 0 additions and 20 deletions

View File

@ -44,9 +44,6 @@ class MediaPipeline:
self.allow_redirects = settings.getbool(resolve("MEDIA_ALLOW_REDIRECTS"), False)
self._handle_statuses(self.allow_redirects)
# Check if deprecated methods are being used and make them compatible
self._make_compatible()
def _handle_statuses(self, allow_redirects):
self.handle_httpstatus_list = None
if allow_redirects:
@ -126,23 +123,6 @@ class MediaPipeline:
)
return dfd.addBoth(lambda _: wad) # it must return wad at last
def _make_compatible(self):
"""Make overridable methods of MediaPipeline and subclasses backwards compatible"""
methods = [
"file_path",
"thumb_path",
"media_to_download",
"media_downloaded",
"file_downloaded",
"image_downloaded",
"get_images",
]
for method_name in methods:
method = getattr(self, method_name, None)
if callable(method):
setattr(self, method_name, self._compatible(method))
def _compatible(self, func):
"""Wrapper for overridable methods to allow backwards compatibility"""
self._check_signature(func)