From acbd0b8684337d6d136f7af8c53f75182e33f38d Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 23 Jan 2013 00:49:43 -0500
Subject: [PATCH] Remove old, deprecated local_size interface in kernel call.

---
 pyopencl/__init__.py | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py
index 64509e0a..e5560c0a 100644
--- a/pyopencl/__init__.py
+++ b/pyopencl/__init__.py
@@ -497,10 +497,8 @@ def _add_functionality():
     # }}}
 
     # {{{ Kernel
-    def kernel_call(self, queue, global_size, *args, **kwargs):
+    def kernel_call(self, queue, global_size, local_size, *args, **kwargs):
         global_offset = kwargs.pop("global_offset", None)
-        had_local_size = "local_size" in kwargs
-        local_size = kwargs.pop("local_size", None)
         g_times_l = kwargs.pop("g_times_l", False)
         wait_for = kwargs.pop("wait_for", None)
 
@@ -509,28 +507,6 @@ def _add_functionality():
                     "Kernel.__call__ recived unexpected keyword arguments: %s"
                     % ", ".join(kwargs.keys()))
 
-        if had_local_size:
-            from warnings import warn
-            warn("The local_size keyword argument is deprecated and will be "
-                    "removed in pyopencl 2012.x. Pass the local "
-                    "size as the third positional argument instead.",
-                    DeprecationWarning, stacklevel=2)
-
-        if isinstance(args[0], (type(None), tuple)) and not had_local_size:
-            local_size = args[0]
-            args = args[1:]
-        elif not had_local_size:
-            from warnings import warn
-            warn("PyOpenCL Warning: There was an API change "
-                    "in Kernel.__call__() in pyopencl 0.92. "
-                    "local_size was moved from keyword argument to third "
-                    "positional argument in pyopencl 0.92. "
-                    "You didn't pass local_size, but you still need to insert "
-                    "'None' as a third argument. "
-                    "Your present usage is deprecated and will stop "
-                    "working in pyopencl 2012.x.",
-                    DeprecationWarning, stacklevel=2)
-
         self.set_args(*args)
 
         return enqueue_nd_range_kernel(queue, self, global_size, local_size,
-- 
GitLab