From ef8e1d7495b3427c568a802065924497fe06ae83 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 26 Jun 2021 23:55:13 -0500
Subject: [PATCH] PyOpenCLArrayContext in arraycontext should know nothing
 about how to transform

---
 arraycontext/impl/pyopencl/__init__.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arraycontext/impl/pyopencl/__init__.py b/arraycontext/impl/pyopencl/__init__.py
index aaf1ce4..ca37732 100644
--- a/arraycontext/impl/pyopencl/__init__.py
+++ b/arraycontext/impl/pyopencl/__init__.py
@@ -199,6 +199,16 @@ class PyOpenCLArrayContext(ArrayContext):
             pass
         orig_t_unit = t_unit
 
+        from warnings import warn
+        warn("Using arraycontext.PyOpenCLArrayContext.transform_loopy_program "
+                "to transform a program. This is deprecated and will stop working "
+                "in 2022. Instead, subclass PyOpenCLArrayContext and implement "
+                "the specific logic required to transform the program for your "
+                "package or application. Check higher-level packages "
+                "(e.g. meshmode), which may already have subclasses you may want "
+                "to build on.",
+                DeprecationWarning, stacklevel=2)
+
         # accommodate loopy with and without kernel callables
 
         import loopy as lp
-- 
GitLab