Skip to content

Commit

Permalink
fix: Lower deprecations for Skeleton.fromDB/toDB (#1345)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phorward authored Dec 6, 2024
1 parent a0dc66d commit 3f07466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/viur/core/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ def fromClient(
@deprecated(
version="3.7.0",
reason="Use skel.read() instead of skel.fromDB()",
action="always"
action="once"
)
def fromDB(cls, skel: SkeletonInstance, key: KeyType) -> bool:
"""
Expand Down Expand Up @@ -1153,7 +1153,7 @@ def read(
@deprecated(
version="3.7.0",
reason="Use skel.write() instead of skel.toDB()",
action="always"
action="once"
)
def toDB(cls, skel: SkeletonInstance, update_relations: bool = True, **kwargs) -> db.Key:
"""
Expand Down

0 comments on commit 3f07466

Please sign in to comment.