Here is the change on the call in offlineimap/repository/IMAP.py between those two versions:
I don't pretend it's a bug. It seems when providing a str instead of a byte as a return of the funciton called by
Configuration file offlineimaprc
pythonfile (if any)
Error occurring when using above config:
It seems it is thus expecting a str instead of bytes. Changing the function to something like that:
Steps to reproduce the error
Right. I've talked about that in the announce but this might require more explanations.
While on the road to py3 we need to think larger and Unicode is the way to proceed. This includes password encodings.
You're correct about the change of type (str). The expected encoding changes to Unicode. Adding
By chance, this should be easy to debug. We must have the exact same type and encoding after
however even by changing it explicitely to UTF-8 with
it still fails.
Here the entry in my python script:
and here's the error
If it's not unicode it fails in
interesting ... actually
It then however raises further issues due to encoding in other parts:
Sounds like that road to py3 and Unicode encoding involves some changes in the format of the config files / pythonfile ;-)
It does work with python2 and offllineimap 6.7.0-rc1
So, there is something wrong in this area. I still have no idea why it breaks, though.
Yes. I've already tried to open the config file in UTF-8 mode but this breaks py2 versions.
Does py2 and v7.0.2 work?
I can't reproduce your issue. It looks to work as expected here:
How does this goes with python 3.4.2?
The original issue was the following one:
The problem then was in
Then changing IMAP.py line from
With offlineimap 7.0.2 in py2.7, it works flawlessly.
Ok, I get it. There is a function expecting unicode while we provide bytes. We do this because with Py2, imaplib2 expects encoded strings. The current imaplib2 was not meant to work with Py3.