]> git.pld-linux.org Git - packages/python3-numpy.git/commitdiff
- up to 1.21.4 auto/th/python3-numpy-1.21.4-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Nov 2021 09:59:26 +0000 (10:59 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Nov 2021 09:59:26 +0000 (10:59 +0100)
bpo-45167.patch [new file with mode: 0644]
python3-numpy.spec

diff --git a/bpo-45167.patch b/bpo-45167.patch
new file mode 100644 (file)
index 0000000..7c099e0
--- /dev/null
@@ -0,0 +1,59 @@
+From 8871c7285fc097fd1bf713aa184cba7e2804f625 Mon Sep 17 00:00:00 2001
+From: Bas van Beek <b.f.van.beek@vu.nl>
+Date: Wed, 10 Nov 2021 15:36:00 +0100
+Subject: [PATCH] MAINT: Do not forward `__(deep)copy__` calls of
+ `_GenericAlias` to the wrapped type
+
+Adapt to the python 3.9.8 changes made in bpo-45167.
+---
+ numpy/typing/_generic_alias.py           |  2 ++
+ numpy/typing/tests/test_generic_alias.py | 16 ++++++++++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/numpy/typing/_generic_alias.py b/numpy/typing/_generic_alias.py
+index 932f12dd05d..1eb2c8c05f0 100644
+--- a/numpy/typing/_generic_alias.py
++++ b/numpy/typing/_generic_alias.py
+@@ -185,6 +185,8 @@ def __eq__(self, value: object) -> bool:
+         "__mro_entries__",
+         "__reduce__",
+         "__reduce_ex__",
++        "__copy__",
++        "__deepcopy__",
+     })
+     def __getattribute__(self, name: str) -> Any:
+diff --git a/numpy/typing/tests/test_generic_alias.py b/numpy/typing/tests/test_generic_alias.py
+index 3021d985934..39343420bdc 100644
+--- a/numpy/typing/tests/test_generic_alias.py
++++ b/numpy/typing/tests/test_generic_alias.py
+@@ -1,6 +1,7 @@
+ from __future__ import annotations
+ import sys
++import copy
+ import types
+ import pickle
+ import weakref
+@@ -80,6 +81,21 @@ def test_pass(self, name: str, func: FuncType) -> None:
+             value_ref = func(NDArray_ref)
+             assert value == value_ref
++    @pytest.mark.parametrize("name,func", [
++        ("__copy__", lambda n: n == copy.copy(n)),
++        ("__deepcopy__", lambda n: n == copy.deepcopy(n)),
++    ])
++    def test_copy(self, name: str, func: FuncType) -> None:
++        value = func(NDArray)
++
++        # xref bpo-45167
++        GE_398 = (
++            sys.version_info[:2] == (3, 9) and sys.version_info >= (3, 9, 8)
++        )
++        if GE_398 or sys.version_info >= (3, 10, 1):
++            value_ref = func(NDArray_ref)
++            assert value == value_ref
++
+     def test_weakref(self) -> None:
+         """Test ``__weakref__``."""
+         value = weakref.ref(NDArray)()
index f1ab353ff2b5fb8f6711206d2715243313320685..42dc45cdcbf8a190adffff94b980e9ec59ee885f 100644 (file)
@@ -6,18 +6,19 @@
 Summary:       Python 3.x numerical facilities
 Summary(pl.UTF-8):     Moduły do obliczeń numerycznych dla języka Python 3.x
 Name:          python3-%{module}
-Version:       1.19.4
-Release:       3
+Version:       1.21.4
+Release:       1
 Epoch:         1
 License:       BSD
 Group:         Libraries/Python
 #Source0Download: https://github.com/numpy/numpy/releases/
 Source0:       https://github.com/numpy/numpy/releases/download/v%{version}/%{module}-%{version}.tar.gz
-# Source0-md5: a25e91ea62ffd37ccf8e0d917484962c
-URL:           http://sourceforge.net/projects/numpy/
+# Source0-md5: 06019c1116b3e2791bd507f898257e7f
+Patch0:                bpo-45167.patch
+URL:           https://github.com/numpy/numpy
 BuildRequires: gcc-fortran
 BuildRequires: lapack-devel >= 3.1.1-2
-BuildRequires: python3-Cython >= 0.29.21
+BuildRequires: python3-Cython >= 0.29.24
 BuildRequires: python3-devel >= 1:3.6
 BuildRequires: python3-setuptools
 %if %{with tests}
@@ -67,6 +68,7 @@ Generator interfejsów z Fortranu do Pythona 3.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
 
 %build
 # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements,
@@ -101,16 +103,20 @@ rm -rf $RPM_BUILD_ROOT
 %doc LICENSE.txt THANKS.txt
 %dir %{py3_sitedir}/%{module}
 %{py3_sitedir}/%{module}/*.py
+%{py3_sitedir}/%{module}/*.pyi
+%{py3_sitedir}/%{module}/py.typed
 %{py3_sitedir}/%{module}/__pycache__
 %dir %{py3_sitedir}/%{module}/compat
 %{py3_sitedir}/%{module}/compat/*.py
 %{py3_sitedir}/%{module}/compat/__pycache__
 %dir %{py3_sitedir}/%{module}/core
 %{py3_sitedir}/%{module}/core/*.py
+%{py3_sitedir}/%{module}/core/*.pyi
 %{py3_sitedir}/%{module}/core/__pycache__
 %attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so
 %dir %{py3_sitedir}/%{module}/distutils
 %{py3_sitedir}/%{module}/distutils/*.py
+%{py3_sitedir}/%{module}/distutils/*.pyi
 %{py3_sitedir}/%{module}/distutils/__pycache__
 %dir %{py3_sitedir}/%{module}/distutils/command
 %{py3_sitedir}/%{module}/distutils/command/*.py
@@ -120,33 +126,45 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__
 %dir %{py3_sitedir}/%{module}/fft
 %{py3_sitedir}/%{module}/fft/*.py
+%{py3_sitedir}/%{module}/fft/*.pyi
 %{py3_sitedir}/%{module}/fft/__pycache__
 %attr(755,root,root) %{py3_sitedir}/%{module}/fft/_pocketfft_internal.cpython-3*.so
 %dir %{py3_sitedir}/%{module}/lib
 %{py3_sitedir}/%{module}/lib/*.py
+%{py3_sitedir}/%{module}/lib/*.pyi
 %{py3_sitedir}/%{module}/lib/__pycache__
 %dir %{py3_sitedir}/%{module}/linalg
 %{py3_sitedir}/%{module}/linalg/*.py
+%{py3_sitedir}/%{module}/linalg/*.pyi
 %{py3_sitedir}/%{module}/linalg/__pycache__
 %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so
 %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so
 %dir %{py3_sitedir}/%{module}/ma
 %{py3_sitedir}/%{module}/ma/*.py
+%{py3_sitedir}/%{module}/ma/*.pyi
 %{py3_sitedir}/%{module}/ma/__pycache__
 %dir %{py3_sitedir}/%{module}/matrixlib
 %{py3_sitedir}/%{module}/matrixlib/*.py
+%{py3_sitedir}/%{module}/matrixlib/*.pyi
 %{py3_sitedir}/%{module}/matrixlib/__pycache__
 %dir %{py3_sitedir}/%{module}/polynomial
 %{py3_sitedir}/%{module}/polynomial/*.py
+%{py3_sitedir}/%{module}/polynomial/*.pyi
 %{py3_sitedir}/%{module}/polynomial/__pycache__
 %dir %{py3_sitedir}/%{module}/random
 %{py3_sitedir}/%{module}/random/*.py
+%{py3_sitedir}/%{module}/random/*.pyi
 %{py3_sitedir}/%{module}/random/__pycache__
 %attr(755,root,root) %{py3_sitedir}/%{module}/random/*.cpython-3*.so
 %dir %{py3_sitedir}/%{module}/testing
 %{py3_sitedir}/%{module}/testing/_private
 %{py3_sitedir}/%{module}/testing/*.py
+%{py3_sitedir}/%{module}/testing/*.pyi
 %{py3_sitedir}/%{module}/testing/__pycache__
+%dir %{py3_sitedir}/%{module}/typing
+%{py3_sitedir}/%{module}/typing/*.py
+%{py3_sitedir}/%{module}/typing/*.pyi
+%{py3_sitedir}/%{module}/typing/__pycache__
 %{py3_sitedir}/numpy-%{version}-py*.egg-info
 
 %files devel
@@ -159,9 +177,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n f2py3
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/f2py
 %attr(755,root,root) %{_bindir}/f2py3
 %attr(755,root,root) %{_bindir}/f2py%{py3_ver}
 %dir %{py3_sitedir}/%{module}/f2py
 %{py3_sitedir}/%{module}/f2py/*.py
+%{py3_sitedir}/%{module}/f2py/*.pyi
 %{py3_sitedir}/%{module}/f2py/__pycache__
 %{py3_sitedir}/%{module}/f2py/src
This page took 0.062686 seconds and 4 git commands to generate.