dapr-ext-fastapi-dev 1.14.0rc1.dev17__py3-none-any.whl → 1.14.0rc1.dev19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dapr-ext-fastapi-dev might be problematic. Click here for more details.

dapr/ext/fastapi/actor.py CHANGED
@@ -15,14 +15,13 @@ limitations under the License.
15
15
 
16
16
  from typing import Any, Optional, Type, List
17
17
 
18
+ from dapr.actor import Actor, ActorRuntime
19
+ from dapr.clients.exceptions import ERROR_CODE_UNKNOWN, DaprInternalError
20
+ from dapr.serializers import DefaultJSONSerializer
18
21
  from fastapi import FastAPI, APIRouter, Request, Response, status # type: ignore
19
22
  from fastapi.logger import logger
20
23
  from fastapi.responses import JSONResponse
21
24
 
22
- from dapr.actor import Actor, ActorRuntime
23
- from dapr.clients.exceptions import DaprInternalError, ERROR_CODE_UNKNOWN
24
- from dapr.serializers import DefaultJSONSerializer
25
-
26
25
  DEFAULT_CONTENT_TYPE = 'application/json; utf-8'
27
26
  DAPR_REENTRANCY_ID_HEADER = 'Dapr-Reentrancy-Id'
28
27
 
@@ -72,7 +71,7 @@ class DaprActor(object):
72
71
  try:
73
72
  await ActorRuntime.deactivate(actor_type_name, actor_id)
74
73
  except DaprInternalError as ex:
75
- return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_dict())
74
+ return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
76
75
  except Exception as ex:
77
76
  return _wrap_response(
78
77
  status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
@@ -96,7 +95,7 @@ class DaprActor(object):
96
95
  actor_type_name, actor_id, method_name, req_body, reentrancy_id
97
96
  )
98
97
  except DaprInternalError as ex:
99
- return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_dict())
98
+ return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
100
99
  except Exception as ex:
101
100
  return _wrap_response(
102
101
  status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
@@ -117,7 +116,7 @@ class DaprActor(object):
117
116
  req_body = await request.body()
118
117
  await ActorRuntime.fire_timer(actor_type_name, actor_id, timer_name, req_body)
119
118
  except DaprInternalError as ex:
120
- return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_dict())
119
+ return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
121
120
  except Exception as ex:
122
121
  return _wrap_response(
123
122
  status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
@@ -139,7 +138,7 @@ class DaprActor(object):
139
138
  req_body = await request.body()
140
139
  await ActorRuntime.fire_reminder(actor_type_name, actor_id, reminder_name, req_body)
141
140
  except DaprInternalError as ex:
142
- return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_dict())
141
+ return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
143
142
  except Exception as ex:
144
143
  return _wrap_response(
145
144
  status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dapr-ext-fastapi-dev
3
- Version: 1.14.0rc1.dev17
3
+ Version: 1.14.0rc1.dev19
4
4
  Summary: The developmental release for Dapr FastAPI extension.
5
5
  Home-page: https://dapr.io/
6
6
  Author: Dapr Authors
@@ -0,0 +1,9 @@
1
+ dapr/ext/fastapi/__init__.py,sha256=fs-DJZe2wY4zn7jC9KfpSLP0RJKrAekfbfyxW-dsZO8,679
2
+ dapr/ext/fastapi/actor.py,sha256=Jvf0CY5-i5m1PsJksR_KwcchO0evBjRA1ARHeX7gxtM,6597
3
+ dapr/ext/fastapi/app.py,sha256=npOC9jEaycXCADiF6w-ENtLJrluPOuG6WRmKr1ldIm8,3747
4
+ dapr/ext/fastapi/version.py,sha256=-RfJ_K9ZWVu8wf99edkDO56-_mci9MgDvADnB7FTX7o,618
5
+ dapr_ext_fastapi_dev-1.14.0rc1.dev19.dist-info/LICENSE,sha256=D-QjNdE9_ypCaJn2kkQy-AYHZZ_x5aozSpR7Q1CpbRs,11377
6
+ dapr_ext_fastapi_dev-1.14.0rc1.dev19.dist-info/METADATA,sha256=ydj9L8-tobNDu1U8js_ukTTShEpDago6h-qnbhQ5K1E,1086
7
+ dapr_ext_fastapi_dev-1.14.0rc1.dev19.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
8
+ dapr_ext_fastapi_dev-1.14.0rc1.dev19.dist-info/top_level.txt,sha256=iLDu9C_1nUTIsa3H4jMbuHuF-zs0opkitR7p7PCPYz0,5
9
+ dapr_ext_fastapi_dev-1.14.0rc1.dev19.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- dapr/ext/fastapi/__init__.py,sha256=fs-DJZe2wY4zn7jC9KfpSLP0RJKrAekfbfyxW-dsZO8,679
2
- dapr/ext/fastapi/actor.py,sha256=Tu7-k3ulJfbsp5UrGAIA8LOp0DbGtwfLxgUnxRlZnlc,6558
3
- dapr/ext/fastapi/app.py,sha256=npOC9jEaycXCADiF6w-ENtLJrluPOuG6WRmKr1ldIm8,3747
4
- dapr/ext/fastapi/version.py,sha256=-RfJ_K9ZWVu8wf99edkDO56-_mci9MgDvADnB7FTX7o,618
5
- dapr_ext_fastapi_dev-1.14.0rc1.dev17.dist-info/LICENSE,sha256=D-QjNdE9_ypCaJn2kkQy-AYHZZ_x5aozSpR7Q1CpbRs,11377
6
- dapr_ext_fastapi_dev-1.14.0rc1.dev17.dist-info/METADATA,sha256=hz9vainRV6vUfv0NRIjtolLKjkwPymyhNoMXGtoyqA0,1086
7
- dapr_ext_fastapi_dev-1.14.0rc1.dev17.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
8
- dapr_ext_fastapi_dev-1.14.0rc1.dev17.dist-info/top_level.txt,sha256=iLDu9C_1nUTIsa3H4jMbuHuF-zs0opkitR7p7PCPYz0,5
9
- dapr_ext_fastapi_dev-1.14.0rc1.dev17.dist-info/RECORD,,