Skip to content

Commit 3f07466

Browse files
authored
fix: Lower deprecations for Skeleton.fromDB/toDB (#1345)
Remove fromDB() and toDB() deprecation warnings for now? I think it's still too early, especially because there are API changes that may lead to unwanted errors and breaking. Pros: - fromDB() and toDB() already use read() and write() internally - API remains compatible Cons: - Projects may not be willing to change their API calls.
1 parent a0dc66d commit 3f07466

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/viur/core/skeleton.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ def fromClient(
10981098
@deprecated(
10991099
version="3.7.0",
11001100
reason="Use skel.read() instead of skel.fromDB()",
1101-
action="always"
1101+
action="once"
11021102
)
11031103
def fromDB(cls, skel: SkeletonInstance, key: KeyType) -> bool:
11041104
"""
@@ -1153,7 +1153,7 @@ def read(
11531153
@deprecated(
11541154
version="3.7.0",
11551155
reason="Use skel.write() instead of skel.toDB()",
1156-
action="always"
1156+
action="once"
11571157
)
11581158
def toDB(cls, skel: SkeletonInstance, update_relations: bool = True, **kwargs) -> db.Key:
11591159
"""

0 commit comments

Comments
 (0)