def obsolete_setter(setter, attrname):
    def newsetter(self, value):
        c = self.__class__.__name__
        msg = "%s.%s is not modifiable, use %s.replace() instead" % (c, attrname, c)
        raise AttributeError(msg)
    return newsetter
dataset/ETHPy150Open scrapy/scrapy/scrapy/http/common.py/obsolete_setter/original