Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-physt for openSUSE:Factory 
checked in at 2024-09-02 13:13:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-physt (Old)
 and      /work/SRC/openSUSE:Factory/.python-physt.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-physt"

Mon Sep  2 13:13:46 2024 rev:8 rq:1198010 version:0.7.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-physt/python-physt.changes        
2024-07-08 19:08:53.996143736 +0200
+++ /work/SRC/openSUSE:Factory/.python-physt.new.2698/python-physt.changes      
2024-09-02 13:13:52.080899121 +0200
@@ -1,0 +2,27 @@
+Fri Aug 30 13:38:42 UTC 2024 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 0.7.4
+  * Dependency: allow numpy 1.22 again
+- Release 0.7.3
+  * Improved: dealing with extremely narrow bin ranges
+  * Fixed: mypy and pytest issues
+  * Fixed: compatibility with polars 1.0
+- Release 0.7.2
+  * Improved: stats box in plots
+- Release 0.7.1
+  * Fixed: Newer polars compatibility, deal with Nones
+  * Added: .physt accessors for polars series and dataframes
+- Release 0.7.0
+  * Added: Support for pola.rs series/dataframes
+  * Moved: xarray support as a separate module in physt.compat
+  * Removed: physt.special (use physt.special_histograms instead)
+  * Added: stats_loc arg to locate stats box in plots
+  * Added: Pretty printing with rich library
+  * Changed: Moved most configuration to pyproject.toml
+  * Improved: Much more testing and edge-case bug fixes
+  * Support: Removed Python 3.7 and numpy <1.22, added 3.11
+  * Renamed: human binning => pretty binning (with deprecation
+    warning)
+- Unpin numpy 2: Add physt-pr116-np2.patch gh#janpipek/physt#116
+
+-------------------------------------------------------------------

Old:
----
  physt-0.5.3.tar.gz

New:
----
  physt-0.7.4.tar.gz
  physt-pr116-np2.patch

BETA DEBUG BEGIN:
  New:    warning)
- Unpin numpy 2: Add physt-pr116-np2.patch gh#janpipek/physt#116
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-physt.spec ++++++
--- /var/tmp/diff_new_pack.0KAHeW/_old  2024-09-02 13:13:53.760968989 +0200
+++ /var/tmp/diff_new_pack.0KAHeW/_new  2024-09-02 13:13:53.760968989 +0200
@@ -17,22 +17,25 @@
 
 
 Name:           python-physt
-Version:        0.5.3
+Version:        0.7.4
 Release:        0
 Summary:        Python histogram library
 License:        MIT
 URL:            https://github.com/janpipek/physt
 Source:         
https://github.com/janpipek/physt/archive/v%{version}.tar.gz#/physt-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM physt-pr116-np2.patch gh#janpipek/physt#116
+Patch0:         physt-pr116-np2.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-hypothesis >= 6.96.1
+Requires:       python-numpy >= 1.22
 Requires:       python-packaging
 Requires:       python-typing-extensions
-Requires:       (python-numpy >= 1.20 with python-numpy < 2)
-Recommends:     python-dask
+Recommends:     python-dask-array
 Recommends:     python-folium
 Recommends:     python-matplotlib
 Recommends:     python-pandas
@@ -43,11 +46,12 @@
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module dask-array}
+BuildRequires:  %{python_module hypothesis >= 6.96.1}
 BuildRequires:  %{python_module matplotlib}
-BuildRequires:  %{python_module numpy >= 1.20 with %python-numpy < 2}
+BuildRequires:  %{python_module numpy >= 1.22}
 BuildRequires:  %{python_module packaging}
 BuildRequires:  %{python_module pandas}
-BuildRequires:  %{python_module plotly if %python-base >= 3.10}
+BuildRequires:  %{python_module plotly}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module typing-extensions}
 # /SECTION
@@ -63,7 +67,7 @@
 options.
 
 %prep
-%setup -q -n physt-%{version}
+%autosetup -p1 -n physt-%{version}
 
 %build
 %pyproject_wheel
@@ -74,7 +78,8 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%pytest
+# no polars
+%pytest --ignore tests/compat/test_polars.py
 
 %files %{python_files}
 %doc README.md

++++++ physt-0.5.3.tar.gz -> physt-0.7.4.tar.gz ++++++
++++ 28880 lines of diff (skipped)

++++++ physt-pr116-np2.patch ++++++
>From 52b0de940dbfb21c8c2f4ca2570a89838f51345f Mon Sep 17 00:00:00 2001
From: Ben Greiner <c...@bnavigator.de>
Date: Fri, 30 Aug 2024 16:23:22 +0200
Subject: [PATCH 1/2] replace np.deprecate removed from numpy 2

---
 src/physt/helpers/__init__.py | 18 ++++++++++++++++++
 src/physt/histogram1d.py      | 11 ++++++-----
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/src/physt/helpers/__init__.py b/src/physt/helpers/__init__.py
index e69de29..50a6a25 100644
--- a/src/physt/helpers/__init__.py
+++ b/src/physt/helpers/__init__.py
@@ -0,0 +1,18 @@
+"""Helper functions"""
+from collections.abc import Callable
+import warnings
+
+class deprecate(object):
+    """Decorate a function to emit a DeprecationWarning."""
+
+    def __init__(self, message: str=""):
+        self.message = message
+    
+    def __call__(self, func: Callable) -> Callable: 
+        """Emit DeprecationWarning and call the funcion."""
+
+        def wrapped_func(*args, **kwargs):
+            warnings.warn(self.message, DeprecationWarning, stacklevel=2)
+            return func(*args, **kwargs)
+    
+        return wrapped_func
diff --git a/src/physt/histogram1d.py b/src/physt/histogram1d.py
index cd39a4f..9cbcae1 100644
--- a/src/physt/histogram1d.py
+++ b/src/physt/histogram1d.py
@@ -13,6 +13,7 @@
     extract_1d_array,
     extract_weights,
 )
+from physt.helpers import deprecate
 from physt.histogram_base import HistogramBase
 from physt.statistics import INVALID_STATISTICS, Statistics
 
@@ -322,23 +323,23 @@ def inner_missed(self):
     def inner_missed(self, value):
         self._missed[2] = value
 
-    @np.deprecate(message="Please use .statistics.mean instead.")
+    @deprecate(message="Please use .statistics.mean instead.")
     def mean(self) -> float:
         return self.statistics.mean()
 
-    @np.deprecate(message="Please use .statistics.min instead.")
+    @deprecate(message="Please use .statistics.min instead.")
     def min(self) -> float:
         return self.statistics.min
 
-    @np.deprecate(message="Please use .statistics.max instead.")
+    @deprecate(message="Please use .statistics.max instead.")
     def max(self) -> float:
         return self.statistics.max
 
-    @np.deprecate(message="Please use .statistics.std instead.")
+    @deprecate(message="Please use .statistics.std instead.")
     def std(self) -> float:  # , ddof=0):
         return self.statistics.std()
 
-    @np.deprecate(message="Please use .statistics.variance instead.")
+    @deprecate(message="Please use .statistics.variance instead.")
     def variance(self) -> float:  # , ddof: int = 0) -> float:
         return self.statistics.variance()
 

>From 37732fd0aa621b0eeeb1919685167696e8ba4f7b Mon Sep 17 00:00:00 2001
From: Ben Greiner <c...@bnavigator.de>
Date: Fri, 30 Aug 2024 16:27:06 +0200
Subject: [PATCH 2/2] unpin numpy <2

---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 0d2760c..0d698d3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,7 +16,7 @@ classifiers = [
     "Topic :: Software Development :: Libraries :: Python Modules",
 ]
 dependencies = [
-    "numpy>=1.22,<2.0",
+    "numpy>=1.22",
     "packaging",
     "typing_extensions",
     "hypothesis>=6.96.1",

Reply via email to