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

Begining move to python3 #342

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

brechmos
Copy link

This is the beginnings of a switch to Python3. I am not an expert in moving code to Python3 :). One thing for someone to check is to make sure the conversion of StringIO makes sense.

@brechmos
Copy link
Author

The part that isn't working currently is in imap_utils.py:

class GIMAPFetcher(object): #pylint:disable=R0902,R0904
    '''
    IMAP Class reading the information
    '''
    GMAIL_EXTENSION     = b'X-GM-EXT-1'  # GMAIL capability
    GMAIL_ALL           = '[Gmail]/All Mail' #GMAIL All Mail mailbox

    GENERIC_GMAIL_ALL   = '\\AllMail' # unlocalised GMAIL ALL
    GENERIC_DRAFTS      = '\\Drafts' # unlocalised DRAFTS
    GENERIC_GMAIL_CHATS = gmvault_const.GMAIL_UNLOCAL_CHATS   # unlocalised Chats names

    FOLDER_NAMES        = ['ALLMAIL', 'CHATS', 'DRAFTS']

    GMAIL_ID            = 'X-GM-MSGID' #GMAIL ID attribute
    GMAIL_THREAD_ID     = 'X-GM-THRID'
    GMAIL_LABELS        = 'X-GM-LABELS'

    IMAP_INTERNALDATE = 'INTERNALDATE'
    IMAP_FLAGS        = 'FLAGS'
    IMAP_ALL          = {'type':'imap', 'req':'ALL'}

    EMAIL_BODY        = 'BODY[]'

    GMAIL_SPECIAL_DIRS = ['\\Inbox', '\\Starred', '\\Sent', '\\Draft', '\\Important']

    #GMAIL_SPECIAL_DIRS_LOWER = ['\\inbox', '\\starred', '\\sent', '\\draft', '\\important']
    GMAIL_SPECIAL_DIRS_LOWER = ['\\inbox', '\\starred', '\\sent', '\\draft', '\\important', '\\trash']

I believe there are issues with the representation of the names of the folders. Not sure if it should be b'Mail All' etc etc. I think there is an encoding issue (which should be easy to fix).

@txtsd
Copy link

txtsd commented Nov 30, 2020

Is this still being worked on?

@gene1wood
Copy link

How does this relate to #284 which also seeks to make gmvault work in Python 3?

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

Successfully merging this pull request may close these issues.

3 participants