Andres Riancho added the comment:

Well, closing this as wont-fix is far from ideal. +4 years have past from the 
last activity in this issue but people are still being hit by this issue.

In my case I'm not creating any special sub-class, I just use one of Python's 
built-in libs:

```python
import cPickle
import Cookie
 
c = Cookie.SimpleCookie()
c['abc'] = 'def'
 
unpickled_highest = cPickle.loads(cPickle.dumps(c, cPickle.HIGHEST_PROTOCOL))
unpickled_default = cPickle.loads(cPickle.dumps(c))
 
print "c['abc'].value                ", c['abc'].value
print "unpickled_default['abc'].value", unpickled_default['abc'].value
print "unpickled_highest['abc'].value", unpickled_highest['abc'].value
 
assert unpickled_default['abc'].value == c['abc'].value
assert unpickled_highest['abc'].value == c['abc'].value
```

I know there is a work-around (subclass SimpleCookie, override methods, etc.) 
but it's still going to be something that others will have to implement on 
their own, they are going to spend time debugging the issue until they reach 
this bug report, etc.

Batteries included should focus on cutting down development time, and this 
issue increases dev time by introducing strange/hidden limitations to pickle.

Is there any plan to actually fix this in the long term?

----------
nosy: +Andres.Riancho

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue826897>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to