From 10a7a2f5a61629b04907dbf169c473406098be94 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 29 Jul 2025 14:16:22 +0200 Subject: [PATCH] fix!: Remove unused "stats" field from RequestQueueMetadata --- docs/upgrading/upgrading_to_v1.md | 1 + .../storage_clients/_file_system/_request_queue_client.py | 1 - src/crawlee/storage_clients/_memory/_request_queue_client.py | 1 - src/crawlee/storage_clients/models.py | 3 --- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/upgrading/upgrading_to_v1.md b/docs/upgrading/upgrading_to_v1.md index 85394ac995..7200c8fd5b 100644 --- a/docs/upgrading/upgrading_to_v1.md +++ b/docs/upgrading/upgrading_to_v1.md @@ -174,6 +174,7 @@ destination you choose. - The `set_metadata` method has been removed. - `resource_directory` from `RequestQueueMetadata` removed – use `path_to_...` property. - `RequestQueueHead` model replaced with `RequestQueueHeadWithLocks`. +- The `stats` field was removed from `RequestQueueMetadata` as it wasn't used for anything. ## New default HTTP client diff --git a/src/crawlee/storage_clients/_file_system/_request_queue_client.py b/src/crawlee/storage_clients/_file_system/_request_queue_client.py index e574855e99..f5e0165d68 100644 --- a/src/crawlee/storage_clients/_file_system/_request_queue_client.py +++ b/src/crawlee/storage_clients/_file_system/_request_queue_client.py @@ -246,7 +246,6 @@ async def open( had_multiple_clients=False, handled_request_count=0, pending_request_count=0, - stats={}, total_request_count=0, ) client = cls( diff --git a/src/crawlee/storage_clients/_memory/_request_queue_client.py b/src/crawlee/storage_clients/_memory/_request_queue_client.py index ad166e20bd..3041edd9e2 100644 --- a/src/crawlee/storage_clients/_memory/_request_queue_client.py +++ b/src/crawlee/storage_clients/_memory/_request_queue_client.py @@ -93,7 +93,6 @@ async def open( had_multiple_clients=False, handled_request_count=0, pending_request_count=0, - stats={}, total_request_count=0, ) diff --git a/src/crawlee/storage_clients/models.py b/src/crawlee/storage_clients/models.py index 9170dc5449..a5a431fd94 100644 --- a/src/crawlee/storage_clients/models.py +++ b/src/crawlee/storage_clients/models.py @@ -70,9 +70,6 @@ class RequestQueueMetadata(StorageMetadata): pending_request_count: Annotated[int, Field(alias='pendingRequestCount')] """The number of requests that are still pending in the queue.""" - stats: Annotated[dict, Field(alias='stats')] - """Statistics about the request queue, TODO?""" - total_request_count: Annotated[int, Field(alias='totalRequestCount')] """The total number of requests that have been added to the queue."""