Skip to content

Commit

Permalink
Remove pending from Object.resolve deprecation warning (#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom authored Jan 22, 2025
1 parent 625c93b commit ef44cbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion modal/_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions test/object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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

Expand Down

0 comments on commit ef44cbc

Please sign in to comment.