libentry 1.23__py3-none-any.whl → 1.23.1__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.
libentry/api.py CHANGED
@@ -225,7 +225,7 @@ class BaseClient:
225
225
  verify: bool,
226
226
  ) -> Union[bytes, Iterable[bytes]]:
227
227
  headers = self.headers if headers is None else {**self.headers, **headers}
228
- response = self.URLLIB3_POOL[int(verify)].http_request(
228
+ response = self.URLLIB3_POOL[int(verify)].request(
229
229
  method=method,
230
230
  url=url,
231
231
  body=body,
libentry/schema.py CHANGED
@@ -194,6 +194,11 @@ def _parse_base_model(context: ParseContext) -> Optional[str]:
194
194
  is_not_base_class = origin is not BaseModel
195
195
  if is_new_model and is_not_base_class:
196
196
  schema = Schema(name=model_name)
197
+ context.schemas[model_name] = schema
198
+ # Once the Schema object is created, it should be put into the context immediately.
199
+ # This is to prevent this object from being repeatedly parsed.
200
+ # Repeated parsing will cause dead recursion!
201
+
197
202
  fields = origin.model_fields
198
203
  assert isinstance(fields, Mapping)
199
204
  for name, field in fields.items():
@@ -216,7 +221,6 @@ def _parse_base_model(context: ParseContext) -> Optional[str]:
216
221
  if is_dataclass(md):
217
222
  schema_field.metadata.update(asdict(md))
218
223
  schema.fields.append(schema_field)
219
- context.schemas[model_name] = schema
220
224
 
221
225
  return model_name
222
226
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: libentry
3
- Version: 1.23
3
+ Version: 1.23.1
4
4
  Summary: Entries for experimental utilities.
5
5
  Home-page: https://github.com/XoriieInpottn/libentry
6
6
  Author: xi
@@ -1,12 +1,12 @@
1
1
  libentry/__init__.py,sha256=ko2YBIIx5H3dD0tedBkialzJGEDczFaP_PZmT1cIlak,148
2
- libentry/api.py,sha256=lw_XH7GMWxwX7OzN4K5SxBHobjNIT-FNiTcRK60v7Fg,24151
2
+ libentry/api.py,sha256=UkXdBv9oqQhaSESRReLWEPj8venBUoCBppIg-FAXqKA,24146
3
3
  libentry/argparse.py,sha256=NxzXV-jBN51ReZsNs5aeyOfzwYQ5A5nJ95rWoa-FYCs,10415
4
4
  libentry/dataclasses.py,sha256=AQV2PuxplJCwGZ5HKX72U-z-POUhTdy3XtpEK9KNIGQ,4541
5
5
  libentry/executor.py,sha256=cTV0WxJi0nU1TP-cOwmeodN8DD6L1691M2HIQsJtGrU,6582
6
6
  libentry/experiment.py,sha256=ejgAHDXWIe9x4haUzIFuz1WasLY0_aD1z_vyEVGjTu8,4922
7
7
  libentry/json.py,sha256=CubUUu29h7idLaC4d66vKhjBgVHKN1rZOv-Tw2qM17k,1916
8
8
  libentry/logging.py,sha256=IiYoCUzm8XTK1fduA-NA0FI2Qz_m81NEPV3d3tEfgdI,1349
9
- libentry/schema.py,sha256=i-TswY-R7Lw-WY1pFFYBMoEUCPN_tpUMpezlS7nQgIw,10107
9
+ libentry/schema.py,sha256=jf_rNe-1VRd4TxcZH-M9TmMJYZTHgfqWggpUCq8bNUU,10337
10
10
  libentry/test_api.py,sha256=Xw7B7sH6g1iCTV5sFzyBF3JAJzeOr9xg0AyezTNsnIk,4452
11
11
  libentry/utils.py,sha256=O7P6GadtUIjq0N2IZH7PhHZDUM3NebzcqyDqytet7CM,683
12
12
  libentry/mcp/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
@@ -21,10 +21,10 @@ libentry/service/list.py,sha256=ElHWhTgShGOhaxMUEwVbMXos0NQKjHsODboiQ-3AMwE,1397
21
21
  libentry/service/running.py,sha256=FrPJoJX6wYxcHIysoatAxhW3LajCCm0Gx6l7__6sULQ,5105
22
22
  libentry/service/start.py,sha256=mZT7b9rVULvzy9GTZwxWnciCHgv9dbGN2JbxM60OMn4,1270
23
23
  libentry/service/stop.py,sha256=wOpwZgrEJ7QirntfvibGq-XsTC6b3ELhzRW2zezh-0s,1187
24
- libentry-1.23.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
- libentry-1.23.dist-info/METADATA,sha256=_2SdH3WYDWIH-bs_FzKN3NHzViQKtYFDf7BKVs19WcM,1133
26
- libentry-1.23.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
27
- libentry-1.23.dist-info/entry_points.txt,sha256=1v_nLVDsjvVJp9SWhl4ef2zZrsLTBtFWgrYFgqvQBgc,61
28
- libentry-1.23.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
29
- libentry-1.23.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
30
- libentry-1.23.dist-info/RECORD,,
24
+ libentry-1.23.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
+ libentry-1.23.1.dist-info/METADATA,sha256=HUq8bgDgb7i2Dm9zNcXAzYE-0cpzwYbDCNUnkHEHsks,1135
26
+ libentry-1.23.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
27
+ libentry-1.23.1.dist-info/entry_points.txt,sha256=1v_nLVDsjvVJp9SWhl4ef2zZrsLTBtFWgrYFgqvQBgc,61
28
+ libentry-1.23.1.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
29
+ libentry-1.23.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
30
+ libentry-1.23.1.dist-info/RECORD,,