From e17487192fee62ab5bcc83774462cb8b796299b6 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 26 Sep 2025 23:12:50 +0500 Subject: [PATCH 1/3] Explicit reexport. --- pyproject.toml | 10 +++++++++- web_poet/page_inputs/__init__.py | 17 +++++++++++++++++ web_poet/serialization/__init__.py | 14 ++++++++++++++ web_poet/testing/__init__.py | 2 ++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0dd450e0..4c75e038 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,15 @@ exclude_also = [ [tool.mypy] ignore_missing_imports = false -implicit_reexport = true +implicit_reexport = false + +[[tool.mypy.overrides]] +module = "andi" +implicit_reexport = true # to be fixed + +[[tool.mypy.overrides]] +module = "zyte_common_items" +implicit_reexport = true # to be fixed [[tool.mypy.overrides]] module = "tests.*" diff --git a/web_poet/page_inputs/__init__.py b/web_poet/page_inputs/__init__.py index 9c781e29..6932fd2c 100644 --- a/web_poet/page_inputs/__init__.py +++ b/web_poet/page_inputs/__init__.py @@ -12,3 +12,20 @@ from .response import AnyResponse from .stats import Stats from .url import RequestUrl, ResponseUrl + +__all__ = [ + "AnyResponse", + "BrowserHtml", + "BrowserResponse", + "HttpClient", + "HttpRequest", + "HttpRequestBody", + "HttpRequestHeaders", + "HttpResponse", + "HttpResponseBody", + "HttpResponseHeaders", + "PageParams", + "RequestUrl", + "ResponseUrl", + "Stats", +] diff --git a/web_poet/serialization/__init__.py b/web_poet/serialization/__init__.py index cb49112a..06e6a37b 100644 --- a/web_poet/serialization/__init__.py +++ b/web_poet/serialization/__init__.py @@ -12,3 +12,17 @@ serialize, serialize_leaf, ) + +__all__ = [ + "DeserializeFunction", + "SerializeFunction", + "SerializedData", + "SerializedDataFileStorage", + "SerializedLeafData", + "deserialize", + "deserialize_leaf", + "load_class", + "register_serialization", + "serialize", + "serialize_leaf", +] diff --git a/web_poet/testing/__init__.py b/web_poet/testing/__init__.py index 99e12911..3d31df8c 100644 --- a/web_poet/testing/__init__.py +++ b/web_poet/testing/__init__.py @@ -1 +1,3 @@ from .fixture import Fixture + +__all__ = ["Fixture"] From e9495414ae259caf83f834252889e3b6a7f31a93 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 3 Oct 2025 20:40:05 +0500 Subject: [PATCH 2/3] Disable implicit reexport for andi. --- pyproject.toml | 4 ---- tox.ini | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4c75e038..a4c1d5ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,10 +26,6 @@ exclude_also = [ ignore_missing_imports = false implicit_reexport = false -[[tool.mypy.overrides]] -module = "andi" -implicit_reexport = true # to be fixed - [[tool.mypy.overrides]] module = "zyte_common_items" implicit_reexport = true # to be fixed diff --git a/tox.ini b/tox.ini index 6c0e93c7..0be18c0a 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,7 @@ commands = deps = mypy==1.16.1 aiohttp==3.12.13 + andi==0.8.0 pytest==8.4.1 types-requests==2.32.4.20250611 types-python-dateutil==2.9.0.20250516 From b2f771045c44154ab400a69e1242911ea6efd5bb Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 24 Oct 2025 13:20:48 +0500 Subject: [PATCH 3/3] Disable implicit reexport for zyte-common-items. --- pyproject.toml | 4 ---- tox.ini | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a4c1d5ab..2a437d95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,10 +26,6 @@ exclude_also = [ ignore_missing_imports = false implicit_reexport = false -[[tool.mypy.overrides]] -module = "zyte_common_items" -implicit_reexport = true # to be fixed - [[tool.mypy.overrides]] module = "tests.*" allow_untyped_defs = true diff --git a/tox.ini b/tox.ini index 0be18c0a..0e02b449 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ deps = types-requests==2.32.4.20250611 types-python-dateutil==2.9.0.20250516 url-matcher==0.6.0 - zyte-common-items==0.27.0 + zyte-common-items==0.29.0 commands = mypy web_poet tests