Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imapclient.fixed_offset.FixedOffset cannot be unpickled #388

Open
freddrake opened this issue Oct 3, 2019 · 1 comment
Open

imapclient.fixed_offset.FixedOffset cannot be unpickled #388

freddrake opened this issue Oct 3, 2019 · 1 comment
Milestone

Comments

@freddrake
Copy link

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.

@mjs
Copy link
Owner

mjs commented Oct 19, 2019

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.

@mjs mjs added this to the 3.1.0 milestone Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants