Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1
2
3
4
5
6
7
8
9
10
import warnings
from scrapy.exceptions import ScrapyDeprecationWarning
def deprecated_setter(setter, attrname):
def newsetter(self, value):
c = self.__class__.__name__
warnings.warn("Don't modify %s.%s attribute, use %s.replace() instead" % \
(c, attrname, c), ScrapyDeprecationWarning, stacklevel=2)
return setter(self, value)
return newsetter