Skip to content

Commit

Permalink
container: fix warning for cls_has_array_context_attr
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jul 15, 2024
1 parent c658c13 commit a85cbb3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions arraycontext/container/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,20 +266,20 @@ def wrap(cls: Any) -> Any:
if cls_has_array_context_attr is None:
if hasattr(cls, "array_context"):
cls_has_array_context_attr = _FailSafe
warn(f"{cls} has an .array_context attribute, but it does not "
"set _cls_has_array_context_attr to True when calling "
"with_container_arithmetic. This is being interpreted "
"as .array_context being permitted to fail. Tolerating "
warn(f"{cls} has an 'array_context' attribute, but it does not "
"set '_cls_has_array_context_attr' to 'True' when calling "
"'with_container_arithmetic'. This is being interpreted "
"as 'array_context' being permitted to fail. Tolerating "
"these failures comes at a substantial cost. It is "
"deprecated and will stop working in 2023. "
"Having a working .array_context attribute is desirable "
"Having a working 'array_context' attribute is desirable "
"to enable arithmetic with other array types supported "
"by the array context."
f"If {cls}.array_context will not fail, pass "
"_cls_has_array_context_attr=True. "
"by the array context. "
f"If '{cls.__name__}.array_context' will not fail, pass "
"'_cls_has_array_context_attr=True'. "
"If you do not want container arithmetic to make "
"use of the array context, set "
"_cls_has_array_context_attr=False.",
"'_cls_has_array_context_attr=False'.",
stacklevel=2)

if bcast_actx_array_type is None:
Expand Down

0 comments on commit a85cbb3

Please sign in to comment.