From a0f76d27068f2edbc1fb9ca80251736096d94773 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Wed, 9 Feb 2022 11:24:56 +0100
Subject: [PATCH] rm deprecated IHistogram.getArray

---
 Device/Histo/IHistogram.cpp           |   5 --
 Device/Histo/IHistogram.h             |   3 -
 Wrap/Swig/libBornAgainDevice.i        |  10 ---
 auto/Wrap/doxygenDevice.i             |   9 ---
 auto/Wrap/libBornAgainDevice.py       |  16 -----
 auto/Wrap/libBornAgainDevice_wrap.cpp | 100 --------------------------
 6 files changed, 143 deletions(-)

diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp
index c01d3e2e2ad..b10a5ca6acc 100644
--- a/Device/Histo/IHistogram.cpp
+++ b/Device/Histo/IHistogram.cpp
@@ -226,11 +226,6 @@ PyObject* IHistogram::array(DataType dataType) const
     const std::unique_ptr<OutputData<double>> data(createOutputData(dataType));
     return data->getArray();
 }
-
-PyObject* IHistogram::getArray(DataType dataType) const
-{
-    return array(dataType);
-}
 #endif // BORNAGAIN_PYTHON
 
 void IHistogram::reset()
diff --git a/Device/Histo/IHistogram.h b/Device/Histo/IHistogram.h
index 2e888a10c9c..606c1622576 100644
--- a/Device/Histo/IHistogram.h
+++ b/Device/Histo/IHistogram.h
@@ -142,9 +142,6 @@ public:
 #ifdef BORNAGAIN_PYTHON
     //! Returns numpy array with bin content (accumulated values).
     PyObject* array(DataType dataType = DataType::INTEGRAL) const;
-
-    //! \deprecated Use array() instead.
-    PyObject* getArray(DataType dataType = DataType::INTEGRAL) const;
 #endif
 
     //! Reset histogram content (axes remains)
diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i
index e161709740b..80e77f36238 100644
--- a/Wrap/Swig/libBornAgainDevice.i
+++ b/Wrap/Swig/libBornAgainDevice.i
@@ -23,16 +23,6 @@
 
 %include "ignoreBase.i"
 
-// deprecations:
-%rename(getArrayObsolete) IHistogram::getArray;
-%extend IHistogram {
-    %pythoncode %{
-         @deprecated("Deprecated. Use array() instead.")
-         def getArray(self):
-             return self.getArrayObsolete()
-    %}
- };
-
 %{
 #include "Base/Element/PolMatrices.h"
 #include "Param/Distrib/ParameterDistribution.h"
diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i
index e84302380d7..73963d99ab8 100644
--- a/auto/Wrap/doxygenDevice.i
+++ b/auto/Wrap/doxygenDevice.i
@@ -1422,12 +1422,6 @@ Returns integral of bins content (computed as a sum of all bin content).
 Returns numpy array with bin content (accumulated values). 
 ";
 
-%feature("docstring")  IHistogram::getArray "PyObject * IHistogram::getArray(DataType dataType=DataType::INTEGRAL) const
-
-Deprecated
-Use  array() instead. 
-";
-
 %feature("docstring")  IHistogram::reset "void IHistogram::reset()
 
 Reset histogram content (axes remains) 
@@ -3224,9 +3218,6 @@ make Swappable
 // File: ResolutionFunction2DGaussian_8h.xml
 
 
-// File: deprecated.xml
-
-
 // File: dir_045b2146c1496d64c013dbede5cfb743.xml
 
 
diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py
index 62d5b4fc72c..cf4ba3c7669 100644
--- a/auto/Wrap/libBornAgainDevice.py
+++ b/auto/Wrap/libBornAgainDevice.py
@@ -5290,17 +5290,6 @@ class IHistogram(object):
         """
         return _libBornAgainDevice.IHistogram_array(self, *args)
 
-    def getArrayObsolete(self, *args):
-        r"""
-        getArrayObsolete(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> PyObject
-        PyObject * IHistogram::getArray(DataType dataType=DataType::INTEGRAL) const
-
-        Deprecated
-        Use  array() instead. 
-
-        """
-        return _libBornAgainDevice.IHistogram_getArrayObsolete(self, *args)
-
     def reset(self):
         r"""
         reset(IHistogram self)
@@ -5390,11 +5379,6 @@ class IHistogram(object):
         """
         return _libBornAgainDevice.IHistogram_load(self, filename)
 
-    @deprecated("Deprecated. Use array() instead.")
-    def getArray(self):
-        return self.getArrayObsolete()
-
-
 # Register IHistogram in _libBornAgainDevice:
 _libBornAgainDevice.IHistogram_swigregister(IHistogram)
 
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index 020c820e2cb..dd3be74a57b 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -43136,98 +43136,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_IHistogram_getArrayObsolete__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
-  PyObject *resultobj = 0;
-  IHistogram *arg1 = (IHistogram *) 0 ;
-  IHistogram::DataType arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  PyObject *result = 0 ;
-  
-  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_getArrayObsolete" "', argument " "1"" of type '" "IHistogram const *""'"); 
-  }
-  arg1 = reinterpret_cast< IHistogram * >(argp1);
-  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IHistogram_getArrayObsolete" "', argument " "2"" of type '" "IHistogram::DataType""'");
-  } 
-  arg2 = static_cast< IHistogram::DataType >(val2);
-  result = (PyObject *)((IHistogram const *)arg1)->getArray(arg2);
-  resultobj = result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IHistogram_getArrayObsolete__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
-  PyObject *resultobj = 0;
-  IHistogram *arg1 = (IHistogram *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *result = 0 ;
-  
-  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IHistogram, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IHistogram_getArrayObsolete" "', argument " "1"" of type '" "IHistogram const *""'"); 
-  }
-  arg1 = reinterpret_cast< IHistogram * >(argp1);
-  result = (PyObject *)((IHistogram const *)arg1)->getArray();
-  resultobj = result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IHistogram_getArrayObsolete(PyObject *self, PyObject *args) {
-  Py_ssize_t argc;
-  PyObject *argv[3] = {
-    0
-  };
-  
-  if (!(argc = SWIG_Python_UnpackTuple(args, "IHistogram_getArrayObsolete", 0, 2, argv))) SWIG_fail;
-  --argc;
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IHistogram, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_IHistogram_getArrayObsolete__SWIG_1(self, argc, argv);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IHistogram, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_int(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_IHistogram_getArrayObsolete__SWIG_0(self, argc, argv);
-      }
-    }
-  }
-  
-fail:
-  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IHistogram_getArrayObsolete'.\n"
-    "  Possible C/C++ prototypes are:\n"
-    "    IHistogram::getArray(IHistogram::DataType) const\n"
-    "    IHistogram::getArray() const\n");
-  return 0;
-}
-
-
 SWIGINTERN PyObject *_wrap_IHistogram_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   IHistogram *arg1 = (IHistogram *) 0 ;
@@ -49194,14 +49102,6 @@ static PyMethodDef SwigMethods[] = {
 		"Returns numpy array with bin content (accumulated values). \n"
 		"\n"
 		""},
-	 { "IHistogram_getArrayObsolete", _wrap_IHistogram_getArrayObsolete, METH_VARARGS, "\n"
-		"IHistogram_getArrayObsolete(IHistogram self, IHistogram::DataType dataType=DataType::INTEGRAL) -> PyObject\n"
-		"PyObject * IHistogram::getArray(DataType dataType=DataType::INTEGRAL) const\n"
-		"\n"
-		"Deprecated\n"
-		"Use  array() instead. \n"
-		"\n"
-		""},
 	 { "IHistogram_reset", _wrap_IHistogram_reset, METH_O, "\n"
 		"IHistogram_reset(IHistogram self)\n"
 		"void IHistogram::reset()\n"
-- 
GitLab