From ef44cbca7c9944eeb5ba7efa780351dfa21f2e18 Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 22 Jan 2025 17:35:43 -0500 Subject: [PATCH] Remove pending from Object.resolve deprecation warning (#2792) --- modal/_object.py | 1 - test/object_test.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modal/_object.py b/modal/_object.py index 02a487e76..eeca95300 100644 --- a/modal/_object.py +++ b/modal/_object.py @@ -246,7 +246,6 @@ async def resolve(self, client: Optional[_Client] = None): "\n\nNote that it is rarely necessary to explicitly hydrate objects, as most methods" " will lazily hydrate when needed.", show_source=False, # synchronicity interferes with attributing source correctly - pending=True, ) await self.hydrate(client) diff --git a/test/object_test.py b/test/object_test.py index 9dd4bf97e..4bab20ac0 100644 --- a/test/object_test.py +++ b/test/object_test.py @@ -4,7 +4,7 @@ from modal import Secret from modal._object import _Object from modal.dict import Dict, _Dict -from modal.exception import InvalidError, PendingDeprecationError +from modal.exception import DeprecationError, InvalidError from modal.queue import _Queue @@ -30,7 +30,7 @@ def test_on_demand_hydration(client): def test_resolve_deprecation(client): obj = Dict.from_name("test-dict", create_if_missing=True) warning = r"Please use `Dict.hydrate\(\)` or `await Dict.hydrate.aio\(\)`" - with pytest.warns(PendingDeprecationError, match=warning): + with pytest.warns(DeprecationError, match=warning): obj.resolve(client) assert obj.object_id is not None