Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecate persistence.LinkedAttribute #578

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- messaging - with_logging argument is deprecated and maybe removed in a future version
logging messages is now off by default - to turn it on provide a custom `logger` argument
https://github.com/anvilistas/anvil-extras/pull/572/files
- persistence - LinkedAttribute is deprecated and will be removed in a future version https://github.com/anvilistas/anvil-extras/pull/578

# v3.0.0

Expand Down
7 changes: 7 additions & 0 deletions client_code/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# This software is published at https://github.com/anvilistas/anvil-extras
import anvil.server

from .utils._warnings import warn as _warn

__version__ = "3.0.0"


Expand All @@ -30,6 +32,11 @@ def __init__(self, linked_column, linked_attr):
The name of the column in the linked table which contains the required
value
"""
_warn(
"persistence.LinkedAttribute",
"LinkedAttribute is deprecated and will be removed in future versions. Use a LinkedClass instead.",
"DEPRECATION_WARNING",
)
self._linked_column = linked_column
self._linked_attr = linked_attr

Expand Down
Loading