Skip to content

Commit 18a68ab

Browse files
committed
cleanup
1 parent 1bf60ee commit 18a68ab

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

packages/postgres-database/src/simcore_postgres_database/utils_groups_extra_properties.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
_logger = logging.getLogger(__name__)
1818

19+
_WARNING_FMSG = (
20+
f"{__name__}.{{}} uses aiopg which has been deprecated in this repo. "
21+
"Use {{}} instead. "
22+
"SEE https://github.com/ITISFoundation/osparc-simcore/issues/4529"
23+
)
24+
1925

2026
class GroupExtraPropertiesError(Exception):
2127
...
@@ -118,9 +124,7 @@ async def get(
118124
connection: SAConnection, *, gid: int, product_name: str
119125
) -> GroupExtraProperties:
120126
warnings.warn(
121-
f"{__name__}.get_v2 uses aiopg which has been deprecated in this repo."
122-
"Use get_v2 instead. "
123-
"See https://github.com/ITISFoundation/osparc-simcore/issues/4529",
127+
_WARNING_FMSG.format("get", "get_v2"),
124128
DeprecationWarning,
125129
stacklevel=1,
126130
)
@@ -194,9 +198,10 @@ async def get_aggregated_properties_for_user(
194198
product_name: str,
195199
) -> GroupExtraProperties:
196200
warnings.warn(
197-
f"{__name__}.get_aggregated_properties_for_user uses aiopg which has been deprecated in this repo. "
198-
"Use get_aggregated_properties_for_user_v2 instead. "
199-
"See https://github.com/ITISFoundation/osparc-simcore/issues/4529",
201+
_WARNING_FMSG.format(
202+
"get_aggregated_properties_for_user",
203+
"get_aggregated_properties_for_user_v2",
204+
),
200205
DeprecationWarning,
201206
stacklevel=1,
202207
)

0 commit comments

Comments
 (0)