jararaca 0.3.12a17__py3-none-any.whl → 0.3.12a18__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 jararaca might be problematic. Click here for more details.
- jararaca/persistence/interceptors/aiosqa_interceptor.py +8 -3
- jararaca/tools/typescript/interface_parser.py +69 -36
- {jararaca-0.3.12a17.dist-info → jararaca-0.3.12a18.dist-info}/METADATA +1 -1
- {jararaca-0.3.12a17.dist-info → jararaca-0.3.12a18.dist-info}/RECORD +8 -8
- pyproject.toml +1 -1
- {jararaca-0.3.12a17.dist-info → jararaca-0.3.12a18.dist-info}/LICENSE +0 -0
- {jararaca-0.3.12a17.dist-info → jararaca-0.3.12a18.dist-info}/WHEEL +0 -0
- {jararaca-0.3.12a17.dist-info → jararaca-0.3.12a18.dist-info}/entry_points.txt +0 -0
|
@@ -114,9 +114,14 @@ async def providing_new_session(
|
|
|
114
114
|
current_session.bind,
|
|
115
115
|
) as new_session, new_session.begin() as new_tx:
|
|
116
116
|
with providing_session(new_session, new_tx, connection_name):
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
try:
|
|
118
|
+
yield new_session
|
|
119
|
+
if new_tx.is_active:
|
|
120
|
+
await new_tx.commit()
|
|
121
|
+
except Exception:
|
|
122
|
+
if new_tx.is_active:
|
|
123
|
+
await new_tx.rollback()
|
|
124
|
+
raise
|
|
120
125
|
|
|
121
126
|
|
|
122
127
|
def use_session(connection_name: str | None = None) -> AsyncSession:
|
|
@@ -1067,26 +1067,37 @@ def extract_parameters(
|
|
|
1067
1067
|
)
|
|
1068
1068
|
else:
|
|
1069
1069
|
mapped_types.add(annotated_type)
|
|
1070
|
-
#
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1070
|
+
# Special handling for UploadFile - should go to body, not query
|
|
1071
|
+
if annotated_type == UploadFile:
|
|
1072
|
+
parameters_list.append(
|
|
1073
|
+
HttpParemeterSpec(
|
|
1074
|
+
type_="body",
|
|
1075
|
+
name=parameter_name,
|
|
1076
|
+
required=True,
|
|
1077
|
+
argument_type_str=get_field_type_for_ts(annotated_type),
|
|
1078
|
+
)
|
|
1077
1079
|
)
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1080
|
+
else:
|
|
1081
|
+
# For default parameters (treated as query), use Input suffix if it's a split model
|
|
1082
|
+
context_suffix = (
|
|
1083
|
+
"Input"
|
|
1084
|
+
if (
|
|
1085
|
+
inspect.isclass(annotated_type)
|
|
1086
|
+
and hasattr(annotated_type, "__dict__")
|
|
1087
|
+
and SplitInputOutput.is_split_model(annotated_type)
|
|
1088
|
+
)
|
|
1089
|
+
else ""
|
|
1090
|
+
)
|
|
1091
|
+
parameters_list.append(
|
|
1092
|
+
HttpParemeterSpec(
|
|
1093
|
+
type_="query",
|
|
1094
|
+
name=parameter_name,
|
|
1095
|
+
required=True,
|
|
1096
|
+
argument_type_str=get_field_type_for_ts(
|
|
1097
|
+
annotated_type, context_suffix
|
|
1098
|
+
),
|
|
1099
|
+
)
|
|
1088
1100
|
)
|
|
1089
|
-
)
|
|
1090
1101
|
|
|
1091
1102
|
elif inspect.isclass(parameter_type) and issubclass(
|
|
1092
1103
|
parameter_type, BaseModel
|
|
@@ -1106,6 +1117,17 @@ def extract_parameters(
|
|
|
1106
1117
|
),
|
|
1107
1118
|
)
|
|
1108
1119
|
)
|
|
1120
|
+
elif parameter_type == UploadFile:
|
|
1121
|
+
# UploadFile should always go to body, not query parameters
|
|
1122
|
+
mapped_types.add(parameter_type)
|
|
1123
|
+
parameters_list.append(
|
|
1124
|
+
HttpParemeterSpec(
|
|
1125
|
+
type_="body",
|
|
1126
|
+
name=parameter_name,
|
|
1127
|
+
required=True,
|
|
1128
|
+
argument_type_str=get_field_type_for_ts(parameter_type),
|
|
1129
|
+
)
|
|
1130
|
+
)
|
|
1109
1131
|
elif (
|
|
1110
1132
|
# Match both simple parameters {param} and parameters with converters {param:converter}
|
|
1111
1133
|
re.search(f"{{{parameter_name}(:.*?)?}}", controller.path) is not None
|
|
@@ -1134,26 +1156,37 @@ def extract_parameters(
|
|
|
1134
1156
|
)
|
|
1135
1157
|
else:
|
|
1136
1158
|
mapped_types.add(parameter_type)
|
|
1137
|
-
#
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1159
|
+
# Special handling for UploadFile - should go to body, not query
|
|
1160
|
+
if parameter_type == UploadFile:
|
|
1161
|
+
parameters_list.append(
|
|
1162
|
+
HttpParemeterSpec(
|
|
1163
|
+
type_="body",
|
|
1164
|
+
name=parameter_name,
|
|
1165
|
+
required=True,
|
|
1166
|
+
argument_type_str=get_field_type_for_ts(parameter_type),
|
|
1167
|
+
)
|
|
1144
1168
|
)
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1169
|
+
else:
|
|
1170
|
+
# For default parameters (treated as query), use Input suffix if it's a split model
|
|
1171
|
+
context_suffix = (
|
|
1172
|
+
"Input"
|
|
1173
|
+
if (
|
|
1174
|
+
inspect.isclass(parameter_type)
|
|
1175
|
+
and hasattr(parameter_type, "__dict__")
|
|
1176
|
+
and SplitInputOutput.is_split_model(parameter_type)
|
|
1177
|
+
)
|
|
1178
|
+
else ""
|
|
1179
|
+
)
|
|
1180
|
+
parameters_list.append(
|
|
1181
|
+
HttpParemeterSpec(
|
|
1182
|
+
type_="query",
|
|
1183
|
+
name=parameter_name,
|
|
1184
|
+
required=True,
|
|
1185
|
+
argument_type_str=get_field_type_for_ts(
|
|
1186
|
+
parameter_type, context_suffix
|
|
1187
|
+
),
|
|
1188
|
+
)
|
|
1155
1189
|
)
|
|
1156
|
-
)
|
|
1157
1190
|
|
|
1158
1191
|
if inspect.isclass(parameter_type) and not is_primitive(parameter_type):
|
|
1159
1192
|
signature = inspect.signature(parameter_type)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
2
2
|
README.md,sha256=2qMM__t_MoLKZr4IY9tXjo-Jn6LKjuHMb1qbyXpgL08,3401
|
|
3
|
-
pyproject.toml,sha256=
|
|
3
|
+
pyproject.toml,sha256=aj3QfPDz-158WddZDVdzbZgEm4SRalAyvU5X0-FpkTU,2041
|
|
4
4
|
jararaca/__init__.py,sha256=vK3zyIVLckwZgj1FPX6jzSbzaSWmSy3wQ2KMwmpJnmg,22046
|
|
5
5
|
jararaca/__main__.py,sha256=-O3vsB5lHdqNFjUtoELDF81IYFtR-DSiiFMzRaiSsv4,67
|
|
6
6
|
jararaca/broker_backend/__init__.py,sha256=GzEIuHR1xzgCJD4FE3harNjoaYzxHMHoEL0_clUaC-k,3528
|
|
@@ -32,7 +32,7 @@ jararaca/observability/providers/otel.py,sha256=8N1F32W43t7c8cwmtTh6Yz9b7HyfGFSR
|
|
|
32
32
|
jararaca/persistence/base.py,sha256=xnGUbsLNz3gO-9iJt-Sn5NY13Yc9-misP8wLwQuGGoM,1024
|
|
33
33
|
jararaca/persistence/exports.py,sha256=Ghx4yoFaB4QVTb9WxrFYgmcSATXMNvrOvT8ybPNKXCA,62
|
|
34
34
|
jararaca/persistence/interceptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
jararaca/persistence/interceptors/aiosqa_interceptor.py,sha256
|
|
35
|
+
jararaca/persistence/interceptors/aiosqa_interceptor.py,sha256=-YDKDicaocEz71fbt1X1S33KJBwqMYZG-4igNylbh9A,6922
|
|
36
36
|
jararaca/persistence/interceptors/constants.py,sha256=o8g5RxDX9dSSnM9eXYlTJalGPfWxYm6-CAA8-FooUzE,36
|
|
37
37
|
jararaca/persistence/interceptors/decorators.py,sha256=p37r9ux5w_bvn8xPNPhScl3fjCc2enqTR0cJYLxMsrI,1627
|
|
38
38
|
jararaca/persistence/session.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -70,12 +70,12 @@ jararaca/tools/app_config/decorators.py,sha256=-ckkMZ1dswOmECdo1rFrZ15UAku--txaN
|
|
|
70
70
|
jararaca/tools/app_config/interceptor.py,sha256=HV8h4AxqUc_ACs5do4BSVlyxlRXzx7HqJtoVO9tfRnQ,2611
|
|
71
71
|
jararaca/tools/typescript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
72
|
jararaca/tools/typescript/decorators.py,sha256=y1zBq8mBZ8CBXlZ0nKy2RyIgCvP9kp4elACbaC6dptQ,2946
|
|
73
|
-
jararaca/tools/typescript/interface_parser.py,sha256=
|
|
73
|
+
jararaca/tools/typescript/interface_parser.py,sha256=KSJgJqhZS243L5d005Ph_f-RiZP37rgeF0Ql6iN856w,49016
|
|
74
74
|
jararaca/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
jararaca/utils/rabbitmq_utils.py,sha256=ytdAFUyv-OBkaVnxezuJaJoLrmN7giZgtKeet_IsMBs,10918
|
|
76
76
|
jararaca/utils/retry.py,sha256=DzPX_fXUvTqej6BQ8Mt2dvLo9nNlTBm7Kx2pFZ26P2Q,4668
|
|
77
|
-
jararaca-0.3.
|
|
78
|
-
jararaca-0.3.
|
|
79
|
-
jararaca-0.3.
|
|
80
|
-
jararaca-0.3.
|
|
81
|
-
jararaca-0.3.
|
|
77
|
+
jararaca-0.3.12a18.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
78
|
+
jararaca-0.3.12a18.dist-info/METADATA,sha256=uDHK7-0B144S_kuJ57BELyRoJDANDRe-3Tib4N4wxXY,4996
|
|
79
|
+
jararaca-0.3.12a18.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
80
|
+
jararaca-0.3.12a18.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
|
|
81
|
+
jararaca-0.3.12a18.dist-info/RECORD,,
|
pyproject.toml
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|