17
0

2 Commits

Author SHA256 Message Date
7faef1fac4 Accepting request 1316726 from devel:languages:python:numeric
- Update to 3.2.3:
  * Changes:
    + Changes how numpy is handled as an optional dependency. Now a
      NotImplementedError is raised indicating that the function can't be
      used because numpy couldn't be imported.
    + Refactors the implementation for the calculation of the derivatives
      of the power function and improves the corresponding testing.
  * Fixes:
    + Adds documentation for ufloat_fromstr behavior for strings which do
      not contain uncertainty.
    + Fixes typos in ufloat_fromstr docstring examples (#285)
    + Fixes a bug that resulted in a ZeroDivisionError while formatting
      very small numbers with uncertainty (#135)
- Add patch support-python314.patch:
  * Support Python 3.14 changes.

OBS-URL: https://build.opensuse.org/request/show/1316726
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-uncertainties?expand=0&rev=18
2025-11-10 18:16:32 +00:00
33bd4c4b76 - Update to 3.2.3:
* Changes:
    + Changes how numpy is handled as an optional dependency. Now a
      NotImplementedError is raised indicating that the function can't be
      used because numpy couldn't be imported.
    + Refactors the implementation for the calculation of the derivatives
      of the power function and improves the corresponding testing.
  * Fixes:
    + Adds documentation for ufloat_fromstr behavior for strings which do
      not contain uncertainty.
    + Fixes typos in ufloat_fromstr docstring examples (#285)
    + Fixes a bug that resulted in a ZeroDivisionError while formatting
      very small numbers with uncertainty (#135)
- Add patch support-python314.patch:
  * Support Python 3.14 changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-uncertainties?expand=0&rev=34
2025-11-10 02:58:16 +00:00
5 changed files with 57 additions and 5 deletions

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Mon Nov 10 02:56:04 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 3.2.3:
* Changes:
+ Changes how numpy is handled as an optional dependency. Now a
NotImplementedError is raised indicating that the function can't be
used because numpy couldn't be imported.
+ Refactors the implementation for the calculation of the derivatives
of the power function and improves the corresponding testing.
* Fixes:
+ Adds documentation for ufloat_fromstr behavior for strings which do
not contain uncertainty.
+ Fixes typos in ufloat_fromstr docstring examples (#285)
+ Fixes a bug that resulted in a ZeroDivisionError while formatting
very small numbers with uncertainty (#135)
- Add patch support-python314.patch:
* Support Python 3.14 changes.
-------------------------------------------------------------------
Thu Sep 5 09:45:43 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-uncertainties
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,12 +18,14 @@
%{?sle15_python_module_pythons}
Name: python-uncertainties
Version: 3.2.2
Version: 3.2.3
Release: 0
Summary: Uncertainties on the Quantities Involved (aka "Error Propagation")
License: BSD-3-Clause
URL: https://github.com/lebigot/uncertainties/
Source: https://files.pythonhosted.org/packages/source/u/uncertainties/uncertainties-%{version}.tar.gz
# PATCH-FIX-UPSTREAM Based on gh#lmfit/uncertainties#341
Patch0: support-python314.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip}

31
support-python314.patch Normal file
View File

@@ -0,0 +1,31 @@
From 2f184a480a073473cc8f5ab10cb016eaba3ba867 Mon Sep 17 00:00:00 2001
From: Will Shanks <wshaos@posteo.net>
Date: Sun, 7 Sep 2025 09:34:56 -0400
Subject: [PATCH 1/9] Update `log` exception test to work Python 3.14
---
tests/test_umath.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
Index: uncertainties-3.2.3/tests/test_umath.py
===================================================================
--- uncertainties-3.2.3.orig/tests/test_umath.py
+++ uncertainties-3.2.3/tests/test_umath.py
@@ -241,6 +241,17 @@ def test_math_module():
assert err_math_args == err_ufloat.args
else:
raise Exception("%s exception expected" % exception_class.__name__)
+
+ # Exception message is different for int and float so create the math
+ # exception for float rather than reusing the int one above
+ try:
+ math.log(0.0)
+ except Exception as err_math:
+ # Python 3 does not make exceptions local variables: they are
+ # restricted to their except block:
+ err_math_args = err_math.args
+ exception_class = err_math.__class__
+
try:
umath_core.log(ufloat(0, 0))
except exception_class as err_ufloat:

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e62c86fdc64429828229de6ab4e11466f114907e6bd343c077858994cc12e00b
size 143865

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76a5653e686f617a42922d546a239e9efce72e6b35411b7750a1d12dcba03031
size 160492