Bug#1027213: gavodachs: autopkgtest fail with numpy/1.24.1

2023-01-09 Thread stefanor
Hi Markus (2023.01.09_10:45:30_+)
> I'd be fine with the patch, as it won't actually break anything that
> hasn't been broken already, but I have already prepared a fix
> in , waiting
> for an upload (delayed because of holidays, I suspect).  So, if
> you have not uploaded yet, I'd prefer that fix to go into the
> archive.  Otherwise, as I said, I'm fine with your patch too, for the
> time being.

Sure, I can apply this patch instead.

Or, you can stage the other patch (that resolves #1027398) in git, and I
can sponsor the upload.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272



Bug#1027213: gavodachs: autopkgtest fail with numpy/1.24.1

2023-01-09 Thread Markus Demleitner
On Sun, Jan 08, 2023 at 03:51:47PM -0400, Stefano Rivera wrote:
> Control: tag -1 + patch
> 
> I haven't tested this beyond the autopkgtest, but it seems to work, so
> I'll NMU it.

I'd be fine with the patch, as it won't actually break anything that
hasn't been broken already, but I have already prepared a fix
in , waiting
for an upload (delayed because of holidays, I suspect).  So, if
you have not uploaded yet, I'd prefer that fix to go into the
archive.  Otherwise, as I said, I'm fine with your patch too, for the
time being.

Thanks!

Markus



Bug#1027213: gavodachs: autopkgtest fail with numpy/1.24.1

2023-01-08 Thread Stefano Rivera
Control: tag -1 + patch

I haven't tested this beyond the autopkgtest, but it seems to work, so
I'll NMU it.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272
From: Stefano Rivera 
Date: Sun, 8 Jan 2023 15:29:25 -0400
Subject: Replace numpy types with builtin types where appropriate

Supports Numpy > 1.24

Bug-Debian: https://bugs.debian.org/1027213
---
 gavo/base/typesystems.py  | 10 +-
 gavo/formats/fitstable.py |  2 +-
 gavo/votable/simple.py|  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gavo/base/typesystems.py b/gavo/base/typesystems.py
index 0e4223e..33b4827 100644
--- a/gavo/base/typesystems.py
+++ b/gavo/base/typesystems.py
@@ -139,11 +139,11 @@ class ToNumpyConverter(FromSQLConverter):
 		"integer": numpy.int32,
 		"bigint": numpy.int64,
 		"real": numpy.float32,
-		"boolean": numpy.bool,
+		"boolean": bool,
 		"double precision": numpy.float64,
-		"text": numpy.str,
-		"unicode": numpy.str,
-		"char": numpy.str,
+		"text": str,
+		"unicode": str,
+		"char": str,
 		"date": numpy.float32,
 		"timestamp": numpy.float64,
 		"time": numpy.float32,
@@ -151,7 +151,7 @@ class ToNumpyConverter(FromSQLConverter):
 
 	def mapComplex(self, type, length):
 		if type in self._charTypes:
-			return numpy.str
+			return str
 
 
 class ToPythonBase(FromSQLConverter):
diff --git a/gavo/formats/fitstable.py b/gavo/formats/fitstable.py
index b30c740..0de05bb 100644
--- a/gavo/formats/fitstable.py
+++ b/gavo/formats/fitstable.py
@@ -128,7 +128,7 @@ def _makeValueArray(values, colInd, colDesc):
 		# That's a variable-length array that we'll fill from a 
 		# numpy object array
 		return typecode, numpy.array([list(v[colInd]) for v in values], 
-			dtype=numpy.object)
+			dtype=object)
 
 	elif length>1:
 		# numpy 1:1.12.1-3 and pyfits from astropy 1.3-8 apparently
diff --git a/gavo/votable/simple.py b/gavo/votable/simple.py
index 1ff2ac7..acaf6fc 100644
--- a/gavo/votable/simple.py
+++ b/gavo/votable/simple.py
@@ -24,7 +24,7 @@ try:
 		"long": numpy.int64,
 		"float": numpy.float32,
 		"double": numpy.float64,
-		"boolean": numpy.bool,
+		"boolean": bool,
 		"char": numpy.str_,
 		"floatComplex": numpy.complex64,
 		"doubleComplex": numpy.complex128,