cloudpipe / cloudpipe/cloudpickle

Issues pickling sympy.Function('f')

Open
#190 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
1

Description

We have a test failure in our SymPy test suite from cloudpickle. I have bisected it to the cloudpickle commit https://github.com/cloudpipe/cloudpickle/commit/aec80d21ddff84cf2a83dce3cb5921a9f58ffd05

The failure is described at https://github.com/sympy/sympy/issues/15116

The basic failure is this:

```py
>>> import cloudpickle
>>> from sympy import Function
>>> f = Function('f')
>>> f1 = cloudpickle.loads(cloudpickle.dumps(f))
>>> f.__dict__['_prop_handler']
{'commutative': , 'negative': , 'positive': , 'complex': }
>>> f1.__dict__['_prop_handler']
{'commutative': , 'negative': , 'positive': , 'complex': }
>>> from sympy import Expr
>>> Expr._eval_is_negative

```

The SymPy test tests that all the attributes are the same, and fails because cloudpickle creates new instances of the Expr methods.

I'm not clear if this affects functionality or not.

CC @ssanderson

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.