From 405d6984e52e708687e5b2599f4f4a9a1b6dfa08 Mon Sep 17 00:00:00 2001 From: orbimatrix Date: Tue, 2 Dec 2025 22:50:19 +0500 Subject: [PATCH 1/3] Docs: Update migration guide for v7, remove legacy websocket provider #3778 --- docs/migration.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/migration.rst b/docs/migration.rst index b9d5a68947..624c147ebd 100644 --- a/docs/migration.rst +++ b/docs/migration.rst @@ -251,10 +251,16 @@ errors: End of Support and Feature Removals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Python 3.8 and 3.9 Support Dropped +`````````````````````````````````` + +Support for Python 3.8 and 3.9 has been dropped. The library now requires Python 3.10 or greater and we want to focus our efforts on supporting +the latest versions of Python. + Python 3.7 Support Dropped -`````````````````````````` +``````````````````````````` Python 3.7 support has been dropped in favor of Python 3.8+. Python 3.7 is no longer supported by the Python core team, and we want to focus our efforts on supporting From 437caa420e46cc0bb95028f9dd1002f37037fe14 Mon Sep 17 00:00:00 2001 From: orbimatrix Date: Tue, 2 Dec 2025 22:59:07 +0500 Subject: [PATCH 2/3] feat: add v6 to v7 migration guide documentation. --- docs/migration.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/migration.rst b/docs/migration.rst index 624c147ebd..0084bfef51 100644 --- a/docs/migration.rst +++ b/docs/migration.rst @@ -22,10 +22,11 @@ WebSocketProvider ````````````````` ``WebsocketProviderV2``, introduced in web3.py ``v6``, has taken priority over the -legacy ``WebsocketProvider``. The ``LegacyWebSocketProvider`` has been deprecated in -``v7`` and is slated for removal in the next major version of the library. In summary: +legacy ``WebsocketProvider``. The LegacyWebSocketProvider (formerly WebsocketProvider) has been removed in v7. -- ``WebsocketProvider`` -> ``LegacyWebSocketProvider`` (and deprecated) +In summary: + +- ``WebsocketProvider`` -> ``LegacyWebSocketProvider`` (and Removed) - ``WebsocketProviderV2`` -> ``WebSocketProvider`` If migrating from ``WebSocketProviderV2`` to ``WebSocketProvider``, you can expect the From 8c1677596302bf1af8d5a4924f1cf794cba23c19 Mon Sep 17 00:00:00 2001 From: orbimatrix Date: Thu, 4 Dec 2025 17:01:39 +0500 Subject: [PATCH 3/3] Add migration guide for v7 to v8 and v6 to v7, detailing breaking changes in providers, middleware, and exception handling in a seprate new section --- docs/migration.rst | 68 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/docs/migration.rst b/docs/migration.rst index 0084bfef51..d9335f3fb5 100644 --- a/docs/migration.rst +++ b/docs/migration.rst @@ -1,6 +1,65 @@ Migration Guide =============== +.. _migrating_v7_to_v8: + +Migrating from v7 to v8 +----------------------- + +web3.py follows `Semantic Versioning `_, which means that +version 8 introduced backwards-incompatible changes. If you're upgrading from +web3.py ``v7``, you can expect to need to make some changes. Refer to this +guide for a summary of breaking changes when updating from ``v7`` to ``v8``. + +End of Support and Feature Removals + +Python 3.8 and 3.9 Support Dropped +`````````````````````````````````` + +Support for Python 3.8 and 3.9 has been dropped. The library now requires Python 3.10 or greater and we want to focus our efforts on supporting +the latest versions of Python. + +Provider Updates + +WebSocketProvider +````````````````` + +The ``LegacyWebSocketProvider`` (formerly ``WebsocketProvider``) has been removed in ``v8``. + +In summary: + +- ``WebsocketProvider`` -> Removed (Migrate to ``WebSocketProvider``) +- ``WebsocketProviderV2`` -> ``WebSocketProvider`` + +If migrating from ``WebSocketProviderV2`` to ``WebSocketProvider``, you can expect the +following changes: + +- Instantiation no longer requires the ``persistent_websocket`` method: + + .. code-block:: python + + # WebsocketsProviderV2: + AsyncWeb3.persistent_websocket(WebsocketProviderV2('...')) + + # WebSocketProvider: + AsyncWeb3(WebSocketProvider('...')) + +- Handling incoming subscription messages now occurs under a more flexible namespace: + ``socket``. The ``AsyncIPCProvider`` uses the same API to listen for messages via + an IPC socket. + + .. code-block:: python + + # WebsocketsProviderV2: + async for message in w3.ws.process_subscriptions(): + ... + + # WebSocketProvider: + async for message in w3.socket.process_subscriptions(): + ... + + + .. _migrating_v6_to_v7: Migrating from v6 to v7 @@ -26,7 +85,7 @@ legacy ``WebsocketProvider``. The LegacyWebSocketProvider (formerly WebsocketPro In summary: -- ``WebsocketProvider`` -> ``LegacyWebSocketProvider`` (and Removed) +- ``WebsocketProvider`` -> ``LegacyWebSocketProvider`` (and deprecated) - ``WebsocketProviderV2`` -> ``WebSocketProvider`` If migrating from ``WebSocketProviderV2`` to ``WebSocketProvider``, you can expect the @@ -253,13 +312,6 @@ errors: End of Support and Feature Removals -Python 3.8 and 3.9 Support Dropped -`````````````````````````````````` - -Support for Python 3.8 and 3.9 has been dropped. The library now requires Python 3.10 or greater and we want to focus our efforts on supporting -the latest versions of Python. - - Python 3.7 Support Dropped ```````````````````````````