Spiders can now modify :ref:settings <topics-settings> in their
:meth:~scrapy.Spider.from_crawler methods, e.g. based on :ref:spider arguments <spiderargs>.
Periodic logging of stats.
Backward-incompatible changes
- Most of the initialization of :class:`scrapy.crawler.Crawler` instances is
now done in :meth:`~scrapy.crawler.Crawler.crawl`, so the state of
instances before that method is called is now different compared to older
Scrapy versions. We do not recommend using the
:class:`~scrapy.crawler.Crawler` instances before
:meth:`~scrapy.crawler.Crawler.crawl` is called. (:issue:`6038`)
:meth:scrapy.Spider.from_crawler is now called before the initialization
of various components previously initialized in
:meth:scrapy.crawler.Crawler.__init__ and before the settings are
finalized and frozen. This change was needed to allow changing the settings
in :meth:scrapy.Spider.from_crawler. If you want to access the final
setting values in the spider code as early as possible you can do this in
:meth:~scrapy.Spider.start_requests. (:issue:6038)
The :meth:TextResponse.json <scrapy.http.TextResponse.json> method now
requires the response to be in a valid JSON encoding (UTF-8, UTF-16, or
UTF-32). If you need to deal with JSON documents in an invalid encoding,
use json.loads(response.text) instead. (:issue:6016)
Deprecation removals
- Removed the binary export mode of
:class:`~scrapy.exporters.PythonItemExporter`, deprecated in Scrapy 1.1.0.
(:issue:`6006`, :issue:`6007`)
.. note:: If you are using this Scrapy version on Scrapy Cloud with a stack
that includes an older Scrapy version and get a "TypeError:
Unexpected options: binary" error, you may need to add
``scrapinghub-entrypoint-scrapy >= 0.14.1`` to your project
requirements or switch to a stack that includes Scrapy 2.11.
- Removed the ``CrawlerRunner.spiders`` attribute, deprecated in Scrapy
1.0.0, use :attr:`CrawlerRunner.spider_loader
</tr></table>
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/scrapy/scrapy/commit/f2fb4760d2e98cc92ab00a84bcf20cd8a6de3799"><code>f2fb476</code></a> Bump version: 2.10.1 → 2.11.0</li>
<li><a href="https://github.com/scrapy/scrapy/commit/efc594b53f4d950066012951f709bcc3dde8114b"><code>efc594b</code></a> Merge pull request <a href="https://redirect.github.com/scrapy/scrapy/issues/6048">#6048</a> from wRAR/relnotes-2.11</li>
<li><a href="https://github.com/scrapy/scrapy/commit/528911da85f871fd0f7546d4d16bbea556793d4b"><code>528911d</code></a> Fix/reword the release notes.</li>
<li><a href="https://github.com/scrapy/scrapy/commit/2fa768399a27aca615bccfc7c466758a968f10fe"><code>2fa7683</code></a> Replace the VERSION vars.</li>
<li><a href="https://github.com/scrapy/scrapy/commit/c2346b4a95e51ec1d3a255e19b49042b4598a02d"><code>c2346b4</code></a> Update the release notes up to current master.</li>
<li><a href="https://github.com/scrapy/scrapy/commit/3f34a5b151b747f353817f2db2dc2f1a5db32c77"><code>3f34a5b</code></a> Merge pull request <a href="https://redirect.github.com/scrapy/scrapy/issues/6050">#6050</a> from wRAR/retrymw-fix</li>
<li><a href="https://github.com/scrapy/scrapy/commit/800c1f112e883070d97aa679b4bae10f618633a9"><code>800c1f1</code></a> Remove the constant.</li>
<li><a href="https://github.com/scrapy/scrapy/commit/14c27d2215e539407883556f38374d0db198aff7"><code>14c27d2</code></a> Merge branch 'master' into relnotes-2.11</li>
<li><a href="https://github.com/scrapy/scrapy/commit/922ff5738448205c5b7e5ced533bb8820b168480"><code>922ff57</code></a> Improve the backwards compatibility for RetryMiddleware.EXCEPTIONS_TO_RETRY.</li>
<li><a href="https://github.com/scrapy/scrapy/commit/dba37674e6eaa6c2030c8eb35ebf8127cd488062"><code>dba3767</code></a> Merge pull request <a href="https://redirect.github.com/scrapy/scrapy/issues/6038">#6038</a> from wRAR/change-init-order</li>
<li>Additional commits viewable in <a href="https://github.com/scrapy/scrapy/compare/2.10.1...2.11.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=scrapy&package-manager=pip&previous-version=2.10.1&new-version=2.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps scrapy from 2.10.1 to 2.11.0.
Release notes
Sourced from scrapy's releases.
Changelog
Sourced from scrapy's changelog.