imapclient
imapclient copied to clipboard
imapclient.fixed_offset.FixedOffset cannot be unpickled
With a pickled imapclient.fixed_offset.FixedOffset timezone with an offset of datetime.timedelta(0), unpickling raises an exception:
TypeError: __init__() missing 1 required positional argument: 'minutes'
I can work around this by adapting the timestamps returned for INTERNALDATE to use datetime.timezone instances instead of FixedOffset instances, but this shouldn't be necessary.
Bummer. It should be fairly straightforward to allow FixedOffset instances to be unpickled.
Additionally, when running on Python 3, IMAPClient should probably be using datetime.timezone instead of FixedOffset.