Closed GoogleCodeExporter closed 8 years ago
gmpy has never claimed it supports pickling, so this is not a defect, but an
"enhancement request" -- you want
extra features here, NOT a bug fix!
Thanks,
Alex
Original comment by alea...@gmail.com
on 4 Aug 2008 at 4:17
I agree, but I couldn't help that. All issues submitted by non-developers
automatically get labeled with "Defect".
Original comment by fredrik....@gmail.com
on 4 Aug 2008 at 4:26
Heh, you're right, sorry. So anyway, I suggest a trivial Python workaround if
you need to pickle gmpy.mpz's...:
import gmpy, copy_reg
def reducer(an_mpz): return (gmpy.mpz, (anmpz.binary(), 256))
copy_reg.pickle(type(gmpy.mpz(0)), reducer)
I'm inclined to close this issue but I'd like to check that you agree with me
that this fix is satisfactory...
Original comment by alea...@gmail.com
on 5 Aug 2008 at 2:12
I already have a similar workaround. If there is a simple way to support
pickling
without the need for any workarounds, it would be a nice feature, though. If
not, no
problem.
Original comment by fredrik....@gmail.com
on 5 Aug 2008 at 2:20
I could add that Python code to the other Python code that's hiding in gmpy
(and gets executed when you import
it) but while "simple" that's pretty dirty (and would slow down the import a
bit for everybody who's not doing
pickling -- presumably EVERY user of gmpy, since gmpy never supported
pickling). I'm also quite doubtful
whether this tiny "extra functionality" deserves a new release (with all the
hassles of building Windows and Mac
binaries).
Original comment by alea...@gmail.com
on 5 Aug 2008 at 2:35
Pickling works in the current svn trunk thanks to casevh.
Original comment by alea...@gmail.com
on 28 Oct 2008 at 2:20
Original issue reported on code.google.com by
fredrik....@gmail.com
on 29 Jul 2008 at 6:40