This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Jeff Reback, belopolsky, serhiy.storchaka, yselivanov
Date 2016-11-18.12:04:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479470653.35.0.392676170557.issue28730@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-11-18 12:04:13serhiy.storchakasetrecipients: + serhiy.storchaka, belopolsky, yselivanov, Jeff Reback
2016-11-18 12:04:13serhiy.storchakasetmessageid: <1479470653.35.0.392676170557.issue28730@psf.upfronthosting.co.za>
2016-11-18 12:04:13serhiy.storchakalinkissue28730 messages
2016-11-18 12:04:12serhiy.storchakacreate