diff --git a/docs/news.rst b/docs/news.rst index 88f18310c..6e898ac20 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -3,8 +3,8 @@ Release notes ============= -Scrapy VERSION (unreleased) ---------------------------- +Scrapy 2.18.0 (unreleased) +-------------------------- Highlights: diff --git a/docs/topics/api.rst b/docs/topics/api.rst index 1f07440b7..24f46f656 100644 --- a/docs/topics/api.rst +++ b/docs/topics/api.rst @@ -39,7 +39,7 @@ how you :ref:`configure the downloader middlewares :attr:`request_fingerprinter` and :attr:`stats` attributes get their value when the crawl starts, and raise :exc:`RuntimeError` when read before that. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Those attributes used to be ``None`` before getting their value. .. attribute:: request_fingerprinter diff --git a/docs/topics/download-handlers.rst b/docs/topics/download-handlers.rst index 433a6d139..e1b118195 100644 --- a/docs/topics/download-handlers.rst +++ b/docs/topics/download-handlers.rst @@ -252,7 +252,7 @@ Per-request ``bindaddress`` Yes TLS implementation ``pyOpenSSL``/``cryptography`` =========================== ================================================ -.. versionchanged:: VERSION +.. versionchanged:: 2.18.0 Bad header lines with no colon in them are now skipped, instead of making the whole response impossible to download. diff --git a/docs/topics/exporters.rst b/docs/topics/exporters.rst index 56b995e18..d7bc5675e 100644 --- a/docs/topics/exporters.rst +++ b/docs/topics/exporters.rst @@ -282,7 +282,7 @@ BaseItemExporter :class:`dict` items, which have no declared fields, the key order of each item is used instead. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Fields of non-\ :class:`dict` items used to be exported in the order in which they had been populated, except in :class:`CsvItemExporter`, which has always used declaration order. diff --git a/docs/topics/feed-exports.rst b/docs/topics/feed-exports.rst index 467abc989..f18d2743a 100644 --- a/docs/topics/feed-exports.rst +++ b/docs/topics/feed-exports.rst @@ -205,7 +205,7 @@ FTPS The feeds are stored in a FTP server, over a TLS connection, with the certificate of the server verified. -.. versionadded:: VERSION +.. versionadded:: 2.18.0 - URI scheme: ``ftps`` - Example URI: ``ftps://user:pass@ftp.example.com/path/to/export.csv`` diff --git a/docs/topics/item-pipeline.rst b/docs/topics/item-pipeline.rst index a6aac78ac..643b48aa0 100644 --- a/docs/topics/item-pipeline.rst +++ b/docs/topics/item-pipeline.rst @@ -47,7 +47,7 @@ Additionally, they may also implement the following methods: This method is called when the spider is opened. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Added support for :exc:`~scrapy.exceptions.CloseSpider`. It may raise :exc:`~scrapy.exceptions.CloseSpider` to close the spider before diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst index 27ef3f7ef..5667fc68a 100644 --- a/docs/topics/settings.rst +++ b/docs/topics/settings.rst @@ -487,7 +487,7 @@ Endpoint URL used for S3-like storage, for example Minio or s3.scality. AWS_MAX_POOL_CONNECTIONS ------------------------ -.. versionadded:: VERSION +.. versionadded:: 2.18.0 Default: ``None`` diff --git a/docs/topics/signals.rst b/docs/topics/signals.rst index 0a85c3c05..c73edbf05 100644 --- a/docs/topics/signals.rst +++ b/docs/topics/signals.rst @@ -290,7 +290,7 @@ spider_opened reserve per-spider resources, but can be used for any task that needs to be performed when a spider is opened. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Added support for :exc:`~scrapy.exceptions.CloseSpider`. You may raise a :exc:`~scrapy.exceptions.CloseSpider` exception to close the @@ -348,7 +348,7 @@ spider_error Sent when a spider callback or the :meth:`~scrapy.Spider.start` method of a spider generates an error (i.e. raises an exception). - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Exceptions from :meth:`~scrapy.Spider.start` are also reported, see :ref:`start-error`. @@ -542,7 +542,7 @@ robots_parsed .. signal:: robots_parsed .. function:: robots_parsed(robotparser, request) - .. versionadded:: VERSION + .. versionadded:: 2.18.0 Sent by :class:`~scrapy.downloadermiddlewares.robotstxt.RobotsTxtMiddleware` after it diff --git a/docs/topics/spiders.rst b/docs/topics/spiders.rst index 95c80d5dc..f45fca35e 100644 --- a/docs/topics/spiders.rst +++ b/docs/topics/spiders.rst @@ -59,7 +59,7 @@ scrapy.Spider :class:`~scrapy.downloadermiddlewares.offsite.OffsiteMiddleware` is enabled. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Changes to this attribute during a crawl are now taken into account. Let's say your target url is ``https://www.example.com/1.html``, @@ -422,7 +422,7 @@ sends the :signal:`spider_error` signal, and, once the already scheduled requests are done, closes the spider with the ``start_error`` :stat:`finish_reason`. -.. versionchanged:: VERSION +.. versionchanged:: 2.18.0 The close reason used to be ``finished``, and neither the :signal:`spider_error` signal nor the :stat:`spider_exceptions/count` stat reported the exception. diff --git a/scrapy/exceptions.py b/scrapy/exceptions.py index cd2560df1..439f5b9f5 100644 --- a/scrapy/exceptions.py +++ b/scrapy/exceptions.py @@ -59,7 +59,7 @@ class CloseSpider(Exception): """Raised from a :ref:`spider callback `, or while the spider is starting, to request the spider to be closed/stopped. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Added support for raising it while the spider is starting. *reason* is a string with the reason for closing. diff --git a/scrapy/http/request/__init__.py b/scrapy/http/request/__init__.py index 7c53b6b48..b9399eb0f 100644 --- a/scrapy/http/request/__init__.py +++ b/scrapy/http/request/__init__.py @@ -396,7 +396,7 @@ class Request(object_ref): Inverse of :meth:`from_curl`. See also :func:`scrapy.utils.request.request_to_curl`. - .. versionadded:: VERSION + .. versionadded:: 2.18.0 """ # Imported here to avoid a circular import. from scrapy.utils.request import request_to_curl # noqa: PLC0415 diff --git a/scrapy/http/response/text.py b/scrapy/http/response/text.py index a8e452f7e..525043918 100644 --- a/scrapy/http/response/text.py +++ b/scrapy/http/response/text.py @@ -86,7 +86,7 @@ class TextResponse(Response): def json(self) -> Any: """Deserialize a JSON document to a Python object. - .. versionchanged:: VERSION + .. versionchanged:: 2.18.0 Bodies that cannot be decoded as UTF-8, UTF-16 or UTF-32, as the JSON specification requires, are now decoded using :attr:`TextResponse.encoding` instead of raising diff --git a/scrapy/robotstxt.py b/scrapy/robotstxt.py index b54011784..a9e2f5563 100644 --- a/scrapy/robotstxt.py +++ b/scrapy/robotstxt.py @@ -72,7 +72,7 @@ class RobotParser(metaclass=ABCMeta): of seconds, or ``None`` if it is not set or the backend does not support it. - .. versionadded:: VERSION + .. versionadded:: 2.18.0 """ return None diff --git a/scrapy/spidermiddlewares/depth.py b/scrapy/spidermiddlewares/depth.py index 49683168e..83d242f82 100644 --- a/scrapy/spidermiddlewares/depth.py +++ b/scrapy/spidermiddlewares/depth.py @@ -42,7 +42,7 @@ class DepthMiddleware(BaseSpiderMiddleware): depth_reset ----------- - .. versionadded:: VERSION + .. versionadded:: 2.18.0 :attr:`~scrapy.Request.meta` key that, set to ``True``, gives a request depth 0 instead of the depth of its source response plus 1, e.g. to keep diff --git a/scrapy/utils/asyncio.py b/scrapy/utils/asyncio.py index 7c7697f56..f1317032b 100644 --- a/scrapy/utils/asyncio.py +++ b/scrapy/utils/asyncio.py @@ -296,7 +296,7 @@ class CallLaterResult: async def sleep(seconds: float) -> None: """Sleep for *seconds*. - .. versionadded:: VERSION + .. versionadded:: 2.18.0 This uses either :func:`asyncio.sleep` or :func:`~twisted.internet.task.deferLater`, depending on whether asyncio