Serhiy Storchaka added the comment:

It seems to me that this is not documented. I'm even not sure that this change 
is compatible. Additional bit is saved only with protocol 4. The default 
protocol is 3, thus your should explicitly specify it. But protocol 4 is 
supported since 3.4. It seems to me that if you pickle the datetime object with 
the fold bit set with protocol 4, you could get invalid result when unpickle it 
in 3.4 and 3.5. Yet one doubtful detail is that the fold bit is added to the 
hour bit in datetime.time, but to the month field in datetime.datetime.

In any case __reduce_ex__ has the highest priority. After implementing it your 
can be sure that it would be used.

----------
nosy: +yselivanov

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

Reply via email to