TypeDAL 5.1.4__tar.gz → 5.1.5__tar.gz
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.
- {typedal-5.1.4 → typedal-5.1.5}/PKG-INFO +2 -2
- {typedal-5.1.4 → typedal-5.1.5}/pyproject.toml +2 -2
- {typedal-5.1.4 → typedal-5.1.5}/pyproject.toml.orig +2 -2
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/core.py +9 -6
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/rows.py +14 -4
- {typedal-5.1.4 → typedal-5.1.5}/README.md +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/__about__.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/__init__.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/asynchronous.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/caching.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/cli.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/config.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/constants.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/define.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/enum_helpers.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/fields.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/for_py4web.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/for_web2py.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/helpers.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/mixins.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/py.typed +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/query_builder.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/relationships.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/serializers/as_json.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/serializers/typescript.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/tables.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/types.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/warnings.py +0 -0
- {typedal-5.1.4 → typedal-5.1.5}/src/typedal/web2py_py4web_shared.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: TypeDAL
|
|
3
|
-
Version: 5.1.
|
|
3
|
+
Version: 5.1.5
|
|
4
4
|
Summary: Typing support for PyDAL
|
|
5
5
|
Keywords:
|
|
6
6
|
Author: Robin van der Noord
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
13
13
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
14
14
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
15
15
|
Requires-Dist: pydal>=20251012.3
|
|
16
|
-
Requires-Dist: pydal-stubs>=0.
|
|
16
|
+
Requires-Dist: pydal-stubs>=0.2.0
|
|
17
17
|
Requires-Dist: dill<1
|
|
18
18
|
Requires-Dist: configuraptor>=2.1.0,<3
|
|
19
19
|
Requires-Dist: configurable-json<2
|
|
@@ -6,7 +6,7 @@ build-backend = "uv_build"
|
|
|
6
6
|
name = "TypeDAL"
|
|
7
7
|
description = "Typing support for PyDAL"
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
version = "5.1.
|
|
9
|
+
version = "5.1.5"
|
|
10
10
|
requires-python = ">=3.12"
|
|
11
11
|
license-expression = "MIT"
|
|
12
12
|
keywords = []
|
|
@@ -21,7 +21,7 @@ classifiers = [
|
|
|
21
21
|
]
|
|
22
22
|
dependencies = [
|
|
23
23
|
"pydal >= 20251012.3",
|
|
24
|
-
"pydal-stubs >= 0.
|
|
24
|
+
"pydal-stubs >= 0.2.0",
|
|
25
25
|
"dill < 1",
|
|
26
26
|
"configuraptor >= 2.1.0, < 3",
|
|
27
27
|
"Configurable-JSON < 2",
|
|
@@ -6,7 +6,7 @@ build-backend = "uv_build"
|
|
|
6
6
|
name = "TypeDAL"
|
|
7
7
|
description = 'Typing support for PyDAL'
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
version = "5.1.
|
|
9
|
+
version = "5.1.5"
|
|
10
10
|
requires-python = ">=3.12"
|
|
11
11
|
license-expression = "MIT"
|
|
12
12
|
keywords = []
|
|
@@ -24,7 +24,7 @@ classifiers = [
|
|
|
24
24
|
]
|
|
25
25
|
dependencies = [
|
|
26
26
|
"pydal >= 20251012.3", # core
|
|
27
|
-
"pydal-stubs >= 0.
|
|
27
|
+
"pydal-stubs >= 0.2.0", # improved typing for pydal
|
|
28
28
|
"dill < 1", # caching
|
|
29
29
|
"configuraptor >= 2.1.0, < 3", # config
|
|
30
30
|
"Configurable-JSON < 2", # json dumping
|
|
@@ -200,8 +200,13 @@ def resolve_annotation(ftype: str, namespace: t.Mapping[str, type] | None = None
|
|
|
200
200
|
return resolve_annotation_314(ftype, namespace=namespace)
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
if t.TYPE_CHECKING:
|
|
204
|
+
# `pydal.DAL` is exported by pydal-stubs as a gradual alias, so subclassing
|
|
205
|
+
# it directly would make TypeDAL inherit from `Any` and lose the whole pydal
|
|
206
|
+
# API. `DALBase` is the nominal surface; it exists only for type checkers.
|
|
207
|
+
from pydal.base import DALBase as _TypeDALBase
|
|
208
|
+
else:
|
|
209
|
+
_TypeDALBase = pydal.DAL
|
|
205
210
|
|
|
206
211
|
|
|
207
212
|
class TypeDAL(_TypeDALBase):
|
|
@@ -224,7 +229,7 @@ class TypeDAL(_TypeDALBase):
|
|
|
224
229
|
|
|
225
230
|
# pydal runs these around every statement; drop BlockingAccessHandler to disable the guard.
|
|
226
231
|
execution_handlers: list[type[ExecutionHandler]] = [
|
|
227
|
-
*
|
|
232
|
+
*_TypeDALBase.execution_handlers,
|
|
228
233
|
BlockingAccessHandler,
|
|
229
234
|
]
|
|
230
235
|
|
|
@@ -419,9 +424,7 @@ class TypeDAL(_TypeDALBase):
|
|
|
419
424
|
hooks.clear()
|
|
420
425
|
|
|
421
426
|
if hasattr(table, "_db"):
|
|
422
|
-
|
|
423
|
-
# bindings, but the cycle has to be broken here too.
|
|
424
|
-
table._db = None # ty: ignore[invalid-assignment]
|
|
427
|
+
table._db = None
|
|
425
428
|
|
|
426
429
|
for field_name in getattr(table, "fields", ()):
|
|
427
430
|
field: Field | None = getattr(table, field_name, None)
|
|
@@ -278,8 +278,13 @@ class TypedRows(t.Collection[T_MetaInstance], Rows):
|
|
|
278
278
|
|
|
279
279
|
return {k: v.as_dict() for k, v in self.records.items()}
|
|
280
280
|
|
|
281
|
-
def as_json(
|
|
282
|
-
self,
|
|
281
|
+
def as_json(
|
|
282
|
+
self,
|
|
283
|
+
mode: str = "object", # noqa: ARG002 - Required by PyDAL's method signature.
|
|
284
|
+
default: t.Callable[[t.Any], t.Any] | None = None,
|
|
285
|
+
*,
|
|
286
|
+
indent: int | None = None,
|
|
287
|
+
**kwargs: t.Any,
|
|
283
288
|
) -> str:
|
|
284
289
|
"""
|
|
285
290
|
Turn the data into a dict and then dump to JSON.
|
|
@@ -289,12 +294,17 @@ class TypedRows(t.Collection[T_MetaInstance], Rows):
|
|
|
289
294
|
return as_json.encode(data, default=default, indent=indent, **kwargs)
|
|
290
295
|
|
|
291
296
|
def json(
|
|
292
|
-
self,
|
|
297
|
+
self,
|
|
298
|
+
mode: str = "object",
|
|
299
|
+
default: t.Callable[[t.Any], t.Any] | None = None,
|
|
300
|
+
*,
|
|
301
|
+
indent: int | None = None,
|
|
302
|
+
**kwargs: t.Any,
|
|
293
303
|
) -> str:
|
|
294
304
|
"""
|
|
295
305
|
Turn the data into a dict and then dump to JSON.
|
|
296
306
|
"""
|
|
297
|
-
return self.as_json(default=default, indent=indent, **kwargs)
|
|
307
|
+
return self.as_json(mode=mode, default=default, indent=indent, **kwargs)
|
|
298
308
|
|
|
299
309
|
def as_list(
|
|
300
310
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|