File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11"""Manage files created by Actions
22
3+ **This module is deprecated in favour of `labthings_fastapi.outputs.blob`**
4+
35Simple actions return everything you need to know about them in their return value,
46which can be serialised to JSON. More complicated actions might need to return
57more complicated responses, for example files.
1214from __future__ import annotations
1315from tempfile import TemporaryDirectory
1416from typing import Annotated , Sequence , Optional
17+ from warnings import warn
1518
1619from fastapi import Depends , Request
1720
@@ -27,6 +30,10 @@ class FileManager:
2730 __globals__ = globals () # "bake in" globals so dependency injection works
2831
2932 def __init__ (self , invocation_id : InvocationID , request : Request ):
33+ warn (
34+ "FileManager is deprecated in favour of labthings_fastapi.outputs.blob" ,
35+ DeprecationWarning ,
36+ )
3037 self .invocation_id = invocation_id
3138 self ._links : set [tuple [str , str ]] = set ()
3239 self ._dir = TemporaryDirectory (prefix = f"labthings-{ self .invocation_id } -" )
You can’t perform that action at this time.
0 commit comments