Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-numpy for openSUSE:Factory 
checked in at 2021-11-21 23:51:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-numpy (Old)
 and      /work/SRC/openSUSE:Factory/.python-numpy.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-numpy"

Sun Nov 21 23:51:47 2021 rev:106 rq:932378 version:1.21.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-numpy/python-numpy.changes        
2021-11-15 00:06:18.795600503 +0100
+++ /work/SRC/openSUSE:Factory/.python-numpy.new.1895/python-numpy.changes      
2021-11-21 23:52:09.614257163 +0100
@@ -1,0 +2,6 @@
+Fri Nov 19 00:33:15 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch bpo-45167-fixes.patch:
+  * Support Python >= 3.9.8 changes. 
+
+-------------------------------------------------------------------

New:
----
  bpo-45167-fixes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-numpy.spec ++++++
--- /var/tmp/diff_new_pack.D1eWFU/_old  2021-11-21 23:52:10.230255177 +0100
+++ /var/tmp/diff_new_pack.D1eWFU/_new  2021-11-21 23:52:10.230255177 +0100
@@ -84,6 +84,8 @@
 Patch0:         numpy-buildfix.patch
 # PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious 
compiler warnings that cause build failure
 Patch1:         numpy-1.9.0-remove-__declspec.patch
+# PATCH-FIX-UPSTREAM -- 
gh#numpy/numpy/commit/8871c7285fc097fd1bf713aa184cba7e2804f625
+Patch2:         bpo-45167-fixes.patch
 BuildConflicts: gcc11 < 11.2
 BuildRequires:  %{python_module Cython >= 0.29.24}
 BuildRequires:  %{python_module base >= 3.7}

++++++ bpo-45167-fixes.patch ++++++
>From 8871c7285fc097fd1bf713aa184cba7e2804f625 Mon Sep 17 00:00:00 2001
From: Bas van Beek <b.f.van.b...@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)()

Reply via email to