TypeDAL 3.16.0__tar.gz → 3.16.1__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.
Potentially problematic release.
This version of TypeDAL might be problematic. Click here for more details.
- {typedal-3.16.0 → typedal-3.16.1}/CHANGELOG.md +6 -0
- {typedal-3.16.0 → typedal-3.16.1}/PKG-INFO +1 -1
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/__about__.py +1 -1
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/core.py +2 -2
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_main.py +2 -2
- {typedal-3.16.0 → typedal-3.16.1}/.github/workflows/su6.yml +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/.gitignore +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/.readthedocs.yml +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/README.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/coverage.svg +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/1_getting_started.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/2_defining_tables.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/3_building_queries.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/4_relationships.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/5_py4web.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/6_migrations.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/7_mixins.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/css/code_blocks.css +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/index.md +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/docs/requirements.txt +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/example_new.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/example_old.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/mkdocs.yml +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/pyproject.toml +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/__init__.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/caching.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/cli.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/config.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/fields.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/for_py4web.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/for_web2py.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/helpers.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/mixins.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/py.typed +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/serializers/as_json.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/types.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/src/typedal/web2py_py4web_shared.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/__init__.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/configs/simple.toml +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/configs/valid.env +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/configs/valid.toml +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_cli.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_config.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_docs_examples.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_helpers.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_json.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_mixins.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_mypy.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_orm.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_py4web.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_query_builder.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_relationships.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_row.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_stats.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_table.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_web2py.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/test_xx_others.py +0 -0
- {typedal-3.16.0 → typedal-3.16.1}/tests/timings.py +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
<!--next-version-placeholder-->
|
|
4
4
|
|
|
5
|
+
## v3.16.1 (2025-09-01)
|
|
6
|
+
|
|
7
|
+
### Fix
|
|
8
|
+
|
|
9
|
+
* Make `reorder_fields` take fields via * args so you don't have to wrap it in [] ([`625ed31`](https://github.com/trialandsuccess/TypeDAL/commit/625ed3182826725e03e04e9154012ee2e482761e))
|
|
10
|
+
|
|
5
11
|
## v3.16.0 (2025-09-01)
|
|
6
12
|
|
|
7
13
|
### Feature
|
|
@@ -829,7 +829,7 @@ R = typing.TypeVar("R")
|
|
|
829
829
|
|
|
830
830
|
|
|
831
831
|
def reorder_fields(
|
|
832
|
-
table: pydal.objects.Table, fields:
|
|
832
|
+
table: pydal.objects.Table, fields: typing.Iterable[str | Field | TypedField], keep_others: bool = True
|
|
833
833
|
) -> None:
|
|
834
834
|
"""
|
|
835
835
|
Reorder fields of a pydal table.
|
|
@@ -1394,7 +1394,7 @@ class TableMeta(type):
|
|
|
1394
1394
|
"""
|
|
1395
1395
|
return cls._hook_once(cls._after_delete, fn)
|
|
1396
1396
|
|
|
1397
|
-
def reorder_fields(cls, fields:
|
|
1397
|
+
def reorder_fields(cls, *fields: str | Field | TypedField, keep_others: bool = True):
|
|
1398
1398
|
"""
|
|
1399
1399
|
Reorder fields of a typedal table.
|
|
1400
1400
|
|
|
@@ -593,9 +593,9 @@ def test_reorder_fields():
|
|
|
593
593
|
assert list(Sub) == [Sub.id, Sub.name, Sub.gid]
|
|
594
594
|
|
|
595
595
|
# 'name' should come last:
|
|
596
|
-
Sub.reorder_fields(
|
|
596
|
+
Sub.reorder_fields(Sub.id, Sub.gid)
|
|
597
597
|
assert list(Sub) == [Sub.id, Sub.gid, Sub.name]
|
|
598
598
|
|
|
599
599
|
# 'name' should be dropped:
|
|
600
|
-
Sub.reorder_fields(
|
|
600
|
+
Sub.reorder_fields(Sub.id, Sub.gid, keep_others=False)
|
|
601
601
|
assert list(Sub) == [Sub.id, Sub.gid]
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|