Issue filed at https://github.com/InsightSoftwareConsortium/ITK/issues/3782
Patch accepted upstreams with https://github.com/InsightSoftwareConsortium/ITK/commit/d2361b89fefb07b669b4cf67257fc3bf06afd9f5

--- Wrapping/Generators/Python/module_ext.i.in.orig
+++ Wrapping/Generators/Python/module_ext.i.in
@@ -10,9 +10,12 @@
 #include <iostream>
 
 #if PY_VERSION_HEX >= 0x03020000
+
 # define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
+# define SWIGPY_SLICEOBJECT PyObject
 #else
 # define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
+# define SWIGPY_SLICEOBJECT PySliceObject
 #endif
 %}
 
