cloudpipe / cloudpipe/cloudpickle

Should cloudpickle.dumps fail when closing over something undefined?

Open
#161 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

```python
def f():
undefined_function() # this is not defined

import cloudpickle
cloudpickle.dumps(f) # maybe this should throw an exception.
```

The last line succeeds, but I wonder if it would be preferable to raise an exception instead (instead of waiting for it to fail in the corresponding call to `cloudpickle.loads`). Alternatively, is there a way for the caller to configure cloudpickle to raise an exception in the above situation? Or perhaps to detect such a situation?

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.