Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Bump mypy and type stubs.

Andrey Rakhmatullind2c05d9d9639
diff --git a/scrapy/utils/spider.py b/scrapy/utils/spider.py
index 855bc8f87..cbbb01d85 100644
--- a/scrapy/utils/spider.py
+++ b/scrapy/utils/spider.py
@@ -34,8 +34,7 @@ _T = TypeVar("_T")
# https://stackoverflow.com/questions/60222982
@overload
-def iterate_spider_output(result: AsyncGenerator) -> AsyncGenerator: # type: ignore[misc]
- ...
+def iterate_spider_output(result: AsyncGenerator) -> AsyncGenerator: ... # type: ignore[overload-overlap]
@overload
diff --git a/scrapy/utils/ssl.py b/scrapy/utils/ssl.py
index e74769c65..d520ef809 100644
--- a/scrapy/utils/ssl.py
+++ b/scrapy/utils/ssl.py
@@ -1,6 +1,6 @@
from typing import Any, Optional
-import OpenSSL._util as pyOpenSSLutil # type: ignore[import-untyped]
+import OpenSSL._util as pyOpenSSLutil
import OpenSSL.SSL
import OpenSSL.version
from OpenSSL.crypto import X509Name
diff --git a/tox.ini b/tox.ini
index 359ff0f73..e787c7bf3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -29,14 +29,14 @@ install_command =
[testenv:typing]
basepython = python3
deps =
- mypy==1.6.1
- typing-extensions==4.8.0
+ mypy==1.8.0
+ typing-extensions==4.10.0
types-attrs==19.1.0
- types-lxml==2023.10.21
- types-Pillow==10.1.0.0
- types-Pygments==2.16.0.0
- types-pyOpenSSL==23.3.0.0
- types-setuptools==68.2.0.0
+ types-lxml==2024.2.9
+ types-Pillow==10.2.0.20240213
+ types-Pygments==2.17.0.20240106
+ types-pyOpenSSL==24.0.0.20240130
+ types-setuptools==69.1.0.20240223
# 2.1.2 fixes a typing bug: https://github.com/scrapy/w3lib/pull/211
w3lib >= 2.1.2
commands =