scrapy/scrapy — pull request #720 by cornchz (2014-05-16 12:17:05+00:00)
Title: RAII for Exporters

It would be handful to provide [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization) for exporters, especially when there is just one item to export.

with SomeExporter() as exporter:
exporter.export_item(item)

would be simple and less error-prone than

exporter = SomeExporter()
exporter.start_exporting()
exporter.export_item(item)
exporter.finish_exporting()