Commit Graph

2966 Commits

Author SHA1 Message Date
Andrey Rakhmatullin d8ba1571e7
Assorted docs fixes, part 2. (#7725)
* Assorted docs fixes, part 2.

* Second pass.

* Address feedback.
2026-07-14 00:49:44 +05:00
Adrian b3670369b8
Solve the feed Path issue (#7674)
* Solve the feed Path issue

* Address additional, related issues
2026-07-13 22:46:41 +05:00
Andrey Rakhmatullin c9446931a8
Use external mitmproxy. (#7720) 2026-07-09 17:02:05 +02:00
Andrey Rakhmatullin bdf3067935
Assorted docs fixes, part 1. (#7710) 2026-07-07 18:39:34 +05:00
Adrian c5ec881f1d
Update tools (#7724) 2026-07-07 17:27:26 +05:00
Adrian Chaves feb692f552 Bump version: 2.16.0 → 2.17.0 2026-07-07 12:26:52 +02:00
Adrian 9523e1ec8c
Merge commit from fork 2026-07-07 12:25:36 +02:00
Andrey Rakhmatullin 5ccc8dbe8a
Release notes for 2.17.0 (#7723)
* Cover 2.17.0 in the release notes up to dd10cb8.

* Fix a copypasted issue number.

* Address minor issues

* Minor fixes

* Cover additional deprecations introduced while improving test coverage

* versionadded/versionchanged improvements

* Add a versionadded to the give_up_log_level docstring

---------

Co-authored-by: Adrian Chaves <adrian@zyte.com>
2026-07-07 14:57:42 +05:00
Adrian dd10cb8e9a
LxmlLinkExtractor: add deny_attrs and deny_tags (#7679) 2026-07-05 16:46:22 +05:00
Javier 4b2b56f384
Update on Request objects (#7286) 2026-06-29 15:34:12 +02:00
Adrian cf5607f8bc
Undeprecated the basic FormRequest API (#7671) 2026-06-26 17:35:46 +02:00
Adrian 1b940a75ac
Improve the item pipeline docs (#7676) 2026-06-26 16:18:22 +05:00
Adrian 7ab404c725
Add a documentation page about security (#7678) 2026-06-26 11:58:37 +02:00
Adrian 74e6b61071
Make DOWNLOADER_CLIENT_TLS_CIPHERS=None enable Twisted defaults (#7665)
* Make DOWNLOADER_CLIENT_TLS_CIPHERS=None enable Twisted defaults

* Remove pointless comment

* Remove unnecessary mypy comments
2026-06-25 16:44:51 +05:00
Adrian c690eac770
Document “logging settings” as special settings (#7668) 2026-06-25 16:34:37 +05:00
smellslikeml fb3455304d
Add content-based image filtering example (#4954) 2026-06-23 09:04:19 +02:00
Adrian f605defefc
Document scrapy-lint, remove start_url check (#7627)
* Document scrapy-lint, remove start_url check

* Remove the offsite URL check in favor of scrapy-lint
2026-06-22 20:12:16 +05:00
Adrian a8ffdcf851
Implement HTTP Auth settings and request metadata keys (#7590)
* Implement HTTP Auth settings and request metadata keys

* Fix doc-tests

* Require the domain to be set when using settings
2026-06-11 15:56:53 +05:00
Adrian c99f6e2209
Document the SPIDER_MODULES hack to lower startup time and memory usage (#7600) 2026-06-11 12:10:49 +02:00
Labib Bin Salam e0a7de7213
Document cb_kwargs/meta deep-copy when JOBDIR is set (#7573)
When JOBDIR is enabled, requests are serialized to disk with pickle, so
the objects stored in a request's cb_kwargs and meta are deep-copied on
the round trip. Callbacks then receive copies rather than the original
objects, which is easy to miss and can silently break code that relies on
sharing mutable state. Add a note to the request serialization section of
the jobs docs and a cross-referenced caution to the Request.cb_kwargs
attribute docs.

Closes #6120
2026-06-11 14:40:15 +05:00
Adrian e7f229f5b2
Clarify the first-class-citizen nature of asyncio support (#7599) 2026-06-11 10:51:46 +02:00
Andrey Rakhmatullin 4cb049cb15
Small docs fixes. (#7598) 2026-06-11 10:51:03 +02:00
Andrey Rakhmatullin beb6c51c17
Update default_settings, deprecate CRAWLSPIDER_FOLLOW_LINKS. (#7592) 2026-06-11 00:22:09 +05:00
Andrey Rakhmatullin 4e956bd2de
Add support for HTTP/2 and for SOCKS proxies to HttpxDownloadHandler, improve handler docs (#7575)
* Add support for HTTP/2 and SOCKS proxies to HttpxDownloadHandler.

* Update the docs.

* Trim the tables.

* Restore lost wording.

* Handlers docs improvements and fixes.
2026-06-09 01:10:44 +05:00
Adnan Awan d2290c35c2
Allow configuring the log level of the retry give-up message (#7567)
* Allow configuring the log level of the retry give-up message

The "Gave up retrying ..." message was always logged at ERROR, which
inflates the log_count/ERROR stat even when giving up on a request is
expected (e.g. broad crawls hitting dead hosts).

Add a RETRY_GIVE_UP_LOG_LEVEL setting, a give_up_log_level argument to
get_retry_request(), and a give_up_log_level request meta key to override
it per request. The value accepts a level name ("WARNING") or number
(logging.WARNING). The default ("ERROR") preserves the previous behaviour.

Fixes #5297, fixes #4622

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address Adrian's review feedback: simplify and reorganize docs

- Move give_up_log_level reqmeta section before max_retry_times (alphabetical order)
- Simplify give_up_log_level section in request-response.rst (brief, links to setting)
- Simplify RETRY_GIVE_UP_LOG_LEVEL setting docs in downloader-middleware.rst
- Change 'When initialized' to 'When set' in max_retry_times section
- Docs now follow pattern of linking to complementary setting/meta key rather than duplicating information

Per Adrian's feedback: keep docs concise and cross-link setting ↔ meta key

* Address Adrian's code review feedback on RETRY_GIVE_UP_LOG_LEVEL feature

- Fix alphabetical ordering of give_up_log_level in request-response.rst
- Remove circular references: change 'see X for details' to 'see also X' pattern
- Simplify docstring for give_up_log_level parameter (4 lines → 2 lines)
- Update test domains from www.scrapytest.org to example.com

* Apply suggestion from @AdrianAtZyte

* Minor changes

* Fix example formatting.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Adrian <adrian@zyte.com>
Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
2026-06-08 18:44:30 +05:00
Andrey Rakhmatullin d9e2f5fbf7
Add settings for TLS min/max version as a replacement for the TLS method (#6546) 2026-06-08 11:54:10 +02:00
Omkar Kabde 5149e2c679
docs: switch `scrapy.Item` examples to dataclasses (#7513)
* docs: switch `scrapy.Item` examples to dataclasses

* make serializer doc generic

* use modern type hints

* docs/spiders: switch TestItem consumer snippets to attribute access

Since the TestItem migration to @dataclass, the existing
item["id"] = ... assignments would raise TypeError on copy-paste.
Switch to item.id = ... to match the new dataclass declaration.

The snippets sit under .. skip: next so docs-tests still pass either
way, but the change keeps the examples runnable for readers.
2026-06-08 12:40:28 +05:00
Adrian b2d8b06be6
Support sending requests with "unsafe" URLs (#7473) 2026-06-05 11:51:03 +02:00
Fardin Alizadeh 44406806f8
fix typos (#7564) 2026-06-02 11:04:38 +02:00
SpiliosDmk 4a16550859
DOC -> Add missing documentation for CloseSpider & CoreStats (#7421)
* DOC -> Add missing documentation for CloseSpider & CoreStats

* Apply the suggestion from the PR review.

---------

Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
2026-05-20 13:27:24 +05:00
Andrey Rakhmatullin abe9c63841 Bump version: 2.15.2 → 2.16.0 2026-05-19 17:27:16 +05:00
Andrey Rakhmatullin a84b7850fc
Release notes for Scrapy 2.16.0. (#7536) 2026-05-19 17:26:21 +05:00
Andrey Rakhmatullin f875af4a86
Add BaseStreamingDownloadHandler and migrate HttpxDownloadHandler to it. (#7524) 2026-05-18 15:52:13 +02:00
Andrey Rakhmatullin a8a8f20d9c
Remove support for sync process_spider_output(). (#7504)
* Remove support for sync process_spider_output().

* Slight check fix.

* Don't expect exceptions from calling process_spider_output().

* Remove dead code.

* Fix test_deprecated_mw_spider_arg() to run all methods.

* Fix typing.

* Typos.

* Remove references to the removed section, move the universal section to the spider middleware docs and write it from a different perspective

* Fix indentation issue

* Minor rewordings

* older versions → lower versions

* Update news.rst

---------

Co-authored-by: Adrian Chaves <adrian@zyte.com>
2026-05-15 16:36:05 +05:00
Olivia Choi ae4a8e39e1
Document TLS method setting in avoiding bans guide (#7518)
* Document TLS method setting in avoiding bans guide

Mention DOWNLOADER_CLIENT_TLS_METHOD in the avoiding getting banned section.

* Update practices.rst

---------

Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
2026-05-14 16:27:43 +05:00
Andrey Rakhmatullin 2d007bc450
Make more of the internal handler helpers private. (#7510) 2026-05-12 22:03:14 +02:00
Andrey Rakhmatullin 2798c03bb0
Add Python 3.14 to CI. (#6604)
* Add Python 3.14 (alpha3) to CI.

* Disable mitmproxy on 3.14 for now.

* 3.14.0-alpha.4.

* 3.14.0-alpha.5

* 3.14.0-beta2.

* 3.14 release.

* Fix test_non_pickable_object.

* Fix handling of file:/path feed URIs.

* Better mocking of streams for TextTestResult.

* Do not use .php in test_file_path() as it's now a known extension.

* Fix the URL in TestFeedExporterSignals.

* Fix typing.

* Bump more envs to 3.14.

* Silence pylint.

* Fix another test for .php handling change.

* Remove test_install_asyncio_reactor.

* More bumps to 3.14.

* Revert docs-tests to use 3.13.

* Debug options for Windows.

* Re-enable xdist.

* Revert Windows PYTEST_ADDOPTS.

* Silence loop policy deprecation warnings.

* Restore a lost pylint suppression.

* Update asyncio_enabled_reactor_same_loop.py to new Twisted.

* Fix RobotFileParser tests for Python 3.14.5.
2026-05-12 23:49:37 +05:00
Abhinav W 3b34ab88c0
docs: document daily log file rotation (#7501)
* docs: document daily log file rotation

* Skip the new snippet in doc tests

---------

Co-authored-by: Adrian <adrian@zyte.com>
2026-05-12 19:34:51 +05:00
Andrey Rakhmatullin 7fc84d372a
Cleanup/clarifications of proxy support and improvements for proxy tests (#7496)
* Run mitmproxy-based tests for every handler and improve them.

* Fixes for H2DownloadHandler.

* Revert "Fixes for H2DownloadHandler."

This reverts commit bcdbd097cd.

* Add TestHttpsProxy for HTTP11DownloadHandler.

* Use the configured context factory in ScrapyProxyAgent.

* Reword.

* Reword.

* pragma: no cover for H2DownloadHandler proxy code.

* Raise an exception for HTTPS proxies instead of using HTTP.

* Remove non-working proxy support and explicitly forbid HTTP.

* pragma: no cover

* Add a docs note about HTTPS proxies.

* Rename ScrapyProxyAgent.
2026-05-12 17:45:54 +05:00
Adrian 7f15ca92fc
sphinx-scrapy: 0.8.5 → 0.8.6 (#7507) 2026-05-12 12:49:23 +05:00
Adrián Chaves 8d69a7c865
Deprecate FormRequest in favor of form2request (#6438)
* WIP

* Add docs

* Remove FormRequest from tests

* Silence mypy issue

* Address docs-tests issues

---------

Co-authored-by: Adrian Chaves <adrian@zyte.com>
Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
2026-05-04 22:38:29 +05:00
Andrey Rakhmatullin 9ca206da64
Merge pull request #7487 from wRAR/deprecation-removals
Remove most of the 2.13.0 deprecations
2026-05-04 12:33:21 +05:00
Andrey Rakhmatullin d05b241f64
Fix a code block in leaks.rst. (#7489) 2026-05-04 08:59:27 +02:00
Adrian 55c61646da
Merge branch 'master' into deprecation-removals 2026-05-04 08:52:12 +02:00
Sanjay M a9324fbf76
Fix small documentation wording issues (#7480) 2026-05-04 08:43:21 +02:00
Andrey Rakhmatullin af7dcabebb Drop AjaxCrawlMiddleware and escape_ajax(). 2026-05-03 14:12:18 +05:00
Adrian b9c2240040
sphinx-scrapy: 0.8.4 → 0.8.5 (#7472) 2026-04-29 14:17:26 +02:00
Andrey Rakhmatullin 30a54b72f0
Merge pull request #7470 from scrapy/2.15
Merge 2.15.2 into the main branch
2026-04-28 21:19:29 +05:00
Adrian Chaves 3d5ca9f433 Bump version: 2.15.1 → 2.15.2 2026-04-28 15:28:51 +02:00
Adrian 3a88cd0e2b
2.15.2 (#7468)
* sphinx-scrapy: 0.8.3 → 0.8.4 (#7467)

* Release notes for 2.15.2
2026-04-28 15:26:42 +02:00