aio-libs / aio-libs/frozenlist

Release new version (with fixes for pickling)?

Open
#683 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
126
Forks
43
Avg merge
1h 52m
Merged PRs (30d)
13

Description

Hey folks,

Recent versions of frozenlist seem to not be pickleable. The latest version on pypi is 1.7.0:

```
In [1]: import frozenlist

In [2]: import pickle

In [3]: f = frozenlist.FrozenList([1,2])

In [4]: pickle.loads(pickle.dumps(f))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 pickle.loads(pickle.dumps(f))

File :2, in frozenlist._frozenlist.FrozenList.__reduce_cython__()

TypeError: self._frozen cannot be converted to a Python object for pickling

In [5]: frozenlist.__version__
Out[5]: '1.7.0'
```

.. so we fail to pickle on 1.7.0.

However on the latest git hash: d973b7a74488196b174df4d24ad15424900f8d43, it seems to work just fine:
```
In [1]: import pickle

In [2]: import frozenlist

In [3]: f = frozenlist.FrozenList([1,2])

In [4]: pickle.loads(pickle.dumps(f))
Out[4]:

In [5]: f.freeze()

In [6]: pickle.loads(pickle.dumps(f))
Out[6]:

In [7]: frozenlist.__version__
Out[7]: '1.7.1.dev0'
```

Can there be a new release to pypi that has this fixed? Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.