mirror of https://github.com/scrapy/scrapy.git
Update tools (#7724)
This commit is contained in:
parent
feb692f552
commit
c5ec881f1d
|
|
@ -6,7 +6,7 @@ exclude: |
|
||||||
)
|
)
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.15.2
|
rev: v0.15.20
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
args: [ --fix ]
|
args: [ --fix ]
|
||||||
|
|
@ -16,7 +16,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: blacken-docs
|
- id: blacken-docs
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- black==25.9.0
|
- black==26.5.1
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v6.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,6 @@ How can I make a blank request?
|
||||||
|
|
||||||
from scrapy import Request
|
from scrapy import Request
|
||||||
|
|
||||||
|
|
||||||
blank_request = Request("data:,")
|
blank_request = Request("data:,")
|
||||||
|
|
||||||
In this case, the URL is set to a data URI scheme. Data URLs allow you to include data
|
In this case, the URL is set to a data URI scheme. Data URLs allow you to include data
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,6 @@ Use a fallback component:
|
||||||
|
|
||||||
from scrapy.utils.misc import build_from_crawler, load_object
|
from scrapy.utils.misc import build_from_crawler, load_object
|
||||||
|
|
||||||
|
|
||||||
FALLBACK_SETTING = "MY_FALLBACK_DOWNLOAD_HANDLER"
|
FALLBACK_SETTING = "MY_FALLBACK_DOWNLOAD_HANDLER"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -634,8 +634,7 @@ Example:
|
||||||
.. code-block:: pycon
|
.. code-block:: pycon
|
||||||
|
|
||||||
>>> from scrapy import Selector
|
>>> from scrapy import Selector
|
||||||
>>> sel = Selector(
|
>>> sel = Selector(text="""
|
||||||
... text="""
|
|
||||||
... <ul class="list">
|
... <ul class="list">
|
||||||
... <li>1</li>
|
... <li>1</li>
|
||||||
... <li>2</li>
|
... <li>2</li>
|
||||||
|
|
@ -645,8 +644,8 @@ Example:
|
||||||
... <li>4</li>
|
... <li>4</li>
|
||||||
... <li>5</li>
|
... <li>5</li>
|
||||||
... <li>6</li>
|
... <li>6</li>
|
||||||
... </ul>"""
|
... </ul>""")
|
||||||
... )
|
...
|
||||||
>>> xp = lambda x: sel.xpath(x).getall()
|
>>> xp = lambda x: sel.xpath(x).getall()
|
||||||
|
|
||||||
This gets all first ``<li>`` elements under whatever it is its parent:
|
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")
|
>>> sel = Selector(text=doc, type="html")
|
||||||
>>> for scope in sel.xpath("//div[@itemscope]"):
|
>>> for scope in sel.xpath("//div[@itemscope]"):
|
||||||
... print("current scope:", scope.xpath("@itemtype").getall())
|
... print("current scope:", scope.xpath("@itemtype").getall())
|
||||||
... props = scope.xpath(
|
... props = scope.xpath("""
|
||||||
... """
|
|
||||||
... set:difference(./descendant::*/@itemprop,
|
... set:difference(./descendant::*/@itemprop,
|
||||||
... .//*[@itemscope]/*/@itemprop)"""
|
... .//*[@itemscope]/*/@itemprop)""")
|
||||||
... )
|
|
||||||
... print(f" properties: {props.getall()}")
|
... print(f" properties: {props.getall()}")
|
||||||
... print("")
|
... print("")
|
||||||
...
|
...
|
||||||
|
|
|
||||||
20
tox.ini
20
tox.ini
|
|
@ -70,13 +70,13 @@ commands =
|
||||||
basepython = python3.10
|
basepython = python3.10
|
||||||
deps =
|
deps =
|
||||||
mypy==2.1.0
|
mypy==2.1.0
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.16.0
|
||||||
Pillow==12.2.0
|
Pillow==12.3.0
|
||||||
Protego==0.6.0
|
Protego==0.6.2
|
||||||
Twisted==26.4.0
|
Twisted==26.4.0
|
||||||
attrs==26.1.0
|
attrs==26.1.0
|
||||||
boto3-stubs[s3]==1.43.9
|
boto3-stubs[s3]==1.43.41
|
||||||
botocore-stubs==1.42.41
|
botocore-stubs==1.43.14
|
||||||
h2==4.3.0
|
h2==4.3.0
|
||||||
httpx==0.28.1
|
httpx==0.28.1
|
||||||
itemadapter==0.13.1
|
itemadapter==0.13.1
|
||||||
|
|
@ -84,12 +84,12 @@ deps =
|
||||||
# newer ones require newer Python
|
# newer ones require newer Python
|
||||||
ipython==8.39.0
|
ipython==8.39.0
|
||||||
pyOpenSSL==26.3.0
|
pyOpenSSL==26.3.0
|
||||||
pytest==9.0.3
|
pytest==9.1.1
|
||||||
socksio==1.0.0
|
socksio==1.0.0
|
||||||
types-Pygments==2.20.0.20260508
|
types-Pygments==2.20.0.20260518
|
||||||
types-defusedxml==0.7.0.20260504
|
types-defusedxml==0.7.0.20260504
|
||||||
types-lxml==2026.2.16
|
types-lxml==2026.2.16
|
||||||
types-pexpect==4.9.0.20260508
|
types-pexpect==4.9.0.20260518
|
||||||
uvloop==0.22.1
|
uvloop==0.22.1
|
||||||
w3lib==2.4.1
|
w3lib==2.4.1
|
||||||
zstandard==0.25.0
|
zstandard==0.25.0
|
||||||
|
|
@ -116,7 +116,7 @@ commands =
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps =
|
deps =
|
||||||
{[testenv:extra-deps]deps}
|
{[testenv:extra-deps]deps}
|
||||||
pylint==4.0.2
|
pylint==4.0.6
|
||||||
pylint-per-file-ignores # https://github.com/pylint-dev/pylint/issues/3767#issuecomment-1319916278
|
pylint-per-file-ignores # https://github.com/pylint-dev/pylint/issues/3767#issuecomment-1319916278
|
||||||
commands =
|
commands =
|
||||||
pylint {posargs:conftest.py docs extras scrapy tests}
|
pylint {posargs:conftest.py docs extras scrapy tests}
|
||||||
|
|
@ -125,7 +125,7 @@ commands =
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps =
|
deps =
|
||||||
twine==6.2.0
|
twine==6.2.0
|
||||||
build==1.3.0
|
build==1.5.0
|
||||||
commands =
|
commands =
|
||||||
python -m build --sdist
|
python -m build --sdist
|
||||||
twine check dist/*
|
twine check dist/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue