Cleanup settings._DictProxy and scrapy.telnet (#5730)

This commit is contained in:
Hanzallah Burney 2022-11-23 19:48:34 +05:00 committed by GitHub
parent 04a1a4b730
commit f6e9e6592a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 27 deletions

View File

@ -435,30 +435,6 @@ class BaseSettings(MutableMapping):
p.text(pformat(self.copy_to_dict()))
class _DictProxy(MutableMapping):
def __init__(self, settings, priority):
self.o = {}
self.settings = settings
self.priority = priority
def __len__(self):
return len(self.o)
def __getitem__(self, k):
return self.o[k]
def __setitem__(self, k, v):
self.settings.set(k, v, priority=self.priority)
self.o[k] = v
def __delitem__(self, k):
del self.o[k]
def __iter__(self, k, v):
return iter(self.o)
class Settings(BaseSettings):
"""
This object stores Scrapy settings for the configuration of internal

View File

@ -2,6 +2,7 @@
import warnings
import inspect
from typing import List, Tuple
from scrapy.exceptions import ScrapyDeprecationWarning
@ -126,9 +127,7 @@ def _clspath(cls, forced=None):
return f'{cls.__module__}.{cls.__name__}'
DEPRECATION_RULES = [
('scrapy.telnet.', 'scrapy.extensions.telnet.'),
]
DEPRECATION_RULES: List[Tuple[str, str]] = []
def update_classpath(path):