aio-libs / aio-libs/frozenlist

Release new version (with fixes for pickling)?

Abierto
#683 10 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
126
Forks
43
Merge medio
1 h 52 min
PR fusionados (30 d)
13

Descripción

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!

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.