From cd5fcc46d23b4fe92bdba3f27763c6e0e63d34e5 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Sat, 2 Apr 2022 23:01:14 +0000 Subject: [PATCH] Update to 2.9.2. --- .gitignore | 1 + 3682.patch | 173 -------------------------------------------------- pybind11.spec | 8 +-- sources | 2 +- 4 files changed, 6 insertions(+), 178 deletions(-) delete mode 100644 3682.patch diff --git a/.gitignore b/.gitignore index d92266a..8fd7960 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /v2.8.1.tar.gz /pybind11-2.9.0.tar.gz /pybind11-2.9.1.tar.gz +/pybind11-2.9.2.tar.gz diff --git a/3682.patch b/3682.patch deleted file mode 100644 index c7f16fb..0000000 --- a/3682.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 116f8c7db5a11d0e1e7830de3f2bbf3e5ed1316c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Thu, 3 Feb 2022 17:41:45 +0100 -Subject: [PATCH 1/2] test: Strip whitespace when comparing numpy dtypes for - 1.22 compat - -Strip whitespace when comparing numpy dtype str() in order to preserve -test compatibility with both numpy 1.22 and older versions whose output -differ by whitespace. - -Fixes #3680 ---- - tests/test_numpy_dtypes.py | 44 +++++++++++++++++++------------------- - 1 file changed, 22 insertions(+), 22 deletions(-) - -diff --git a/tests/test_numpy_dtypes.py b/tests/test_numpy_dtypes.py -index 06e578329e..43480334aa 100644 ---- a/tests/test_numpy_dtypes.py -+++ b/tests/test_numpy_dtypes.py -@@ -32,8 +32,8 @@ def dt_fmt(): - e = "<" if byteorder == "little" else ">" - return ( - "{{'names':['bool_','uint_','float_','ldbl_']," -- " 'formats':['?','" + e + "u4','" + e + "f4','" + e + "f{}']," -- " 'offsets':[0,4,8,{}], 'itemsize':{}}}" -+ "'formats':['?','" + e + "u4','" + e + "f4','" + e + "f{}']," -+ "'offsets':[0,4,8,{}],'itemsize':{}}}" - ) - - -@@ -46,7 +46,7 @@ def simple_dtype_fmt(): - def packed_dtype_fmt(): - from sys import byteorder - -- return "[('bool_', '?'), ('uint_', '{e}u4'), ('float_', '{e}f4'), ('ldbl_', '{e}f{}')]".format( -+ return "[('bool_','?'),('uint_','{e}u4'),('float_','{e}f4'),('ldbl_','{e}f{}')]".format( - np.dtype("longdouble").itemsize, e="<" if byteorder == "little" else ">" - ) - -@@ -77,7 +77,7 @@ def partial_nested_fmt(): - partial_size = partial_ld_off + ld.itemsize - partial_end_padding = partial_size % np.dtype("uint64").alignment - partial_nested_size = partial_nested_off * 2 + partial_size + partial_end_padding -- return "{{'names':['a'], 'formats':[{}], 'offsets':[{}], 'itemsize':{}}}".format( -+ return "{{'names':['a'],'formats':[{}],'offsets':[{}],'itemsize':{}}}".format( - partial_dtype_fmt(), partial_nested_off, partial_nested_size - ) - -@@ -123,25 +123,25 @@ def test_dtype(simple_dtype): - - e = "<" if byteorder == "little" else ">" - -- assert m.print_dtypes() == [ -+ assert [x.replace(' ', '') for x in m.print_dtypes()] == [ - simple_dtype_fmt(), - packed_dtype_fmt(), -- "[('a', {}), ('b', {})]".format(simple_dtype_fmt(), packed_dtype_fmt()), -+ "[('a',{}),('b',{})]".format(simple_dtype_fmt(), packed_dtype_fmt()), - partial_dtype_fmt(), - partial_nested_fmt(), -- "[('a', 'S3'), ('b', 'S3')]", -+ "[('a','S3'),('b','S3')]", - ( -- "{{'names':['a','b','c','d'], " -- + "'formats':[('S4', (3,)),('" -+ "{{'names':['a','b','c','d']," -+ + "'formats':[('S4',(3,)),('" - + e -- + "i4', (2,)),('u1', (3,)),('" -+ + "i4',(2,)),('u1',(3,)),('" - + e -- + "f4', (4, 2))], " -- + "'offsets':[0,12,20,24], 'itemsize':56}}" -+ + "f4',(4,2))]," -+ + "'offsets':[0,12,20,24],'itemsize':56}}" - ).format(e=e), -- "[('e1', '" + e + "i8'), ('e2', 'u1')]", -- "[('x', 'i1'), ('y', '" + e + "u8')]", -- "[('cflt', '" + e + "c8'), ('cdbl', '" + e + "c16')]", -+ "[('e1','" + e + "i8'),('e2','u1')]", -+ "[('x','i1'),('y','" + e + "u8')]", -+ "[('cflt','" + e + "c8'),('cdbl','" + e + "c16')]", - ] - - d1 = np.dtype( -@@ -238,7 +238,7 @@ def test_recarray(simple_dtype, packed_dtype): - ] - - arr = m.create_rec_partial(3) -- assert str(arr.dtype) == partial_dtype_fmt() -+ assert str(arr.dtype).replace(' ', '') == partial_dtype_fmt() - partial_dtype = arr.dtype - assert "" not in arr.dtype.fields - assert partial_dtype.itemsize > simple_dtype.itemsize -@@ -246,7 +246,7 @@ def test_recarray(simple_dtype, packed_dtype): - assert_equal(arr, elements, packed_dtype) - - arr = m.create_rec_partial_nested(3) -- assert str(arr.dtype) == partial_nested_fmt() -+ assert str(arr.dtype).replace(' ', '') == partial_nested_fmt() - assert "" not in arr.dtype.fields - assert "" not in arr.dtype.fields["a"][0].fields - assert arr.dtype.itemsize > partial_dtype.itemsize -@@ -285,12 +285,12 @@ def test_array_array(): - e = "<" if byteorder == "little" else ">" - - arr = m.create_array_array(3) -- assert str(arr.dtype) == ( -- "{{'names':['a','b','c','d'], " -- + "'formats':[('S4', (3,)),('" -+ assert str(arr.dtype).replace(' ', '') == ( -+ "{{'names':['a','b','c','d']," -+ + "'formats':[('S4',(3,)),('" - + e -- + "i4', (2,)),('u1', (3,)),('{e}f4', (4, 2))], " -- + "'offsets':[0,12,20,24], 'itemsize':56}}" -+ + "i4',(2,)),('u1',(3,)),('{e}f4',(4,2))]," -+ + "'offsets':[0,12,20,24],'itemsize':56}}" - ).format(e=e) - assert m.print_array_array(arr) == [ - "a={{A,B,C,D},{K,L,M,N},{U,V,W,X}},b={0,1}," - -From 2c4a1e98e56a257fbc8dd0e8644181acd6d7e5a7 Mon Sep 17 00:00:00 2001 -From: "pre-commit-ci[bot]" - <66853113+pre-commit-ci[bot]@users.noreply.github.com> -Date: Thu, 3 Feb 2022 16:45:33 +0000 -Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks - -for more information, see https://pre-commit.ci ---- - tests/test_numpy_dtypes.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/test_numpy_dtypes.py b/tests/test_numpy_dtypes.py -index 43480334aa..0098eccb87 100644 ---- a/tests/test_numpy_dtypes.py -+++ b/tests/test_numpy_dtypes.py -@@ -123,7 +123,7 @@ def test_dtype(simple_dtype): - - e = "<" if byteorder == "little" else ">" - -- assert [x.replace(' ', '') for x in m.print_dtypes()] == [ -+ assert [x.replace(" ", "") for x in m.print_dtypes()] == [ - simple_dtype_fmt(), - packed_dtype_fmt(), - "[('a',{}),('b',{})]".format(simple_dtype_fmt(), packed_dtype_fmt()), -@@ -238,7 +238,7 @@ def test_recarray(simple_dtype, packed_dtype): - ] - - arr = m.create_rec_partial(3) -- assert str(arr.dtype).replace(' ', '') == partial_dtype_fmt() -+ assert str(arr.dtype).replace(" ", "") == partial_dtype_fmt() - partial_dtype = arr.dtype - assert "" not in arr.dtype.fields - assert partial_dtype.itemsize > simple_dtype.itemsize -@@ -246,7 +246,7 @@ def test_recarray(simple_dtype, packed_dtype): - assert_equal(arr, elements, packed_dtype) - - arr = m.create_rec_partial_nested(3) -- assert str(arr.dtype).replace(' ', '') == partial_nested_fmt() -+ assert str(arr.dtype).replace(" ", "") == partial_nested_fmt() - assert "" not in arr.dtype.fields - assert "" not in arr.dtype.fields["a"][0].fields - assert arr.dtype.itemsize > partial_dtype.itemsize -@@ -285,7 +285,7 @@ def test_array_array(): - e = "<" if byteorder == "little" else ">" - - arr = m.create_array_array(3) -- assert str(arr.dtype).replace(' ', '') == ( -+ assert str(arr.dtype).replace(" ", "") == ( - "{{'names':['a','b','c','d']," - + "'formats':[('S4',(3,)),('" - + e diff --git a/pybind11.spec b/pybind11.spec index 6a21d04..2c5a632 100644 --- a/pybind11.spec +++ b/pybind11.spec @@ -16,7 +16,7 @@ %global python3_enabled 1 Name: pybind11 -Version: 2.9.1 +Version: 2.9.2 Release: 1%{?dist} Summary: Seamless operability between C++11 and Python License: BSD @@ -25,8 +25,6 @@ Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{versio # Patch out header path Patch1: pybind11-2.8.1-hpath.patch -# Patch to fix tests for newer numpy -Patch2: https://github.com/pybind/pybind11/pull/3682.patch BuildRequires: make %if %{python2_enabled} @@ -110,7 +108,6 @@ This package contains the Python 3 files. %prep %setup -q %patch1 -p1 -b .hpath -%patch2 -p1 -b .numpy %build pys="" @@ -183,6 +180,9 @@ PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}" %endif %changelog +* Sat Apr 02 2022 Susi Lehtola - 2.9.2-1 +- Update to 2.9.2. + * Tue Feb 08 2022 Susi Lehtola - 2.9.1-1 - Update to 2.9.1. diff --git a/sources b/sources index a48423e..fc789a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pybind11-2.9.1.tar.gz) = 1f268cc6df1f572658bfc3e60f7f010bec9b9444d6a6d6c95f7b26f7b4b7dd42846e65ae5a611c01c0341335fdfa84b01272b5c1b2cc11a418f64fecabfa0588 +SHA512 (pybind11-2.9.2.tar.gz) = c6c18e5f59873adb3692640ade26472abd257607e7bb9fd48cfd1949878811e83d6ac6eb8c8dd926622d52ca4f13e5e6a58e0abaaaa1fa814ee831ea2b515272