Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Mathics for openSUSE:Factory 
checked in at 2025-02-05 17:33:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Mathics (Old)
 and      /work/SRC/openSUSE:Factory/.python-Mathics.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Mathics"

Wed Feb  5 17:33:33 2025 rev:21 rq:1243369 version:7.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Mathics/python-Mathics.changes    
2024-10-02 21:34:56.590269547 +0200
+++ /work/SRC/openSUSE:Factory/.python-Mathics.new.2316/python-Mathics.changes  
2025-02-05 17:33:37.643557780 +0100
@@ -1,0 +2,19 @@
+Sun Feb  2 12:44:43 UTC 2025 - Atri Bhattacharya <[email protected]>
+
+- Update to version 7.0.0:
+  * Long list of changes, see
+    <https://github.com/Mathics3/mathics-core/releases/tag/7.0.0>
+- Disable whole swathe of failing tests
+  (gh#Mathics3/mathics-core#1346).
+- Add python-Mathics-sympy1_13.patch -- Add compatibility for
+  tests against sympy >= 1.13 (upstream commits).
+- Drop python-Mathics-relax-numpy-versions.patch: upstreamed.
+- Switch to pyproject_* macros for build.
+- Require numpy < 2 as numpy2 is not supported yet.
+- BuildArch: noarch as there are no arch dependent binaries in
+  package.
+- Enable Python 3.11, 3.12.
+- Disable Python 3.13.
+- Drop old compatibility macro redefinition.
+
+-------------------------------------------------------------------

Old:
----
  Mathics3-6.0.4.tar.gz
  python-Mathics-relax-numpy-versions.patch

New:
----
  Mathics3-7.0.0.tar.gz
  python-Mathics-sympy1_13.patch

BETA DEBUG BEGIN:
  Old:  tests against sympy >= 1.13 (upstream commits).
- Drop python-Mathics-relax-numpy-versions.patch: upstreamed.
- Switch to pyproject_* macros for build.
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:  (gh#Mathics3/mathics-core#1346).
- Add python-Mathics-sympy1_13.patch -- Add compatibility for
  tests against sympy >= 1.13 (upstream commits).
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-Mathics.spec ++++++
--- /var/tmp/diff_new_pack.kV3TlB/_old  2025-02-05 17:33:39.059616357 +0100
+++ /var/tmp/diff_new_pack.kV3TlB/_new  2025-02-05 17:33:39.063616522 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Mathics
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,52 +26,47 @@
 %define psuffix %{nil}
 %endif
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-# Upstream no longer supports python2
-%define skip_python2 1
-# https://github.com/Mathics3/mathics-core/issues/743
-%define skip_python311 1
-# https://github.com/Mathics3/mathics-core/issues/932
-%define skip_python312 1
+%define skip_python313 1
 %define pyname Mathics3
 Name:           python-Mathics%{psuffix}
-Version:        6.0.4
+Version:        7.0.0
 Release:        0
 Summary:        A general-purpose computer algebra system
 # Mathics itself is licensed as GPL-3.0 but it includes third-party software 
with MIT, BSD-3-Clause, and Apache-2.0 Licensing; also includes data from 
wikipedia licensed under CC-BY-SA-3.0 and GFDL-1.3
 License:        Apache-2.0 AND BSD-3-Clause AND GPL-3.0-only AND MIT
 URL:            https://mathics.github.io/
 Source0:        
https://github.com/Mathics3/mathics-core/releases/download/%{version}/%{pyname}-%{version}.tar.gz
-# PATCH-FEATURE-OPENSUSE python-Mathics-relax-numpy-versions.patch 
[email protected] -- Drop upper limit on required numpy version
-Patch0:         python-Mathics-relax-numpy-versions.patch
+# PATCH-FIX-UPSTREAM python-Mathics-sympy1_13.patch [email protected] -- 
Add compatibility for tests against sympy >= 1.13
+Patch0:         python-Mathics-sympy1_13.patch
 BuildRequires:  %{python_module Django >= 1.8}
 BuildRequires:  %{python_module colorama}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module mpmath >= 0.19}
-BuildRequires:  %{python_module numpy}
+BuildRequires:  %{python_module numpy < 2}
 BuildRequires:  %{python_module pexpect}
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module python-dateutil}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module sympy >= 1.10.1}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-Django >= 1.8
 Requires:       python-Mathics-Scanner >= 1.3.0
 Requires:       python-Pint
 Requires:       python-llvmlite
 Requires:       python-mpmath >= 0.19
-Requires:       python-numpy
+Requires:       python-numpy < 2
 Requires:       python-palettable
 Requires:       python-python-dateutil
 Requires:       python-requests
 Requires:       python-sympy >= 1.10.1
 Requires:       (python-Pillow >= 9.2 if python-base >= 3.7)
 Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
 Recommends:     python-scikit-image >= 0.17
 %if %{with test}
 # SECTION For tests
-BuildRequires:  %{python_module Mathics}
+BuildRequires:  %{python_module Mathics = %{version}}
 BuildRequires:  %{python_module Mathics-Scanner >= 1.3.0}
 BuildRequires:  %{python_module Pillow >= 9.2 if %python-base >= 3.7}
 BuildRequires:  %{python_module Pint}
@@ -86,6 +81,7 @@
 # /SECTION
 %endif
 Provides:       python-Mathics3 = %{version}
+BuildArch:      noarch
 %python_subpackages
 
 %description
@@ -106,23 +102,34 @@
 %build
 %if %{without test}
 export USE_CYTHON=0
-%python_build
+%pyproject_wheel
 %endif
 
 %install
 %if %{without test}
 export USE_CYTHON=0
-%python_install
+%pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/mathics
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %endif
 
 %if %{with test}
 %check
-# Home page tests require django server up and running, test_gudermannian 
needs network access
-# test_image: https://github.com/Mathics3/mathics-core/issues/837
 PYTHONPATH+=:${PWD}
-%pytest -k 'not (test_home_page or test_gudermannian or test_image)'
+# test_gudermannian needs network access
+# test_image: https://github.com/Mathics3/mathics-core/issues/837
+DONTTEST='test_gudermannian or test_image'
+# A whole swathe of tests no longer work: 
https://github.com/Mathics3/mathics-core/issues/1346
+DONTTEST+=' or test_element or test_limit or test_private_doctests_'
+DONTTEST+=' or test_associations_private_doctests or test_ArcCos or test_add'
+DONTTEST+=' or test_set_and_clear or test_compare_many_members or 
test_cmp1_no_pass'
+DONTTEST+=' or test_makeboxes_ or test_returncode or 
test_predicates_private_doctests'
+if [ "%_lib" = "lib" ]; then
+  DONTTEST+=' or test_nintegrate or test_cli'
+fi
+export DONTTEST
+export USE_CYTHON=0
+%pytest -k "not (${DONTTEST})"
 %endif
 
 %if %{without test}
@@ -137,6 +144,6 @@
 %doc README.rst AUTHORS.txt
 %python_alternative %{_bindir}/mathics
 %{python_sitelib}/mathics/
-%{python_sitelib}/%{pyname}-%{version}-py%{python_version}.egg-info/
+%{python_sitelib}/%{pyname}-%{version}*.*-info/
 %endif
 

++++++ Mathics3-6.0.4.tar.gz -> Mathics3-7.0.0.tar.gz ++++++
++++ 58324 lines of diff (skipped)

++++++ python-Mathics-sympy1_13.patch ++++++
>From ef8a0ceeb213e5dd26a0dba8ec50b66c44c69c56 Mon Sep 17 00:00:00 2001
From: Juan Mauricio Matera <[email protected]>
Date: Tue, 20 Aug 2024 09:18:51 -0300
Subject: [PATCH] fix tests for sympy conversions (#1073)

This PR just fixes the pytest, and marks some issues in the conversion
of Lambda functions.

---------

Co-authored-by: rocky <[email protected]>
---
 mathics/core/symbols.py                |  4 +-
 test/core/test_sympy_python_convert.py | 71 +++++++++++++++++---------
 2 files changed, 49 insertions(+), 26 deletions(-)

Index: Mathics3-7.0.0/mathics/core/symbols.py
===================================================================
--- Mathics3-7.0.0.orig/mathics/core/symbols.py
+++ Mathics3-7.0.0/mathics/core/symbols.py
@@ -14,8 +14,8 @@ from mathics.core.element import (
 # I put this constants here instead of inside `mathics.core.convert.sympy`
 # to avoid a circular reference. Maybe they should be in its own module.
 
-sympy_symbol_prefix = "_Mathics_User_"
-sympy_slot_prefix = "_Mathics_Slot_"
+sympy_symbol_prefix = "_mu_"
+sympy_slot_prefix = "_ms_"
 
 
 # FIXME: This is repeated below
Index: Mathics3-7.0.0/test/core/test_sympy_python_convert.py
===================================================================
--- Mathics3-7.0.0.orig/test/core/test_sympy_python_convert.py
+++ Mathics3-7.0.0/test/core/test_sympy_python_convert.py
@@ -20,32 +20,39 @@ from mathics.core.convert.python import
 from mathics.core.convert.sympy import from_sympy
 from mathics.core.expression import Expression
 from mathics.core.list import ListExpression
-from mathics.core.symbols import Symbol, SymbolPlus
+from mathics.core.symbols import (
+    Symbol,
+    SymbolPlus,
+    sympy_slot_prefix,
+    sympy_symbol_prefix,
+)
 from mathics.core.systemsymbols import (
     SymbolD,
     SymbolDerivative,
+    SymbolFunction,
     SymbolGamma,
     SymbolIntegrate,
     SymbolSin,
+    SymbolSlot,
 )
 
 
 class SympyConvert(unittest.TestCase):
     def compare_to_sympy(self, mathics_expr, sympy_expr, **kwargs):
-        mathics_expr.to_sympy(**kwargs) == sympy_expr
+        assert mathics_expr.to_sympy(**kwargs) == sympy_expr
 
     def compare_to_mathics(self, mathics_expr, sympy_expr, **kwargs):
-        mathics_expr == from_sympy(sympy_expr, **kwargs)
+        assert mathics_expr == from_sympy(sympy_expr, **kwargs)
 
     def compare(self, mathics_expr, sympy_expr, **kwargs):
         self.compare_to_sympy(mathics_expr, sympy_expr, **kwargs)
         self.compare_to_mathics(mathics_expr, sympy_expr)
 
     def testSymbol(self):
-        self.compare(Symbol("Global`x"), 
sympy.Symbol("_Mathics_User_Global`x"))
+        self.compare(Symbol("Global`x"), 
sympy.Symbol(f"{sympy_symbol_prefix}Global`x"))
         self.compare(
             Symbol("_Mathics_User_x"),
-            sympy.Symbol("_Mathics_User_System`_Mathics_User_x"),
+            sympy.Symbol(f"{sympy_symbol_prefix}System`_Mathics_User_x"),
         )
 
     def testReal(self):
@@ -81,15 +88,15 @@ class SympyConvert(unittest.TestCase):
     def testAdd(self):
         self.compare(
             Expression(SymbolPlus, Integer1, Symbol("Global`x")),
-            sympy.Add(sympy.Integer(1), 
sympy.Symbol("_Mathics_User_Global`x")),
+            sympy.Add(sympy.Integer(1), 
sympy.Symbol(f"{sympy_symbol_prefix}Global`x")),
         )
 
     def testIntegrate(self):
         self.compare(
             Expression(SymbolIntegrate, Symbol("Global`x"), 
Symbol("Global`y")),
             sympy.Integral(
-                sympy.Symbol("_Mathics_User_Global`x"),
-                sympy.Symbol("_Mathics_User_Global`y"),
+                sympy.Symbol(f"{sympy_symbol_prefix}Global`x"),
+                sympy.Symbol(f"{sympy_symbol_prefix}Global`y"),
             ),
         )
 
@@ -97,8 +104,8 @@ class SympyConvert(unittest.TestCase):
         self.compare(
             Expression(SymbolD, Symbol("Global`x"), Symbol("Global`y")),
             sympy.Derivative(
-                sympy.Symbol("_Mathics_User_Global`x"),
-                sympy.Symbol("_Mathics_User_Global`y"),
+                sympy.Symbol(f"{sympy_symbol_prefix}Global`x"),
+                sympy.Symbol(f"{sympy_symbol_prefix}Global`y"),
             ),
         )
 
@@ -111,11 +118,13 @@ class SympyConvert(unittest.TestCase):
         )
         expr = Expression(head, Symbol("Global`x"), Symbol("Global`y"))
 
-        sfxy = sympy.Function(str("_Mathics_User_Global`f"))(
-            sympy.Symbol("_Mathics_User_Global`x"),
-            sympy.Symbol("_Mathics_User_Global`y"),
+        sfxy = sympy.Function(str(f"{sympy_symbol_prefix}Global`f"))(
+            sympy.Symbol(f"{sympy_symbol_prefix}Global`x"),
+            sympy.Symbol(f"{sympy_symbol_prefix}Global`y"),
+        )
+        sym_expr = sympy.Derivative(
+            sfxy, sympy.Symbol(f"{sympy_symbol_prefix}Global`x")
         )
-        sym_expr = sympy.Derivative(sfxy, 
sympy.Symbol("_Mathics_User_Global`x"))
 
         self.compare_to_sympy(expr, sym_expr, **kwargs)
         # compare_to_mathics fails because Derivative becomes D (which then 
evaluates to Derivative)
@@ -124,28 +133,28 @@ class SympyConvert(unittest.TestCase):
         kwargs = {"converted_functions": set(["Global`f"])}
 
         marg1 = Expression(Symbol("Global`f"), Symbol("Global`x"))
-        sarg1 = sympy.Function(str("_Mathics_User_Global`f"))(
-            sympy.Symbol("_Mathics_User_Global`x")
+        sarg1 = sympy.Function(str(f"{sympy_symbol_prefix}Global`f"))(
+            sympy.Symbol(f"{sympy_symbol_prefix}Global`x")
         )
         self.compare(marg1, sarg1, **kwargs)
 
         marg2 = Expression(Symbol("Global`f"), Symbol("Global`x"), 
Symbol("Global`y"))
-        sarg2 = sympy.Function(str("_Mathics_User_Global`f"))(
-            sympy.Symbol("_Mathics_User_Global`x"),
-            sympy.Symbol("_Mathics_User_Global`y"),
+        sarg2 = sympy.Function(str(f"{sympy_symbol_prefix}Global`f"))(
+            sympy.Symbol(f"{sympy_symbol_prefix}Global`x"),
+            sympy.Symbol(f"{sympy_symbol_prefix}Global`y"),
         )
         self.compare(marg2, sarg2, **kwargs)
 
         self.compare(
             Expression(SymbolD, marg2, Symbol("Global`x")),
-            sympy.Derivative(sarg2, sympy.Symbol("_Mathics_User_Global`x")),
+            sympy.Derivative(sarg2, 
sympy.Symbol(f"{sympy_symbol_prefix}Global`x")),
             **kwargs,
         )
 
     def testExpression(self):
         self.compare(
             Expression(SymbolSin, Symbol("Global`x")),
-            sympy.sin(sympy.Symbol("_Mathics_User_Global`x")),
+            sympy.sin(sympy.Symbol(f"{sympy_symbol_prefix}Global`x")),
         )
 
     def testConstant(self):
@@ -155,14 +164,28 @@ class SympyConvert(unittest.TestCase):
     def testGamma(self):
         self.compare(
             Expression(SymbolGamma, Symbol("Global`z")),
-            sympy.gamma(sympy.Symbol("_Mathics_User_Global`z")),
+            sympy.gamma(sympy.Symbol(f"{sympy_symbol_prefix}Global`z")),
         )
         self.compare(
             Expression(SymbolGamma, Symbol("Global`z"), Symbol("Global`x")),
             sympy.uppergamma(
-                sympy.Symbol("_Mathics_User_Global`z"),
-                sympy.Symbol("_Mathics_User_Global`x"),
+                sympy.Symbol(f"{sympy_symbol_prefix}Global`z"),
+                sympy.Symbol(f"{sympy_symbol_prefix}Global`x"),
+            ),
+        )
+
+    def testSlots(self):
+        """check the conversion of slots in anonymous functions."""
+        sympy_symbol = sympy.Symbol("x")
+        sympy_lambda_expr = sympy.Lambda(sympy_symbol, sympy_symbol + 1)
+        # compare_to_sympy does not pass because Slot[1] are translated as
+        # functions
+        self.compare_to_mathics(
+            Expression(
+                SymbolFunction,
+                Expression(SymbolPlus, Integer1, Expression(SymbolSlot, 
Integer1)),
             ),
+            sympy_lambda_expr,
         )
 
 
Index: 
Mathics3-7.0.0/mathics/builtin/testing_expressions/numerical_properties.py
===================================================================
--- 
Mathics3-7.0.0.orig/mathics/builtin/testing_expressions/numerical_properties.py
+++ Mathics3-7.0.0/mathics/builtin/testing_expressions/numerical_properties.py
@@ -42,8 +42,8 @@ class CoprimeQ(Builtin):
     ## CoprimeQ also works for complex numbers
     ## >> CoprimeQ[1+2I, 1-I]
     ## = True
-    
-    ## This test case is commenteted out because the result produced by sympy 
is wrong:
+
+    ## This test case is commented out because the result produced by sympy is 
wrong:
     ## In this case, both numbers can be factorized as 2 (2 + I)  and 3 (2 + 
I):
     ## >> CoprimeQ[4+2I, 6+3I]
     ## = False
Index: Mathics3-7.0.0/pyproject.toml
===================================================================
--- Mathics3-7.0.0.orig/pyproject.toml
+++ Mathics3-7.0.0/pyproject.toml
@@ -23,7 +23,7 @@ dependencies = [
     "python-dateutil",
     "requests",
     "setuptools",
-    "sympy>=1.11,<1.13",
+    "sympy>=1.11,<1.14",
 ]
 license = {text = "GPL"}
 name = "Mathics3"

Reply via email to