TypeDAL 5.0.2__tar.gz → 5.0.3__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.
Files changed (28) hide show
  1. {typedal-5.0.2 → typedal-5.0.3}/PKG-INFO +1 -1
  2. {typedal-5.0.2 → typedal-5.0.3}/pyproject.toml +1 -1
  3. {typedal-5.0.2 → typedal-5.0.3}/pyproject.toml.orig +1 -1
  4. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/cli.py +1 -1
  5. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/fields.py +1 -1
  6. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/tables.py +1 -1
  7. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/types.py +8 -5
  8. {typedal-5.0.2 → typedal-5.0.3}/README.md +0 -0
  9. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/__about__.py +0 -0
  10. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/__init__.py +0 -0
  11. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/asynchronous.py +0 -0
  12. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/caching.py +0 -0
  13. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/config.py +0 -0
  14. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/constants.py +0 -0
  15. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/core.py +0 -0
  16. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/define.py +0 -0
  17. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/enum_helpers.py +0 -0
  18. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/for_py4web.py +0 -0
  19. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/for_web2py.py +0 -0
  20. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/helpers.py +0 -0
  21. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/mixins.py +0 -0
  22. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/py.typed +0 -0
  23. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/query_builder.py +0 -0
  24. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/relationships.py +0 -0
  25. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/rows.py +0 -0
  26. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/serializers/as_json.py +0 -0
  27. {typedal-5.0.2 → typedal-5.0.3}/src/typedal/serializers/typescript.py +0 -0
  28. {typedal-5.0.2 → typedal-5.0.3}/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.0.2
3
+ Version: 5.0.3
4
4
  Summary: Typing support for PyDAL
5
5
  Keywords:
6
6
  Author: Robin van der Noord
@@ -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.0.2"
9
+ version = "5.0.3"
10
10
  requires-python = ">=3.12"
11
11
  license-expression = "MIT"
12
12
  keywords = []
@@ -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.0.2"
9
+ version = "5.0.3"
10
10
  requires-python = ">=3.12"
11
11
  license-expression = "MIT"
12
12
  keywords = []
@@ -226,7 +226,7 @@ def setup(
226
226
  data.pop("connection", None)
227
227
 
228
228
  # ignore any None:
229
- old_contents["tool"]["typedal"] = {k: v for k, v in data.items() if v is not None} # type: ignore
229
+ old_contents["tool"]["typedal"] = {k: v for k, v in data.items() if v is not None}
230
230
 
231
231
  with toml_path.open("w") as f:
232
232
  tomlkit.dump(old_contents, f)
@@ -198,7 +198,7 @@ class TypedField[T_Value](Expression): # pragma: no cover
198
198
  self._field = t.cast(Field, field)
199
199
 
200
200
  def unbind(self) -> None:
201
- """Remove references to the pydal objects created during ``bind``."""
201
+ """Remove references to the pydal objects created during `bind`."""
202
202
  if getattr(self, "requires", None):
203
203
  if isinstance(self.requires, list):
204
204
  self.requires.clear()
@@ -126,7 +126,7 @@ class TableMeta(type):
126
126
  self._permissions = merge_permissions(permissions)
127
127
 
128
128
  def unbind(self) -> None:
129
- """Remove the database bindings created by ``db.define``."""
129
+ """Remove the database bindings created by `db.define`."""
130
130
  for value in self.__dict__.values():
131
131
  if isinstance(value, TypedField):
132
132
  value.unbind()
@@ -104,9 +104,9 @@ class TableProtocol(t.Protocol): # pragma: no cover
104
104
  Type checkers cannot infer the owning table from a relationship's
105
105
  class-body assignment, and forward references can also obscure the
106
106
  related table. PyDAL exposes table fields dynamically, so arbitrary
107
- field access must remain permissive here. Because ``__getattr__``
108
- returns ``Any``, type checkers do not validate field names in
109
- relationship callbacks; for example, ``self.fakefield`` is accepted
107
+ field access must remain permissive here. Because `__getattr__`
108
+ returns `Any`, type checkers do not validate field names in
109
+ relationship callbacks; for example, `self.fakefield` is accepted
110
110
  even when no such field exists.
111
111
  """
112
112
 
@@ -418,9 +418,12 @@ type P_Table = TableProtocol
418
418
 
419
419
  type QueryLike = Query | _Query | bool
420
420
 
421
- type Condition = t.Optional[t.Callable[[P_Table, P_Table], QueryLike]]
421
+ type Condition = t.Callable[[P_Table, P_Table], QueryLike] | None
422
422
 
423
- type OnQuery = t.Optional[t.Callable[[P_Table, P_Table], list[Expression | _Expression]]]
423
+ # An `on` callback can include an alias binding for later join expressions.
424
+ # QueryBuilder ignores table entries when it constructs the actual joins.
425
+ type OnQueryItem = Expression | _Expression | t.Type["TypedTable"]
426
+ type OnQuery = t.Callable[[P_Table, P_Table], t.Sequence[OnQueryItem]] | None
424
427
 
425
428
  type CacheModel = t.Callable[[str, CacheFn, int], Rows]
426
429
  type CacheTuple = tuple[CacheModel, int]
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