Scrapy, a fast high-level web crawling & scraping framework for Python.
Move scrapy/contrib/exporter to scrapy/exporters
Julia Medina7804b3d77890
diff --git a/docs/faq.rst b/docs/faq.rstindex f593e4f16..80d258b55 100644--- a/docs/faq.rst+++ b/docs/faq.rst@@ -160,7 +160,7 @@ Can I use JSON for large exports?---------------------------------It'll depend on how large your output is. See :ref:`this warning-<json-with-large-data>` in :class:`~scrapy.contrib.exporter.JsonItemExporter`+<json-with-large-data>` in :class:`~scrapy.exporters.JsonItemExporter`documentation.Can I return (Twisted) deferreds from signal handlers?diff --git a/docs/topics/exporters.rst b/docs/topics/exporters.rstindex 43846852b..af469eb7b 100644--- a/docs/topics/exporters.rst+++ b/docs/topics/exporters.rst@@ -4,7 +4,7 @@Item Exporters==============-.. module:: scrapy.contrib.exporter+.. module:: scrapy.exporters:synopsis: Item ExportersOnce you have scraped your items, you often want to persist or export those@@ -40,7 +40,7 @@ Here you can see an :doc:`Item Pipeline <item-pipeline>` which uses an ItemExporter to export scraped items to different files, one per spider::from scrapy import signals- from scrapy.contrib.exporter import XmlItemExporter+ from scrapy.exporters import XmlItemExporterclass XmlExportPipeline(object):@@ -117,7 +117,7 @@ after your custom code.Example::- from scrapy.contrib.exporter import XmlItemExporter+ from scrapy.exporter import XmlItemExporterclass ProductXmlExporter(XmlItemExporter):diff --git a/docs/topics/feed-exports.rst b/docs/topics/feed-exports.rstindex 8166a7a4e..27d601a19 100644--- a/docs/topics/feed-exports.rst+++ b/docs/topics/feed-exports.rst@@ -37,7 +37,7 @@ JSON----* :setting:`FEED_FORMAT`: ``json``- * Exporter used: :class:`~scrapy.contrib.exporter.JsonItemExporter`+ * Exporter used: :class:`~scrapy.exporters.JsonItemExporter`* See :ref:`this warning <json-with-large-data>` if you're using JSON withlarge feeds.@@ -47,7 +47,7 @@ JSON lines----------* :setting:`FEED_FORMAT`: ``jsonlines``- * Exporter used: :class:`~scrapy.contrib.exporter.JsonLinesItemExporter`+ * Exporter used: :class:`~scrapy.exporters.JsonLinesItemExporter`.. _topics-feed-format-csv:@@ -55,7 +55,7 @@ CSV---* :setting:`FEED_FORMAT`: ``csv``- * Exporter used: :class:`~scrapy.contrib.exporter.CsvItemExporter`+ * Exporter used: :class:`~scrapy.exporters.CsvItemExporter`* To specify columns to export and their order use:setting:`FEED_EXPORT_FIELDS`. Other feed exporters can also use thisoption, but it is important for CSV because unlike many other export@@ -67,7 +67,7 @@ XML---* :setting:`FEED_FORMAT`: ``xml``- * Exporter used: :class:`~scrapy.contrib.exporter.XmlItemExporter`+ * Exporter used: :class:`~scrapy.exporters.XmlItemExporter`.. _topics-feed-format-pickle:@@ -75,7 +75,7 @@ Pickle------* :setting:`FEED_FORMAT`: ``pickle``- * Exporter used: :class:`~scrapy.contrib.exporter.PickleItemExporter`+ * Exporter used: :class:`~scrapy.exporters.PickleItemExporter`.. _topics-feed-format-marshal:@@ -83,7 +83,7 @@ Marshal-------* :setting:`FEED_FORMAT`: ``marshal``- * Exporter used: :class:`~scrapy.contrib.exporter.MarshalItemExporter`+ * Exporter used: :class:`~scrapy.exporters.MarshalItemExporter`.. _topics-feed-storage:@@ -300,11 +300,11 @@ FEED_EXPORTERS_BASEDefault::FEED_EXPORTERS_BASE = {- 'json': 'scrapy.contrib.exporter.JsonItemExporter',- 'jsonlines': 'scrapy.contrib.exporter.JsonLinesItemExporter',- 'csv': 'scrapy.contrib.exporter.CsvItemExporter',- 'xml': 'scrapy.contrib.exporter.XmlItemExporter',- 'marshal': 'scrapy.contrib.exporter.MarshalItemExporter',+ 'json': 'scrapy.exporters.JsonItemExporter',+ 'jsonlines': 'scrapy.exporters.JsonLinesItemExporter',+ 'csv': 'scrapy.exporters.CsvItemExporter',+ 'xml': 'scrapy.exporters.XmlItemExporter',+ 'marshal': 'scrapy.exporters.MarshalItemExporter',}A dict containing the built-in feed exporters supported by Scrapy.diff --git a/scrapy/contrib/exporter/__init__.py b/scrapy/exporters/__init__.pysimilarity index 100%rename from scrapy/contrib/exporter/__init__.pyrename to scrapy/exporters/__init__.pydiff --git a/scrapy/settings/default_settings.py b/scrapy/settings/default_settings.pyindex 3323386aa..17db550a7 100644--- a/scrapy/settings/default_settings.py+++ b/scrapy/settings/default_settings.py@@ -139,13 +139,13 @@ FEED_STORAGES_BASE = {}FEED_EXPORTERS = {}FEED_EXPORTERS_BASE = {- 'json': 'scrapy.contrib.exporter.JsonItemExporter',- 'jsonlines': 'scrapy.contrib.exporter.JsonLinesItemExporter',- 'jl': 'scrapy.contrib.exporter.JsonLinesItemExporter',- 'csv': 'scrapy.contrib.exporter.CsvItemExporter',- 'xml': 'scrapy.contrib.exporter.XmlItemExporter',- 'marshal': 'scrapy.contrib.exporter.MarshalItemExporter',- 'pickle': 'scrapy.contrib.exporter.PickleItemExporter',+ 'json': 'scrapy.exporters.JsonItemExporter',+ 'jsonlines': 'scrapy.exporters.JsonLinesItemExporter',+ 'jl': 'scrapy.exporters.JsonLinesItemExporter',+ 'csv': 'scrapy.exporters.CsvItemExporter',+ 'xml': 'scrapy.exporters.XmlItemExporter',+ 'marshal': 'scrapy.exporters.MarshalItemExporter',+ 'pickle': 'scrapy.exporters.PickleItemExporter',}HTTPCACHE_ENABLED = Falsediff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txtindex cf814c15c..8e5c5dc9b 100644--- a/tests/py3-ignores.txt+++ b/tests/py3-ignores.txt@@ -4,7 +4,7 @@ tests/test_command_fetch.pytests/test_command_shell.pytests/test_commands.pytests/test_command_version.py-tests/test_contrib_exporter.py+tests/test_exporters.pytests/test_contrib_linkextractors.pytests/test_contrib_loader.pytests/test_crawl.pydiff --git a/tests/test_contrib_exporter.py b/tests/test_exporters.pysimilarity index 99%rename from tests/test_contrib_exporter.pyrename to tests/test_exporters.pyindex 746aeb65b..df1f8f4d5 100644--- a/tests/test_contrib_exporter.py+++ b/tests/test_exporters.py@@ -9,7 +9,7 @@ import lxml.etreefrom scrapy.item import Item, Fieldfrom scrapy.utils.python import str_to_unicode-from scrapy.contrib.exporter import (+from scrapy.exporters import (BaseItemExporter, PprintItemExporter, PickleItemExporter, CsvItemExporter,XmlItemExporter, JsonLinesItemExporter, JsonItemExporter, PythonItemExporter)