aio-libs / aio-libs/frozenlist
Release new version (with fixes for pickling)?
- Vorherrschende Sprache
- Python
- Sterne
- 126
- Forks
- 43
- Ø Merge
- 1 Std. 52 Min.
- Gemergte PRs (30 T.)
- 13
Beschreibung
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!
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.