This will help us improve support for memory management in a couple of future PRs. This current PR is intended to produce no user-detectable behavior changes.
BACKEND track pyproxy creation in python2js. This will help us improve support for memory management in a couple of future PRs. This current PR is intended to produce no user-detectable behavior changes.
from pyodide_build.testing import run_in_pyodide


@run_in_pyodide(packages=["sympy"])
def test_sympy():
    import sympy

    a, b = sympy.symbols("a,b")
    c = sympy.sqrt(a ** 2 + b ** 2)

    c.subs({a: 3, b: 4}) == 5

from pyodide_build.testing import run_in_pyodide


@run_in_pyodide(packages=["sympy"])
def test_sympy():
    import sympy

    a, b = sympy.symbols("a,b")
    c = sympy.sqrt(a ** 2 + b ** 2)

    c.subs({a: 3, b: 4}) == 5
