def __init__(self, crawler):
     self.hsref = hsref.hsref
     self.pipe_writer = pipe_writer
     self.crawler = crawler
     self._write_item = self.pipe_writer.write_item
     # https://github.com/scrapy/scrapy/commit/c76190d491fca9f35b6758bdc06c34d77f5d9be9
     exporter_kwargs = {'binary': False} if not IS_PYTHON2 else {}
     with ignore_warnings(category=ScrapyDeprecationWarning):
         self.exporter = PythonItemExporter(**exporter_kwargs)
 def __init__(self, crawler):
     self.hsref = hsref.hsref
     self.pipe_writer = pipe_writer
     self.crawler = crawler
     self._write_item = self.pipe_writer.write_item
     # https://github.com/scrapy/scrapy/commit/c76190d491fca9f35b6758bdc06c34d77f5d9be9
     exporter_kwargs = {'binary': False} if not IS_PYTHON2 else {}
     with ignore_warnings(category=ScrapyDeprecationWarning):
         self.exporter = PythonItemExporter(**exporter_kwargs)
def test_ignore_warnings():
    with ignore_warnings(category=ScrapyDeprecationWarning):
        warnings.warn("must be suppressed", ScrapyDeprecationWarning)
def test_ignore_warnings():
    with ignore_warnings(category=ScrapyDeprecationWarning):
        warnings.warn("must be suppressed", ScrapyDeprecationWarning)