gutow/Algebra_with_Sympy

Support for sympy 1.13.0

Closed this issue · 3 comments

Hello @gutow ,

I noticed that this package doesn't work with sympy 1.13.0. Here is a traceback:

from algebra_with_sympy import Equation
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/davide/Documents/Development/envs/plot/lib/python3.12/site-packages/algebra_with_sympy/__init__.py", line 6, in <module>
    from algebra_with_sympy.algebraic_equation import *
  File "/home/davide/Documents/Development/envs/plot/lib/python3.12/site-packages/algebra_with_sympy/algebraic_equation.py", line 548, in <module>
    Eqn = Equation
          ^^^^^^^^
NameError: name 'Equation' is not defined

As I have to produce a modified version of Sympy to work properly with Algebra_with_Sympy, support for Sympy 1.13.X will wait until the bugfix version 1.13.1. If I can find time, I will work on new attempts to get the Equation class embedded in Sympy.

Algebra_with_Sympy uses a special version of Sympy: sympy-for-Algebra. The Equation class is embedded in the modified Sympy.

The proper way to import Algebra_with_Sympy is: from algebra_with_sympy import *, which then does an import * on the extended version of Sympy. If you want just the equation class it needs to be imported from sympy_for_algebra.

I will see if I can do a quick fix so that it provides a warning and does not try to import from generic sympy.

Latest version 1.1.X will not load if the version of sympy is incompatible and provides an explanation of how to get the compatible version.

gutow commented

Now using sympy-for-algebra 1.13.2, which is an extended version of sympy 1.13.2.