Scrapy, a fast high-level web crawling & scraping framework for Python.
Update tools (#7724)
Adrianc5ec881f1de1
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 754bd6f9c..311df7052 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -6,7 +6,7 @@ exclude: |)repos:- repo: https://github.com/astral-sh/ruff-pre-commit- rev: v0.15.2+ rev: v0.15.20hooks:- id: ruff-checkargs: [ --fix ]@@ -16,7 +16,7 @@ repos:hooks:- id: blacken-docsadditional_dependencies:- - black==25.9.0+ - black==26.5.1- repo: https://github.com/pre-commit/pre-commit-hooksrev: v6.0.0hooks:diff --git a/docs/faq.rst b/docs/faq.rstindex df90122f5..6eeb81a31 100644--- a/docs/faq.rst+++ b/docs/faq.rst@@ -409,7 +409,6 @@ How can I make a blank request?from scrapy import Request-blank_request = Request("data:,")In this case, the URL is set to a data URI scheme. Data URLs allow you to include datadiff --git a/docs/topics/addons.rst b/docs/topics/addons.rstindex 01e4bcac1..78b1ab92b 100644--- a/docs/topics/addons.rst+++ b/docs/topics/addons.rst@@ -168,7 +168,6 @@ Use a fallback component:from scrapy.utils.misc import build_from_crawler, load_object-FALLBACK_SETTING = "MY_FALLBACK_DOWNLOAD_HANDLER"diff --git a/docs/topics/selectors.rst b/docs/topics/selectors.rstindex 35ea2a200..0b174341d 100644--- a/docs/topics/selectors.rst+++ b/docs/topics/selectors.rst@@ -634,8 +634,7 @@ Example:.. code-block:: pycon>>> from scrapy import Selector- >>> sel = Selector(- ... text="""+ >>> sel = Selector(text="""... <ul class="list">... <li>1</li>... <li>2</li>@@ -645,8 +644,8 @@ Example:... <li>4</li>... <li>5</li>... <li>6</li>- ... </ul>"""- ... )+ ... </ul>""")+ ...>>> xp = lambda x: sel.xpath(x).getall()This gets all first ``<li>`` elements under whatever it is its parent:@@ -948,11 +947,9 @@ with groups of itemscopes and corresponding itemprops:>>> sel = Selector(text=doc, type="html")>>> for scope in sel.xpath("//div[@itemscope]"):... print("current scope:", scope.xpath("@itemtype").getall())- ... props = scope.xpath(- ... """+ ... props = scope.xpath("""... set:difference(./descendant::*/@itemprop,- ... .//*[@itemscope]/*/@itemprop)"""- ... )+ ... .//*[@itemscope]/*/@itemprop)""")... print(f" properties: {props.getall()}")... print("")...diff --git a/tox.ini b/tox.iniindex 5017d7636..7ace26e98 100644--- a/tox.ini+++ b/tox.ini@@ -70,13 +70,13 @@ commands =basepython = python3.10deps =mypy==2.1.0- typing-extensions==4.15.0- Pillow==12.2.0- Protego==0.6.0+ typing-extensions==4.16.0+ Pillow==12.3.0+ Protego==0.6.2Twisted==26.4.0attrs==26.1.0- boto3-stubs[s3]==1.43.9- botocore-stubs==1.42.41+ boto3-stubs[s3]==1.43.41+ botocore-stubs==1.43.14h2==4.3.0httpx==0.28.1itemadapter==0.13.1@@ -84,12 +84,12 @@ deps =# newer ones require newer Pythonipython==8.39.0pyOpenSSL==26.3.0- pytest==9.0.3+ pytest==9.1.1socksio==1.0.0- types-Pygments==2.20.0.20260508+ types-Pygments==2.20.0.20260518types-defusedxml==0.7.0.20260504types-lxml==2026.2.16- types-pexpect==4.9.0.20260508+ types-pexpect==4.9.0.20260518uvloop==0.22.1w3lib==2.4.1zstandard==0.25.0@@ -116,7 +116,7 @@ commands =basepython = python3deps ={[testenv:extra-deps]deps}- pylint==4.0.2+ pylint==4.0.6pylint-per-file-ignores # https://github.com/pylint-dev/pylint/issues/3767#issuecomment-1319916278commands =pylint {posargs:conftest.py docs extras scrapy tests}@@ -125,7 +125,7 @@ commands =basepython = python3deps =twine==6.2.0- build==1.3.0+ build==1.5.0commands =python -m build --sdisttwine check dist/*