Caching functionality for performance improvement
authorPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Mon, 25 Jun 2012 15:17:57 +0000 (17:17 +0200)
committerPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Mon, 25 Jun 2012 15:52:10 +0000 (17:52 +0200)
caching_data.py [new file with mode: 0644]
date_interpreter.py
fix_imap_internaldate.py
mail_iterator.py
sample_performance_report.txt [new file with mode: 0644]

diff --git a/caching_data.py b/caching_data.py
new file mode 100644 (file)
index 0000000..ea3fb8c
--- /dev/null
@@ -0,0 +1,95 @@
+'''
+caching_data.py - The module contains the CachingData class.
+
+Copyright (c) 2012 Intra2net AG
+Author: Plamen Dimitrov
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+'''
+
+import pickle
+
+class CachingData:
+    """This class is responsible for the caching of data."""
+
+    def __init__(self):
+        try:
+            cachingfile = open('caching_data.pkl', 'rb')
+            self.data = pickle.load(cachingfile)
+            #print(len(self.data), "users found.")
+            self.save_flag = {}
+            for user in self.data:
+                self.save_flag[user] = {}
+                for uid_key in self.data[user]:
+                    self.save_flag[user][uid_key] = False
+        except IOError:
+            self.data = {}
+            self.save_flag = {}
+            with open('caching_data.pkl', 'wb') as cachingfile:
+                pickle.dump(self.data, cachingfile)
+
+    def __del__(self):
+        with open('caching_data.pkl', 'wb') as cachingfile:
+            # prepare data based on a save flag
+            for user in self.save_flag:
+                for uid_key in self.save_flag[user]:
+                    if(not self.save_flag[user][uid_key]):
+                        del self.data[user][uid_key]
+                        #print(uidvalidity, "deleted from cache.")
+                if(len(self.data[user])==0):
+                    del self.data[user]
+                    #print(user, "deleted from cache.")
+
+            # serialize in file
+            pickle.dump(self.data, cachingfile)
+
+        #print(len(self.data), "users stored.")
+    
+    def _cache_new_mailbox(self, username, uid_key):
+        """Store the mailbox as integer uidvalidity"""
+        if(username not in self.data):
+            self.data[username] = {}
+            self.save_flag[username] = {}
+            #print(username, "created.")
+        if(uid_key not in self.data[username]):
+            self.data[username][uid_key] = []
+            self.save_flag[username][uid_key] = False
+            #print(uid_key, "created.")
+        return
+
+    def sync_cached_mailbox(self, username, uid_key, list_ids):
+        """Adds new messages to the cache and returns a list of them.
+        Confirm the changes to a mailbox to finally save it."""
+        new_ids = []
+
+        if(username not in self.data or \
+           uid_key not in self.data[username]):
+            self._cache_new_mailbox(username, uid_key)
+            new_ids = list_ids
+        else:
+            for uid in list_ids:
+                try:
+                    self.data[username][uid_key].index(uid)
+                    #print("found", uid, uid_key)
+                except ValueError:
+                    #print("new", uid, uid_key)
+                    new_ids.append(uid)
+
+        # update cached_mailbox
+        self.data[username][uid_key] = list_ids
+
+        return new_ids
+
+    def commit_cached_mailbox(self, username, uid_key):
+        """Confirm the chages to the cached mailbox."""
+        self.save_flag[username][uid_key] = True
+        #print(username, uid_key, "committed.") 
+        return
index 083fa1a..b494df6 100644 (file)
@@ -98,6 +98,6 @@ class DateInterpreter:
         #print(date1, "<>", date2)
         timedelta = abs(date1 - date2)
         if(timedelta.total_seconds()>tolerance):
-            return 1
+            return True
         else:
-            return 0
+            return False
index 00e0f15..7aa0675 100644 (file)
@@ -25,6 +25,7 @@ import logging
 import configparser
 from date_interpreter import DateInterpreter
 from mail_iterator import MailIterator
+from caching_data import CachingData
 
 def main():
     """Iterates through csv list of users and their mailboxes"""
@@ -39,6 +40,8 @@ def main():
                         level=config.getint('basic_settings', 'log_level'))
 
     date_interp = DateInterpreter()
+    cashing_data = CachingData()
+    logging.warning(cashing_data)
     user_reader = csv.DictReader(open("userdata.csv", "r"), delimiter=',')
 
     server = config.get('basic_settings', 'imap_server')
@@ -53,12 +56,15 @@ def main():
             continue
         for mailbox in session:
             try:
-                #print(".")
+                #special key to ensure better mailbox uniqueness
+                mailbox_key = mailbox[0].strip('"') + mailbox[1]
                 mail_ids = session.fetch_messages()
+                new_ids = cashing_data.sync_cached_mailbox(user['username'], mailbox_key, mail_ids)
+                #print(len(new_ids), "new out of", len(mail_ids), "in", mailbox)
             except UserWarning as ex:
                 logging.error(ex)
                 continue
-            for mid in mail_ids:
+            for mid in new_ids:
                 try:
                     fetched_internal_date = session.fetch_internal_date(mid)
                     internal_date = date_interp.extract_internal_date(fetched_internal_date)
@@ -66,7 +72,7 @@ def main():
                     received_date = date_interp.extract_received_date(fetched_received_date)
                     if(received_date==""):
                         logging.warning("No received date could be found in message uid: %s - mailbox: %s - user: %s.\n",
-                                        mid.decode("utf-8"), mailbox.strip('"'), user['username'])
+                                        mid.decode("utf-8"), mailbox[0], user['username'])
                         continue
                 except UserWarning as ex:
                     logging.error(ex)
@@ -75,19 +81,22 @@ def main():
                     #print(received_date, internal_date)
                     if(test_mode==0):
                         try:
-                            session.update_message(mid, mailbox, received_date)
+                            session.update_message(mid, mailbox[0], received_date)
                         except UserWarning as ex:
                             logging.error(ex)
                             continue
                     else:
                         logging.info("Date conflict found in message uid: %s - mailbox: %s - user: %s.\nInternal date %s is different from received date %s from RECEIVED header:\n%s.",
-                                        mid.decode("utf-8"), mailbox.strip('"'), user['username'],
+                                        mid.decode("utf-8"), mailbox[0], user['username'],
                                         internal_date.strftime("%d %b %Y %H:%M:%S"),
                                         received_date.strftime("%d %b %Y %H:%M:%S"),
                                         fetched_received_date[0][1].decode("utf-8").split("Received:")[1])
-                    #count total emails for every user and mailbox
-                    mixed_key = user['username']+'|'+mailbox.strip('"')
-                    total_per_box[mixed_key] = 1 + total_per_box.get(mixed_key, 0)
+                    # count total emails for every user and mailbox
+                    user_key = user['username']+'|'+mailbox[0].strip('"')
+                    total_per_box[user_key] = 1 + total_per_box.get(user_key, 0)
+            # if all messages were successfully fixed confirm caching
+            cashing_data.commit_cached_mailbox(user['username'], mailbox_key)
+        # final report on date conflicts
         total_per_user = 0
         for warning in total_per_box:
             total_per_user += total_per_box[warning]
index b217f4a..1119945 100644 (file)
@@ -23,11 +23,11 @@ import imaplib
 import re
 import time
 
-LIST_RESP = re.compile(r'\((?P<flags>.*?)\) "(?P<delimiter>.*)" (?P<name>.*)')
+MAILBOX_RESP = re.compile(r'\((?P<flags>.*?)\) "(?P<delimiter>.*)" (?P<name>.*)')
+UIDVAL_RESP = re.compile(r'(?P<name>.*) \(UIDVALIDITY (?P<uidval>.*)\)')
 
 class MailIterator:
     """This class communicates with the e-mail server."""
-    mailboxes = []
 
     def __init__(self, server, username, password):
         """Creates a connection and a user session."""
@@ -45,12 +45,17 @@ class MailIterator:
         self.mail_con.logout()
 
     def __iter__(self):
-        """Iterates through the retrieved mailboxes."""
+        """Iterates through all mailboxes, returns (uidval,name)."""
         for mailbox in self.mailboxes:
-            mailbox = LIST_RESP.match(mailbox.decode("utf-8")).groups()
-            #print("Checking mailbox ", mailbox[2])
+            #print("Checking mailbox ", mailbox)
+            mailbox = MAILBOX_RESP.match(mailbox.decode("utf-8")).groups()
+            result, data = self.mail_con.status(mailbox[2], '(UIDVALIDITY)')
+            if(result!="OK"):
+                raise UserWarning("Could not retrieve mailbox uidvalidity.")
+            uidval = UIDVAL_RESP.match(data[0].decode("utf-8")).groups()
+            #print(data[0], uidval)
             self.mail_con.select(mailbox[2])
-            yield mailbox[2]
+            yield (mailbox[2], uidval[1])
 
     def fetch_messages(self):
         """Fetches the messages from the current mailbox, return list of uids."""
diff --git a/sample_performance_report.txt b/sample_performance_report.txt
new file mode 100644 (file)
index 0000000..8b80c4b
--- /dev/null
@@ -0,0 +1,1066 @@
+CACHING PERFORMANCE REPORT:
+---------------------------
+
+STATISTICS WITHOUT CACHING:
+
+64349556 function calls (64349003 primitive calls) in 1052.038 seconds
+
+   Ordered by: standard name
+
+   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
+        1    0.000    0.000    0.000    0.000 __init__.py:1001(_StderrHandler)
+        1    0.000    0.000    0.000    0.000 __init__.py:1007(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1025(PlaceHolder)
+        1    0.000    0.000    0.000    0.000 __init__.py:1069(Manager)
+        1    0.000    0.000    0.000    0.000 __init__.py:1074(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1177(Logger)
+        1    0.000    0.000    0.000    0.000 __init__.py:1192(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1204(setLevel)
+      135    0.001    0.000    0.042    0.000 __init__.py:1234(warning)
+      135    0.002    0.000    0.003    0.000 __init__.py:1298(findCaller)
+      135    0.001    0.000    0.009    0.000 __init__.py:1328(makeRecord)
+      135    0.001    0.000    0.040    0.000 __init__.py:1343(_log)
+      135    0.001    0.000    0.026    0.000 __init__.py:1366(handle)
+        1    0.000    0.000    0.000    0.000 __init__.py:1376(addHandler)
+      135    0.001    0.000    0.026    0.000 __init__.py:1420(callHandlers)
+      135    0.000    0.000    0.000    0.000 __init__.py:1450(getEffectiveLevel)
+      135    0.000    0.000    0.001    0.000 __init__.py:1464(isEnabledFor)
+      135    0.001    0.000    0.001    0.000 __init__.py:148(getLevelName)
+        1    0.000    0.000    0.000    0.000 __init__.py:1491(RootLogger)
+        1    0.000    0.000    0.000    0.000 __init__.py:1497(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1505(LoggerAdapter)
+        1    0.000    0.000    0.001    0.001 __init__.py:1625(basicConfig)
+      135    0.001    0.000    0.043    0.000 __init__.py:1735(warning)
+        4    0.000    0.000    0.000    0.000 __init__.py:177(_checkLevel)
+        1    0.000    0.000    0.000    0.000 __init__.py:1819(NullHandler)
+        4    0.000    0.000    0.000    0.000 __init__.py:206(_acquireLock)
+        4    0.000    0.000    0.000    0.000 __init__.py:215(_releaseLock)
+        1    0.000    0.000    0.000    0.000 __init__.py:226(LogRecord)
+      135    0.004    0.000    0.009    0.000 __init__.py:238(__init__)
+        1    0.035    0.035    0.037    0.037 __init__.py:24(<module>)
+      135    0.001    0.000    0.001    0.000 __init__.py:308(getMessage)
+        1    0.000    0.000    0.000    0.000 __init__.py:357(PercentStyle)
+        2    0.000    0.000    0.000    0.000 __init__.py:363(__init__)
+      135    0.000    0.000    0.001    0.000 __init__.py:366(usesTime)
+      135    0.001    0.000    0.001    0.000 __init__.py:369(format)
+        1    0.000    0.000    0.000    0.000 __init__.py:372(StrFormatStyle)
+        1    0.000    0.000    0.000    0.000 __init__.py:381(StringTemplateStyle)
+        1    0.000    0.000    0.000    0.000 __init__.py:403(Formatter)
+        1    0.000    0.000    0.000    0.000 __init__.py:42(normalize_encoding)
+        2    0.000    0.000    0.000    0.000 __init__.py:447(__init__)
+      135    0.001    0.000    0.003    0.000 __init__.py:469(formatTime)
+      135    0.000    0.000    0.001    0.000 __init__.py:514(usesTime)
+      135    0.000    0.000    0.001    0.000 __init__.py:520(formatMessage)
+      135    0.001    0.000    0.007    0.000 __init__.py:536(format)
+        1    0.000    0.000    0.000    0.000 __init__.py:573(BufferingFormatter)
+        1    0.000    0.000    0.000    0.000 __init__.py:615(Filter)
+        1    0.000    0.000    0.000    0.000 __init__.py:652(Filterer)
+        3    0.000    0.000    0.000    0.000 __init__.py:657(__init__)
+      270    0.001    0.000    0.001    0.000 __init__.py:677(filter)
+        1    0.000    0.000    0.032    0.032 __init__.py:69(search_function)
+        2    0.000    0.000    0.000    0.000 __init__.py:722(_addHandlerRef)
+        1    0.000    0.000    0.000    0.000 __init__.py:732(Handler)
+        2    0.000    0.000    0.000    0.000 __init__.py:741(__init__)
+      135    0.000    0.000    0.001    0.000 __init__.py:76(<lambda>)
+        2    0.000    0.000    0.000    0.000 __init__.py:770(createLock)
+      135    0.000    0.000    0.000    0.000 __init__.py:779(acquire)
+      135    0.000    0.000    0.000    0.000 __init__.py:786(release)
+      135    0.000    0.000    0.007    0.000 __init__.py:799(format)
+      135    0.001    0.000    0.025    0.000 __init__.py:822(handle)
+        1    0.000    0.000    0.000    0.000 __init__.py:840(setFormatter)
+        1    0.000    0.000    0.000    0.000 __init__.py:896(StreamHandler)
+        1    0.000    0.000    0.000    0.000 __init__.py:905(__init__)
+      135    0.000    0.000    0.014    0.000 __init__.py:916(flush)
+      135    0.001    0.000    0.022    0.000 __init__.py:923(emit)
+        1    0.000    0.000    0.000    0.000 __init__.py:945(FileHandler)
+        1    0.000    0.000    0.001    0.001 __init__.py:949(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:979(_open)
+      135    0.000    0.000    0.023    0.000 __init__.py:990(emit)
+        3    0.000    0.000    0.000    0.000 _abcoll.py:374(items)
+        3    0.000    0.000    0.000    0.000 _abcoll.py:391(__init__)
+        7    0.000    0.000    0.000    0.000 _abcoll.py:432(__iter__)
+        4    0.000    0.000    0.000    0.000 _abcoll.py:493(update)
+        1    0.000    0.000    0.000    0.000 _compat_pickle.py:8(<module>)
+       52    0.000    0.000    0.000    0.000 _compat_pickle.py:80(<genexpr>)
+       11    0.000    0.000    0.000    0.000 _compat_pickle.py:81(<genexpr>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:100(<listcomp>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:101(<listcomp>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:105(__calc_am_pm)
+        1    0.000    0.000    0.000    0.000 _strptime.py:117(__calc_date_time)
+        1    0.013    0.013    0.016    0.016 _strptime.py:12(<module>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:138(<listcomp>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:162(__calc_timezone)
+        1    0.000    0.000    0.000    0.000 _strptime.py:178(TimeRE)
+        1    0.000    0.000    0.003    0.003 _strptime.py:181(__init__)
+        5    0.000    0.000    0.000    0.000 _strptime.py:215(<genexpr>)
+        6    0.000    0.000    0.001    0.000 _strptime.py:224(__seqToRE)
+       50    0.000    0.000    0.000    0.000 _strptime.py:239(<genexpr>)
+        4    0.000    0.000    0.002    0.000 _strptime.py:243(pattern)
+        1    0.000    0.000    0.002    0.002 _strptime.py:266(compile)
+   301750    0.739    0.000    6.261    0.000 _strptime.py:29(_getlang)
+   301748    8.749    0.000   19.785    0.000 _strptime.py:298(_strptime)
+        1    0.000    0.000    0.000    0.000 _strptime.py:33(LocaleTime)
+   301748    1.708    0.000   21.493    0.000 _strptime.py:485(_strptime_datetime)
+        1    0.000    0.000    0.001    0.001 _strptime.py:52(__init__)
+        1    0.000    0.000    0.000    0.000 _strptime.py:90(__calc_weekday)
+        1    0.000    0.000    0.000    0.000 _strptime.py:93(<listcomp>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:94(<listcomp>)
+        1    0.000    0.000    0.000    0.000 _strptime.py:98(__calc_month)
+       16    0.000    0.000    0.000    0.000 _weakrefset.py:36(__init__)
+        8    0.000    0.000    0.000    0.000 _weakrefset.py:68(__contains__)
+        1    0.000    0.000    0.000    0.000 _weakrefset.py:79(add)
+        5    0.000    0.000    0.000    0.000 abc.py:116(__new__)
+        5    0.000    0.000    0.000    0.000 abc.py:119(<setcomp>)
+        4    0.000    0.000    0.000    0.000 abc.py:158(__instancecheck__)
+        1    0.000    0.000    0.000    0.000 base64.py:148(<listcomp>)
+        1    0.000    0.000    0.000    0.000 base64.py:149(<listcomp>)
+        1    0.000    0.000    0.000    0.000 base64.py:3(<module>)
+        1    0.000    0.000    0.000    0.000 calendar.py:126(Calendar)
+        1    0.000    0.000    0.000    0.000 calendar.py:132(__init__)
+        1    0.000    0.000    0.000    0.000 calendar.py:138(setfirstweekday)
+        1    0.000    0.000    0.000    0.000 calendar.py:21(IllegalMonthError)
+        1    0.000    0.000    0.000    0.000 calendar.py:255(TextCalendar)
+        1    0.000    0.000    0.000    0.000 calendar.py:28(IllegalWeekdayError)
+        1    0.000    0.000    0.000    0.000 calendar.py:372(HTMLCalendar)
+        1    0.000    0.000    0.000    0.000 calendar.py:47(_localized_month)
+        1    0.000    0.000    0.000    0.000 calendar.py:484(different_locale)
+        1    0.000    0.000    0.000    0.000 calendar.py:49(<listcomp>)
+        1    0.000    0.000    0.000    0.000 calendar.py:496(LocaleTextCalendar)
+        2    0.000    0.000    0.000    0.000 calendar.py:50(<lambda>)
+        2    0.000    0.000    0.000    0.000 calendar.py:52(__init__)
+        1    0.000    0.000    0.000    0.000 calendar.py:527(LocaleHTMLCalendar)
+       26    0.000    0.000    0.000    0.000 calendar.py:55(__getitem__)
+        1    0.000    0.000    0.000    0.000 calendar.py:6(<module>)
+        1    0.000    0.000    0.000    0.000 calendar.py:66(_localized_day)
+        1    0.000    0.000    0.000    0.000 calendar.py:69(<listcomp>)
+        2    0.000    0.000    0.000    0.000 calendar.py:71(__init__)
+       14    0.000    0.000    0.000    0.000 calendar.py:74(__getitem__)
+        1    0.000    0.000    0.000    0.000 cashing_data.py:16(<module>)
+        1    0.000    0.000    0.000    0.000 cashing_data.py:20(CashingData)
+        1    0.001    0.001    0.004    0.004 cashing_data.py:23(__init__)
+        1    0.316    0.316    0.412    0.412 cashing_data.py:39(__del__)
+       47    0.000    0.000    0.000    0.000 cashing_data.py:56(_cache_new_mailbox)
+       47    0.000    0.000    0.000    0.000 cashing_data.py:68(sync_cached_mailbox)
+       47    0.000    0.000    0.000    0.000 cashing_data.py:91(commit_cached_mailbox)
+        1    0.000    0.000    0.000    0.000 codecs.py:164(__init__)
+        1    0.000    0.000    0.000    0.000 codecs.py:192(setstate)
+        2    0.000    0.000    0.000    0.000 codecs.py:238(__init__)
+        2    0.000    0.000    0.000    0.000 codecs.py:287(__init__)
+        4    0.000    0.000    0.000    0.000 codecs.py:297(decode)
+        1    0.000    0.000    0.000    0.000 codecs.py:77(__new__)
+      101    0.000    0.000    0.000    0.000 collections.py:130(move_to_end)
+        4    0.000    0.000    0.000    0.000 collections.py:40(__init__)
+       37    0.000    0.000    0.000    0.000 collections.py:57(__setitem__)
+        3    0.000    0.000    0.000    0.000 collections.py:695(__init__)
+        3    0.000    0.000    0.000    0.000 collections.py:705(__getitem__)
+        7    0.000    0.000    0.000    0.000 collections.py:82(__iter__)
+        1    0.000    0.000    0.000    0.000 configparser.py:1084(_join_multiline_values)
+        3    0.000    0.000    0.000    0.000 configparser.py:1102(_unify_values)
+        1    0.000    0.000    0.000    0.000 configparser.py:1151(ConfigParser)
+        1    0.000    0.000    0.000    0.000 configparser.py:1170(SafeConfigParser)
+        1    0.000    0.000    0.000    0.000 configparser.py:1183(SectionProxy)
+        2    0.000    0.000    0.000    0.000 configparser.py:1186(__init__)
+        1    0.000    0.000    0.012    0.012 configparser.py:120(<module>)
+        1    0.000    0.000    0.000    0.000 configparser.py:144(Error)
+        1    0.000    0.000    0.000    0.000 configparser.py:174(NoSectionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:183(DuplicateSectionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:209(DuplicateOptionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:236(NoOptionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:247(InterpolationError)
+        1    0.000    0.000    0.000    0.000 configparser.py:257(InterpolationMissingOptionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:272(InterpolationSyntaxError)
+        1    0.000    0.000    0.000    0.000 configparser.py:280(InterpolationDepthError)
+        1    0.000    0.000    0.000    0.000 configparser.py:293(ParsingError)
+        1    0.000    0.000    0.000    0.000 configparser.py:336(MissingSectionHeaderError)
+        1    0.000    0.000    0.000    0.000 configparser.py:356(Interpolation)
+        3    0.000    0.000    0.000    0.000 configparser.py:359(before_get)
+        3    0.000    0.000    0.000    0.000 configparser.py:365(before_read)
+        1    0.000    0.000    0.001    0.001 configparser.py:372(BasicInterpolation)
+        1    0.000    0.000    0.000    0.000 configparser.py:443(ExtendedInterpolation)
+        1    0.000    0.000    0.001    0.001 configparser.py:516(LegacyInterpolation)
+        1    0.000    0.000    0.010    0.010 configparser.py:554(RawConfigParser)
+        1    0.000    0.000    0.000    0.000 configparser.py:595(__init__)
+        1    0.000    0.000    0.001    0.001 configparser.py:671(read)
+        3    0.000    0.000    0.000    0.000 configparser.py:755(get)
+        2    0.000    0.000    0.000    0.000 configparser.py:792(_get)
+        2    0.000    0.000    0.000    0.000 configparser.py:795(getint)
+        6    0.000    0.000    0.000    0.000 configparser.py:855(optionxform)
+        1    0.000    0.000    0.000    0.000 configparser.py:970(_read)
+        2    0.000    0.000    0.001    0.000 csv.py:106(__next__)
+        1    0.000    0.000    0.000    0.000 csv.py:129(DictWriter)
+        1    0.000    0.000    0.000    0.000 csv.py:167(Sniffer)
+        1    0.000    0.000    0.000    0.000 csv.py:22(Dialect)
+        1    0.005    0.005    0.006    0.006 csv.py:4(<module>)
+        1    0.000    0.000    0.000    0.000 csv.py:53(excel)
+        1    0.000    0.000    0.000    0.000 csv.py:63(excel_tab)
+        1    0.000    0.000    0.000    0.000 csv.py:68(unix_dialect)
+        1    0.000    0.000    0.000    0.000 csv.py:79(DictReader)
+        1    0.000    0.000    0.000    0.000 csv.py:80(__init__)
+        1    0.000    0.000    0.000    0.000 csv.py:89(__iter__)
+        3    0.000    0.000    0.000    0.000 csv.py:92(fieldnames)
+        1    0.024    0.024    0.049    0.049 date_interpreter.py:20(<module>)
+        1    0.000    0.000    0.000    0.000 date_interpreter.py:35(DateInterpreter)
+        1    0.000    0.000    0.000    0.000 date_interpreter.py:38(__init__)
+   301881    0.959    0.000    3.873    0.000 date_interpreter.py:41(extract_internal_date)
+   301881   10.289    0.000  123.908    0.000 date_interpreter.py:46(extract_received_date)
+   301748    1.135    0.000    1.791    0.000 date_interpreter.py:94(compare_dates)
+        2    0.000    0.000    0.000    0.000 datetime.py:1017(__new__)
+        1    0.000    0.000    0.000    0.000 datetime.py:1302(datetime)
+        2    0.000    0.000    0.000    0.000 datetime.py:1312(__new__)
+        1    0.013    0.013    0.014    0.014 datetime.py:17(<module>)
+        1    0.000    0.000    0.000    0.000 datetime.py:1786(timezone)
+        3    0.000    0.000    0.000    0.000 datetime.py:1810(_create)
+        4    0.000    0.000    0.000    0.000 datetime.py:267(_check_date_fields)
+        4    0.000    0.000    0.000    0.000 datetime.py:278(_check_time_fields)
+        4    0.000    0.000    0.000    0.000 datetime.py:290(_check_tzinfo_arg)
+        1    0.000    0.000    0.000    0.000 datetime.py:298(timedelta)
+        9    0.000    0.000    0.001    0.000 datetime.py:317(__new__)
+        1    0.000    0.000    0.000    0.000 datetime.py:500(__neg__)
+        3    0.000    0.000    0.000    0.000 datetime.py:51(_days_before_year)
+        4    0.000    0.000    0.000    0.000 datetime.py:56(_days_in_month)
+        1    0.000    0.000    0.000    0.000 datetime.py:631(date)
+        4    0.000    0.000    0.000    0.000 datetime.py:661(__new__)
+        1    0.000    0.000    0.000    0.000 datetime.py:924(tzinfo)
+        1    0.000    0.000    0.000    0.000 datetime.py:993(time)
+        1    0.000    0.000    0.001    0.001 fix_imap_internaldate.py:108(load_configuration)
+        1    0.070    0.070 1052.038 1052.038 fix_imap_internaldate.py:20(<module>)
+        1    4.227    4.227 1050.771 1050.771 fix_imap_internaldate.py:30(main)
+      129    0.001    0.000    0.053    0.000 functools.py:170(wrapper)
+      135    0.001    0.000    0.001    0.000 genericpath.py:85(_splitext)
+        1    0.008    0.008    0.008    0.008 hashlib.py:53(<module>)
+        6    0.000    0.000    0.000    0.000 hashlib.py:94(__get_openssl_constructor)
+        1    0.000    0.000    0.000    0.000 idna.py:146(Codec)
+        2    0.000    0.000    0.000    0.000 idna.py:147(encode)
+        1    0.000    0.000    0.000    0.000 idna.py:196(IncrementalEncoder)
+        1    0.000    0.000    0.000    0.000 idna.py:231(IncrementalDecoder)
+        1    0.000    0.000    0.000    0.000 idna.py:270(StreamWriter)
+        1    0.000    0.000    0.000    0.000 idna.py:273(StreamReader)
+        1    0.000    0.000    0.000    0.000 idna.py:278(getregentry)
+        1    0.010    0.010    0.029    0.029 idna.py:3(<module>)
+        7    0.000    0.000    0.000    0.000 idna.py:62(ToASCII)
+   603908    3.232    0.000  833.897    0.001 imaplib.py:1050(_get_tagged_response)
+        1    0.000    0.000    0.000    0.000 imaplib.py:107(IMAP4)
+  1510072   13.473    0.000  781.901    0.001 imaplib.py:1072(_get_line)
+  3926639    8.919    0.000   17.622    0.000 imaplib.py:1091(_match)
+        1    0.052    0.052    0.157    0.157 imaplib.py:11(<module>)
+   603908    3.824    0.000    3.824    0.000 imaplib.py:1103(_new_tag)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1111(_quote)
+   603908    2.429    0.000  890.173    0.001 imaplib.py:1119(_simple_command)
+   603858    1.824    0.000    2.359    0.000 imaplib.py:1124(_untagged_response)
+  2113980    8.619    0.000   11.107    0.000 imaplib.py:1153(_log)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1176(IMAP4_SSL)
+        1    0.000    0.000    0.114    0.114 imaplib.py:1191(__init__)
+        1    0.000    0.000    0.073    0.073 imaplib.py:1196(_create_socket)
+        1    0.000    0.000    0.073    0.073 imaplib.py:1200(open)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1211(IMAP4_stream)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1267(_Authenticator)
+   301881    8.513    0.000   17.287    0.000 imaplib.py:1314(Internaldate2tuple)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1359(Int2AP)
+        1    0.000    0.000    0.000    0.000 imaplib.py:153(error)
+        1    0.000    0.000    0.000    0.000 imaplib.py:154(abort)
+        1    0.000    0.000    0.000    0.000 imaplib.py:155(readonly)
+        1    0.000    0.000    0.114    0.114 imaplib.py:157(__init__)
+        1    0.000    0.000    0.041    0.041 imaplib.py:182(_connect)
+        1    0.000    0.000    0.034    0.034 imaplib.py:235(_create_socket)
+        1    0.000    0.000    0.073    0.073 imaplib.py:238(open)
+   301881    2.303    0.000    4.942    0.000 imaplib.py:250(read)
+  1510072    2.630    0.000  758.640    0.001 imaplib.py:263(readline)
+   603908    1.442    0.000   26.567    0.000 imaplib.py:268(send)
+        1    0.000    0.000    0.000    0.000 imaplib.py:273(shutdown)
+        1    0.000    0.000    0.001    0.001 imaplib.py:381(capability)
+        1    0.000    0.000    0.503    0.503 imaplib.py:398(close)
+        1    0.000    0.000    0.004    0.004 imaplib.py:511(list)
+        1    0.000    0.000    0.001    0.001 imaplib.py:523(login)
+        1    0.000    0.000    0.001    0.001 imaplib.py:552(logout)
+       47    0.000    0.000    2.953    0.063 imaplib.py:656(select)
+       47    0.000    0.000    0.118    0.003 imaplib.py:751(status)
+   603809    4.002    0.000  893.499    0.001 imaplib.py:792(uid)
+   906449    2.102    0.000    2.383    0.000 imaplib.py:847(_append_untagged)
+  1207814    2.410    0.000    3.381    0.000 imaplib.py:861(_check_bye)
+   603908   11.404    0.000   46.967    0.000 imaplib.py:867(_command)
+   603908    3.500    0.000  840.777    0.001 imaplib.py:944(_command_complete)
+        1    0.000    0.000    0.001    0.001 imaplib.py:961(_get_capabilities)
+  1208191   19.106    0.000  830.703    0.001 imaplib.py:970(_get_response)
+   301750    2.111    0.000    3.297    0.000 locale.py:339(normalize)
+   301750    0.674    0.000    3.971    0.000 locale.py:405(_parse_localename)
+   301750    0.900    0.000    5.522    0.000 locale.py:508(getlocale)
+        9    0.000    0.000    0.000    0.000 locale.py:526(setlocale)
+        3    0.000    0.000    0.000    0.000 locale.py:574(getpreferredencoding)
+        1    0.018    0.018    0.177    0.177 mail_iterator.py:20(<module>)
+        1    0.000    0.000    0.000    0.000 mail_iterator.py:29(MailIterator)
+        1    0.000    0.000    0.120    0.120 mail_iterator.py:32(__init__)
+        1    0.000    0.000    0.504    0.504 mail_iterator.py:42(__del__)
+       48    0.001    0.000    3.072    0.064 mail_iterator.py:47(__iter__)
+       47    0.000    0.000    0.327    0.007 mail_iterator.py:60(fetch_messages)
+   301881    1.842    0.000  369.425    0.001 mail_iterator.py:69(fetch_internal_date)
+   301881    1.076    0.000  543.976    0.002 mail_iterator.py:77(fetch_received_date)
+        1    0.000    0.000    0.000    0.000 os.py:35(_get_exports_list)
+        1    0.000    0.000    0.000    0.000 os.py:39(<listcomp>)
+        1    0.000    0.000    0.002    0.002 pickle.py:173(<listcomp>)
+        1    0.000    0.000    0.000    0.000 pickle.py:177(_Pickler)
+        1    0.012    0.012    0.014    0.014 pickle.py:24(<module>)
+        1    0.000    0.000    0.000    0.000 pickle.py:68(PickleError)
+        1    0.000    0.000    0.000    0.000 pickle.py:72(PicklingError)
+        1    0.000    0.000    0.000    0.000 pickle.py:781(_Unpickler)
+        1    0.000    0.000    0.000    0.000 pickle.py:79(UnpicklingError)
+        1    0.000    0.000    0.000    0.000 pickle.py:92(_Stop)
+      135    0.001    0.000    0.002    0.000 posixpath.py:108(splitext)
+      135    0.001    0.000    0.001    0.000 posixpath.py:129(basename)
+        1    0.000    0.000    0.000    0.000 posixpath.py:330(normpath)
+        1    0.000    0.000    0.000    0.000 posixpath.py:367(abspath)
+      137    0.000    0.000    0.000    0.000 posixpath.py:38(_get_sep)
+      271    0.001    0.000    0.001    0.000 posixpath.py:49(normcase)
+        1    0.000    0.000    0.000    0.000 posixpath.py:61(isabs)
+        1    0.000    0.000    0.000    0.000 posixpath.py:71(join)
+        1    0.000    0.000    0.000    0.000 random.py:165(randrange)
+        1    0.000    0.000    0.000    0.000 random.py:210(randint)
+        1    0.000    0.000    0.000    0.000 random.py:216(_randbelow)
+        1    0.013    0.013    0.021    0.021 random.py:37(<module>)
+        1    0.000    0.000    0.000    0.000 random.py:625(SystemRandom)
+        1    0.000    0.000    0.000    0.000 random.py:68(Random)
+        1    0.000    0.000    0.000    0.000 random.py:84(__init__)
+        1    0.000    0.000    0.000    0.000 random.py:93(seed)
+       90    0.000    0.000    0.002    0.000 re.py:150(match)
+       31    0.000    0.000    0.052    0.002 re.py:204(compile)
+       44    0.000    0.000    0.000    0.000 re.py:222(escape)
+      121    0.000    0.000    0.053    0.000 re.py:254(_compile)
+       26    0.000    0.000    0.052    0.002 re.py:257(_compile_typed)
+        2    0.000    0.000    0.000    0.000 re.py:269(_compile_repl)
+        8    0.000    0.000    0.000    0.000 re.py:279(_subx)
+        1    0.000    0.000    0.000    0.000 socket.py:141(makefile)
+        1    0.000    0.000    0.000    0.000 socket.py:184(_decref_socketios)
+        2    0.000    0.000    0.000    0.000 socket.py:190(_real_close)
+        1    0.000    0.000    0.000    0.000 socket.py:194(close)
+        1    0.000    0.000    0.000    0.000 socket.py:233(SocketIO)
+        1    0.000    0.000    0.000    0.000 socket.py:250(__init__)
+   604301    2.811    0.000  746.842    0.001 socket.py:262(readinto)
+   604302    1.458    0.000    1.458    0.000 socket.py:304(readable)
+        1    0.000    0.000    0.000    0.000 socket.py:331(close)
+        1    0.000    0.000    0.034    0.034 socket.py:370(create_connection)
+        1    0.006    0.006    0.006    0.006 socket.py:44(<module>)
+        1    0.000    0.000    0.000    0.000 socket.py:87(socket)
+        2    0.000    0.000    0.000    0.000 socket.py:93(__init__)
+       92    0.001    0.000    0.017    0.000 sre_compile.py:178(_compile_charset)
+       92    0.004    0.000    0.016    0.000 sre_compile.py:207(_optimize_charset)
+      344    0.000    0.000    0.000    0.000 sre_compile.py:24(_identityfunction)
+       10    0.001    0.000    0.001    0.000 sre_compile.py:258(_mk_bitmap)
+        2    0.009    0.004    0.012    0.006 sre_compile.py:301(_optimize_unicode)
+   168/26    0.003    0.000    0.013    0.000 sre_compile.py:32(_compile)
+       51    0.000    0.000    0.000    0.000 sre_compile.py:355(_simple)
+       26    0.000    0.000    0.011    0.000 sre_compile.py:362(_compile_info)
+       52    0.000    0.000    0.000    0.000 sre_compile.py:468(isstring)
+       26    0.000    0.000    0.024    0.001 sre_compile.py:471(_code)
+       26    0.000    0.000    0.052    0.002 sre_compile.py:486(compile)
+      208    0.000    0.000    0.000    0.000 sre_parse.py:127(__len__)
+      609    0.001    0.000    0.002    0.000 sre_parse.py:131(__getitem__)
+       51    0.000    0.000    0.000    0.000 sre_parse.py:135(__setitem__)
+      326    0.001    0.000    0.001    0.000 sre_parse.py:139(append)
+   219/77    0.001    0.000    0.002    0.000 sre_parse.py:141(getwidth)
+       28    0.000    0.000    0.000    0.000 sre_parse.py:179(__init__)
+     2155    0.009    0.000    0.013    0.000 sre_parse.py:183(__next)
+      648    0.001    0.000    0.003    0.000 sre_parse.py:202(match)
+     1827    0.003    0.000    0.014    0.000 sre_parse.py:208(get)
+        5    0.000    0.000    0.000    0.000 sre_parse.py:212(tell)
+        1    0.000    0.000    0.000    0.000 sre_parse.py:214(seek)
+      184    0.000    0.000    0.000    0.000 sre_parse.py:217(isident)
+        1    0.000    0.000    0.000    0.000 sre_parse.py:220(isdigit)
+       44    0.000    0.000    0.000    0.000 sre_parse.py:223(isname)
+       11    0.000    0.000    0.000    0.000 sre_parse.py:232(_class_escape)
+       37    0.000    0.000    0.000    0.000 sre_parse.py:264(_escape)
+    90/26    0.001    0.000    0.026    0.001 sre_parse.py:308(_parse_sub)
+   112/29    0.005    0.000    0.026    0.001 sre_parse.py:386(_parse)
+       26    0.000    0.000    0.000    0.000 sre_parse.py:670(fix_flags)
+       26    0.000    0.000    0.000    0.000 sre_parse.py:68(__init__)
+       26    0.000    0.000    0.027    0.001 sre_parse.py:682(parse)
+        2    0.000    0.000    0.000    0.000 sre_parse.py:711(parse_template)
+        3    0.000    0.000    0.000    0.000 sre_parse.py:718(literal)
+       61    0.000    0.000    0.000    0.000 sre_parse.py:73(opengroup)
+        2    0.000    0.000    0.000    0.000 sre_parse.py:790(<lambda>)
+       61    0.000    0.000    0.000    0.000 sre_parse.py:84(closegroup)
+      172    0.000    0.000    0.000    0.000 sre_parse.py:91(__init__)
+        1    0.000    0.000    0.000    0.000 ssl.py:107(CertificateError)
+        1    0.000    0.000    0.000    0.000 ssl.py:166(SSLContext)
+        1    0.000    0.000    0.000    0.000 ssl.py:172(__new__)
+        1    0.000    0.000    0.000    0.000 ssl.py:178(__init__)
+        1    0.000    0.000    0.000    0.000 ssl.py:192(SSLSocket)
+        1    0.000    0.000    0.040    0.040 ssl.py:197(__init__)
+  2416419    1.509    0.000    1.509    0.000 ssl.py:282(_checkClosed)
+   604301    2.160    0.000  735.975    0.001 ssl.py:286(read)
+   603908    2.265    0.000   20.399    0.000 ssl.py:329(send)
+   603908    3.933    0.000   25.125    0.000 ssl.py:361(sendall)
+   604301    2.972    0.000  739.833    0.001 ssl.py:388(recv_into)
+        1    0.000    0.000    0.000    0.000 ssl.py:426(shutdown)
+        2    0.000    0.000    0.000    0.000 ssl.py:439(_real_close)
+        1    0.000    0.000    0.039    0.039 ssl.py:444(do_handshake)
+        1    0.000    0.000    0.000    0.000 ssl.py:505(__del__)
+        1    0.000    0.000    0.040    0.040 ssl.py:510(wrap_socket)
+        1    0.016    0.016    0.017    0.017 ssl.py:55(<module>)
+        1    0.006    0.006    0.006    0.006 stringprep.py:6(<module>)
+        1    0.035    0.035    0.049    0.049 subprocess.py:336(<module>)
+        1    0.000    0.000    0.000    0.000 subprocess.py:351(CalledProcessError)
+        1    0.000    0.000    0.000    0.000 subprocess.py:641(Popen)
+        1    0.000    0.000    0.001    0.001 threading.py:1(<module>)
+      135    0.000    0.000    0.000    0.000 threading.py:1016(current_thread)
+        2    0.000    0.000    0.000    0.000 threading.py:172(Condition)
+        1    0.000    0.000    0.000    0.000 threading.py:175(_Condition)
+        2    0.000    0.000    0.000    0.000 threading.py:177(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:217(_is_owned)
+        1    0.000    0.000    0.000    0.000 threading.py:284(notify)
+        1    0.000    0.000    0.000    0.000 threading.py:302(notify_all)
+        1    0.000    0.000    0.000    0.000 threading.py:311(_Semaphore)
+        1    0.000    0.000    0.000    0.000 threading.py:369(_BoundedSemaphore)
+        1    0.000    0.000    0.000    0.000 threading.py:381(Event)
+        1    0.000    0.000    0.000    0.000 threading.py:384(_Event)
+        1    0.000    0.000    0.000    0.000 threading.py:388(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:402(set)
+        1    0.000    0.000    0.000    0.000 threading.py:43(_Verbose)
+        1    0.000    0.000    0.000    0.000 threading.py:439(Barrier)
+        4    0.000    0.000    0.000    0.000 threading.py:45(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:50(_note)
+        1    0.000    0.000    0.000    0.000 threading.py:595(BrokenBarrierError)
+        1    0.000    0.000    0.000    0.000 threading.py:615(Thread)
+        1    0.000    0.000    0.000    0.000 threading.py:627(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:719(_set_ident)
+      135    0.000    0.000    0.000    0.000 threading.py:872(name)
+        3    0.000    0.000    0.000    0.000 threading.py:88(RLock)
+        1    0.000    0.000    0.000    0.000 threading.py:923(_Timer)
+        1    0.000    0.000    0.000    0.000 threading.py:95(_RLock)
+        1    0.000    0.000    0.000    0.000 threading.py:952(_MainThread)
+        1    0.000    0.000    0.000    0.000 threading.py:954(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:961(_set_daemon)
+        1    0.000    0.000    0.000    0.000 threading.py:992(_DummyThread)
+        1    0.000    0.000    0.000    0.000 warnings.py:1(<module>)
+        1    0.000    0.000    0.000    0.000 warnings.py:269(WarningMessage)
+        1    0.000    0.000    0.000    0.000 warnings.py:289(catch_warnings)
+        1    0.000    0.000    0.000    0.000 warnings.py:83(_OptionError)
+        1    0.000    0.000    0.000    0.000 warnings.py:88(_processoptions)
+        1    0.000    0.000    0.000    0.000 weakref.py:200(update)
+        1    0.000    0.000    0.000    0.000 weakref.py:45(__init__)
+  107/104    0.003    0.000    0.016    0.000 {built-in method __build_class__}
+        1    0.002    0.002    0.032    0.032 {built-in method __import__}
+       25    0.000    0.000    0.000    0.000 {built-in method __new__ of type object at 0x7feb008d2f20}
+      135    0.000    0.000    0.000    0.000 {built-in method _getframe}
+   301830    0.224    0.000    0.224    0.000 {built-in method abs}
+        4    0.000    0.000    0.000    0.000 {built-in method allocate_lock}
+      463    0.000    0.000    0.000    0.000 {built-in method chr}
+       26    0.000    0.000    0.000    0.000 {built-in method compile}
+        2    0.000    0.000    0.000    0.000 {built-in method dir}
+       49    0.000    0.000    0.000    0.000 {built-in method divmod}
+        2    0.093    0.046    0.093    0.046 {built-in method dump}
+        1    0.000    0.000 1052.038 1052.038 {built-in method exec}
+        1    0.000    0.000    0.000    0.000 {built-in method exp}
+        1    0.000    0.000    0.000    0.000 {built-in method from_bytes}
+   603629    3.208    0.000    3.208    0.000 {built-in method fromtimestamp}
+      271    0.000    0.000    0.000    0.000 {built-in method get_ident}
+        1    0.001    0.001    0.033    0.033 {built-in method getaddrinfo}
+      120    0.000    0.000    0.000    0.000 {built-in method getattr}
+        1    0.000    0.000    0.000    0.000 {built-in method getcwd}
+       36    0.000    0.000    0.000    0.000 {built-in method getlower}
+      135    0.000    0.000    0.000    0.000 {built-in method getpid}
+        6    0.000    0.000    0.000    0.000 {built-in method globals}
+      548    0.001    0.000    0.001    0.000 {built-in method hasattr}
+  2418651    2.307    0.000    2.307    0.000 {built-in method isinstance}
+2421386/2421311    1.722    0.000    1.722    0.000 {built-in method len}
+  1207393    6.127    0.000    6.127    0.000 {built-in method localtime}
+        2    0.000    0.000    0.000    0.000 {built-in method log}
+       27    0.000    0.000    0.000    0.000 {built-in method max}
+   302246    0.442    0.000    0.442    0.000 {built-in method min}
+  1207258    6.263    0.000    6.263    0.000 {built-in method mktime}
+        3    0.001    0.000    0.001    0.000 {built-in method next}
+        3    0.000    0.000    0.000    0.000 {built-in method nl_langinfo}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_md5}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha1}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha224}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha256}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha384}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha512}
+        6    0.007    0.001    0.007    0.001 {built-in method open}
+      309    0.000    0.000    0.000    0.000 {built-in method ord}
+       47    0.003    0.000    0.003    0.000 {built-in method print}
+       38    0.000    0.000    0.000    0.000 {built-in method proxy}
+        1    0.000    0.000    0.000    0.000 {built-in method reader}
+        3    0.000    0.000    0.000    0.000 {built-in method register_dialect}
+        1    0.000    0.000    0.000    0.000 {built-in method register}
+        9    0.000    0.000    0.000    0.000 {built-in method round}
+   301759    0.651    0.000    0.651    0.000 {built-in method setlocale}
+        7    0.000    0.000    0.000    0.000 {built-in method sorted}
+        1    0.000    0.000    0.000    0.000 {built-in method sqrt}
+      143    0.001    0.000    0.001    0.000 {built-in method strftime}
+   301748    1.559    0.000   23.068    0.000 {built-in method strptime}
+        1    0.000    0.000    0.000    0.000 {built-in method sysconf}
+  2114116    2.488    0.000    2.488    0.000 {built-in method time}
+        1    0.000    0.000    0.000    0.000 {built-in method tzset}
+        1    0.000    0.000    0.000    0.000 {built-in method urandom}
+        4    0.000    0.000    0.000    0.000 {built-in method utf_8_decode}
+        1    0.000    0.000    0.000    0.000 {function seed at 0x108da68}
+        1    0.000    0.000    0.000    0.000 {method '__getitem__' of 'dict' objects}
+   604301    1.360    0.000    1.360    0.000 {method '_checkClosed' of '_io._IOBase' objects}
+   604301    1.379    0.000    2.837    0.000 {method '_checkReadable' of '_io._IOBase' objects}
+        1    0.000    0.000    0.000    0.000 {method '_wrap_socket' of '_ssl._SSLContext' objects}
+      139    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.RLock' objects}
+        2    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.lock' objects}
+        5    0.000    0.000    0.000    0.000 {method 'add' of 'set' objects}
+   606573    0.517    0.000    0.517    0.000 {method 'append' of 'list' objects}
+        1    0.000    0.000    0.000    0.000 {method 'bit_length' of 'int' objects}
+        1    0.000    0.000    0.000    0.000 {method 'close' of '_io.BufferedReader' objects}
+        1    0.001    0.001    0.001    0.001 {method 'connect' of '_socket.socket' objects}
+   302108    1.285    0.000    1.285    0.000 {method 'decode' of 'bytes' objects}
+        1    0.000    0.000    0.000    0.000 {method 'detach' of '_socket.socket' objects}
+        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
+        1    0.039    0.039    0.039    0.039 {method 'do_handshake' of '_ssl._SSLSocket' objects}
+        7    0.000    0.000    0.000    0.000 {method 'encode' of 'str' objects}
+   301748    0.294    0.000    0.294    0.000 {method 'end' of '_sre.SRE_Match' objects}
+  1510072    1.974    0.000    1.974    0.000 {method 'endswith' of 'bytes' objects}
+        1    0.000    0.000    0.000    0.000 {method 'endswith' of 'str' objects}
+       12    0.000    0.000    0.000    0.000 {method 'extend' of 'bytearray' objects}
+       23    0.000    0.000    0.000    0.000 {method 'extend' of 'list' objects}
+        1    0.000    0.000    0.000    0.000 {method 'fileno' of '_socket.socket' objects}
+      135    0.000    0.000    0.000    0.000 {method 'find' of 'str' objects}
+   301881   62.003    0.000   62.003    0.000 {method 'findall' of '_sre.SRE_Pattern' objects}
+      135    0.013    0.000    0.013    0.000 {method 'flush' of '_io.TextIOWrapper' objects}
+        2    0.000    0.000    0.000    0.000 {method 'format' of 'str' objects}
+  2415262    1.855    0.000    1.855    0.000 {method 'get' of 'dict' objects}
+        1    0.000    0.000    0.000    0.000 {method 'getpeername' of '_socket.socket' objects}
+        1    0.000    0.000    0.000    0.000 {method 'getrandbits' of '_random.Random' objects}
+        3    0.000    0.000    0.000    0.000 {method 'gettimeout' of '_socket.socket' objects}
+  6643530    7.509    0.000    7.509    0.000 {method 'group' of '_sre.SRE_Match' objects}
+   301748    0.749    0.000    0.749    0.000 {method 'groupdict' of '_sre.SRE_Match' objects}
+       94    0.000    0.000    0.000    0.000 {method 'groups' of '_sre.SRE_Match' objects}
+   301748    0.491    0.000    0.491    0.000 {method 'index' of 'list' objects}
+       14    0.000    0.000    0.000    0.000 {method 'index' of 'str' objects}
+        1    0.000    0.000    0.000    0.000 {method 'insert' of 'list' objects}
+        4    0.000    0.000    0.000    0.000 {method 'isalnum' of 'str' objects}
+       39    0.000    0.000    0.000    0.000 {method 'items' of 'dict' objects}
+   301881    0.224    0.000    0.224    0.000 {method 'join' of 'bytes' objects}
+    55/11    0.000    0.000    0.000    0.000 {method 'join' of 'str' objects}
+   301748    0.216    0.000    0.216    0.000 {method 'keys' of 'dict' objects}
+   603552    0.538    0.000    0.538    0.000 {method 'lower' of 'str' objects}
+  4530459   10.616    0.000   10.616    0.000 {method 'match' of '_sre.SRE_Pattern' objects}
+   603858    0.535    0.000    0.535    0.000 {method 'pop' of 'dict' objects}
+   301883    1.449    0.000    1.529    0.000 {method 'read' of '_io.BufferedReader' objects}
+   604301  733.455    0.001  733.455    0.001 {method 'read' of '_ssl._SSLSocket' objects}
+  1510072    9.248    0.000  756.011    0.001 {method 'readline' of '_io.BufferedReader' objects}
+      139    0.000    0.000    0.000    0.000 {method 'release' of '_thread.RLock' objects}
+        1    0.000    0.000    0.000    0.000 {method 'release' of '_thread.lock' objects}
+       61    0.000    0.000    0.000    0.000 {method 'remove' of 'list' objects}
+   603570    0.490    0.000    0.490    0.000 {method 'replace' of 'str' objects}
+      405    0.000    0.000    0.000    0.000 {method 'rfind' of 'str' objects}
+        6    0.000    0.000    0.000    0.000 {method 'rstrip' of 'str' objects}
+        4    0.000    0.000    0.000    0.000 {method 'search' of '_sre.SRE_Pattern' objects}
+        1    0.000    0.000    0.000    0.000 {method 'set_ciphers' of '_ssl._SSLContext' objects}
+      512    0.002    0.000    0.002    0.000 {method 'setdefault' of 'dict' objects}
+        4    0.000    0.000    0.000    0.000 {method 'setter' of 'property' objects}
+        2    0.000    0.000    0.000    0.000 {method 'settimeout' of '_socket.socket' objects}
+        2    0.000    0.000    0.000    0.000 {method 'split' of '_sre.SRE_Pattern' objects}
+       47    0.022    0.000    0.022    0.000 {method 'split' of 'bytes' objects}
+        2    0.000    0.000    0.000    0.000 {method 'split' of 'str' objects}
+        4    0.000    0.000    0.000    0.000 {method 'start' of '_sre.SRE_Match' objects}
+       13    0.000    0.000    0.000    0.000 {method 'startswith' of 'str' objects}
+       38    0.000    0.000    0.000    0.000 {method 'strftime' of 'datetime.date' objects}
+       62    0.000    0.000    0.000    0.000 {method 'strip' of 'str' objects}
+   301889   19.339    0.000   19.339    0.000 {method 'sub' of '_sre.SRE_Pattern' objects}
+        2    0.000    0.000    0.000    0.000 {method 'tobytes' of 'array.array' objects}
+        2    0.000    0.000    0.000    0.000 {method 'tolist' of 'array.array' objects}
+   603497    0.424    0.000    0.424    0.000 {method 'toordinal' of 'datetime.date' objects}
+   301748    0.432    0.000    0.432    0.000 {method 'total_seconds' of 'datetime.timedelta' objects}
+        1    0.000    0.000    0.000    0.000 {method 'union' of 'set' objects}
+   603810    0.546    0.000    0.546    0.000 {method 'upper' of 'str' objects}
+   301748    0.190    0.000    0.190    0.000 {method 'weekday' of 'datetime.date' objects}
+      270    0.001    0.000    0.001    0.000 {method 'write' of '_io.TextIOWrapper' objects}
+   603908   17.757    0.000   17.757    0.000 {method 'write' of '_ssl._SSLSocket' objects}
+
+
+
+
+
+
+STATISTICS WITH CACHING:
+
+344848 function calls (344387 primitive calls) in 136.603 seconds
+
+   Ordered by: standard name
+
+   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
+        1    0.000    0.000    0.000    0.000 __init__.py:1001(_StderrHandler)
+        1    0.000    0.000    0.000    0.000 __init__.py:1007(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1025(PlaceHolder)
+        1    0.000    0.000    0.000    0.000 __init__.py:1069(Manager)
+        1    0.000    0.000    0.000    0.000 __init__.py:1074(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1177(Logger)
+        1    0.000    0.000    0.000    0.000 __init__.py:1192(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1204(setLevel)
+        2    0.000    0.000    0.001    0.001 __init__.py:1234(warning)
+        2    0.000    0.000    0.000    0.000 __init__.py:1298(findCaller)
+        2    0.000    0.000    0.000    0.000 __init__.py:1328(makeRecord)
+        2    0.000    0.000    0.001    0.001 __init__.py:1343(_log)
+        2    0.000    0.000    0.001    0.000 __init__.py:1366(handle)
+        1    0.000    0.000    0.000    0.000 __init__.py:1376(addHandler)
+        2    0.000    0.000    0.001    0.000 __init__.py:1420(callHandlers)
+        2    0.000    0.000    0.000    0.000 __init__.py:1450(getEffectiveLevel)
+        2    0.000    0.000    0.000    0.000 __init__.py:1464(isEnabledFor)
+        2    0.000    0.000    0.000    0.000 __init__.py:148(getLevelName)
+        1    0.000    0.000    0.000    0.000 __init__.py:1491(RootLogger)
+        1    0.000    0.000    0.000    0.000 __init__.py:1497(__init__)
+        1    0.000    0.000    0.000    0.000 __init__.py:1505(LoggerAdapter)
+        1    0.000    0.000    0.001    0.001 __init__.py:1625(basicConfig)
+        2    0.000    0.000    0.001    0.001 __init__.py:1735(warning)
+        4    0.000    0.000    0.000    0.000 __init__.py:177(_checkLevel)
+        1    0.000    0.000    0.000    0.000 __init__.py:1819(NullHandler)
+        4    0.000    0.000    0.000    0.000 __init__.py:206(_acquireLock)
+        4    0.000    0.000    0.000    0.000 __init__.py:215(_releaseLock)
+        1    0.000    0.000    0.000    0.000 __init__.py:226(LogRecord)
+        2    0.000    0.000    0.000    0.000 __init__.py:238(__init__)
+        1    0.035    0.035    0.037    0.037 __init__.py:24(<module>)
+        2    0.000    0.000    0.000    0.000 __init__.py:308(getMessage)
+        1    0.000    0.000    0.000    0.000 __init__.py:357(PercentStyle)
+        2    0.000    0.000    0.000    0.000 __init__.py:363(__init__)
+        2    0.000    0.000    0.000    0.000 __init__.py:366(usesTime)
+        2    0.000    0.000    0.000    0.000 __init__.py:369(format)
+        1    0.000    0.000    0.000    0.000 __init__.py:372(StrFormatStyle)
+        1    0.000    0.000    0.000    0.000 __init__.py:381(StringTemplateStyle)
+        1    0.000    0.000    0.000    0.000 __init__.py:403(Formatter)
+        1    0.000    0.000    0.000    0.000 __init__.py:42(normalize_encoding)
+        2    0.000    0.000    0.000    0.000 __init__.py:447(__init__)
+        2    0.000    0.000    0.000    0.000 __init__.py:469(formatTime)
+        2    0.000    0.000    0.000    0.000 __init__.py:514(usesTime)
+        2    0.000    0.000    0.000    0.000 __init__.py:520(formatMessage)
+        2    0.000    0.000    0.000    0.000 __init__.py:536(format)
+        1    0.000    0.000    0.000    0.000 __init__.py:573(BufferingFormatter)
+        1    0.000    0.000    0.000    0.000 __init__.py:615(Filter)
+        1    0.000    0.000    0.000    0.000 __init__.py:652(Filterer)
+        3    0.000    0.000    0.000    0.000 __init__.py:657(__init__)
+        4    0.000    0.000    0.000    0.000 __init__.py:677(filter)
+        1    0.000    0.000    0.019    0.019 __init__.py:69(search_function)
+        2    0.000    0.000    0.000    0.000 __init__.py:722(_addHandlerRef)
+        1    0.000    0.000    0.000    0.000 __init__.py:732(Handler)
+        2    0.000    0.000    0.000    0.000 __init__.py:741(__init__)
+        2    0.000    0.000    0.000    0.000 __init__.py:76(<lambda>)
+        2    0.000    0.000    0.000    0.000 __init__.py:770(createLock)
+        2    0.000    0.000    0.000    0.000 __init__.py:779(acquire)
+        2    0.000    0.000    0.000    0.000 __init__.py:786(release)
+        2    0.000    0.000    0.000    0.000 __init__.py:799(format)
+        2    0.000    0.000    0.001    0.000 __init__.py:822(handle)
+        1    0.000    0.000    0.000    0.000 __init__.py:840(setFormatter)
+        1    0.000    0.000    0.000    0.000 __init__.py:896(StreamHandler)
+        1    0.000    0.000    0.000    0.000 __init__.py:905(__init__)
+        2    0.000    0.000    0.001    0.000 __init__.py:916(flush)
+        2    0.000    0.000    0.001    0.000 __init__.py:923(emit)
+        1    0.000    0.000    0.000    0.000 __init__.py:945(FileHandler)
+        1    0.000    0.000    0.001    0.001 __init__.py:949(__init__)
+        1    0.000    0.000    0.001    0.001 __init__.py:979(_open)
+        2    0.000    0.000    0.001    0.000 __init__.py:990(emit)
+        3    0.000    0.000    0.000    0.000 _abcoll.py:374(items)
+        3    0.000    0.000    0.000    0.000 _abcoll.py:391(__init__)
+        7    0.000    0.000    0.000    0.000 _abcoll.py:432(__iter__)
+        4    0.000    0.000    0.000    0.000 _abcoll.py:493(update)
+        1    0.000    0.000    0.000    0.000 _compat_pickle.py:8(<module>)
+       52    0.000    0.000    0.000    0.000 _compat_pickle.py:80(<genexpr>)
+       11    0.000    0.000    0.000    0.000 _compat_pickle.py:81(<genexpr>)
+       16    0.000    0.000    0.000    0.000 _weakrefset.py:36(__init__)
+        8    0.000    0.000    0.000    0.000 _weakrefset.py:68(__contains__)
+        1    0.000    0.000    0.000    0.000 _weakrefset.py:79(add)
+        5    0.000    0.000    0.001    0.000 abc.py:116(__new__)
+        5    0.000    0.000    0.000    0.000 abc.py:119(<setcomp>)
+        4    0.000    0.000    0.000    0.000 abc.py:158(__instancecheck__)
+        1    0.000    0.000    0.000    0.000 base64.py:148(<listcomp>)
+        1    0.000    0.000    0.000    0.000 base64.py:149(<listcomp>)
+        1    0.000    0.000    0.000    0.000 base64.py:3(<module>)
+        1    0.000    0.000    0.000    0.000 cashing_data.py:16(<module>)
+        1    0.000    0.000    0.000    0.000 cashing_data.py:20(CashingData)
+        1    0.000    0.000    0.305    0.305 cashing_data.py:23(__init__)
+        1    0.316    0.316    0.406    0.406 cashing_data.py:39(__del__)
+       47    0.316    0.007  132.650    2.822 cashing_data.py:68(sync_cached_mailbox)
+       47    0.000    0.000    0.000    0.000 cashing_data.py:91(commit_cached_mailbox)
+        1    0.000    0.000    0.000    0.000 codecs.py:164(__init__)
+        1    0.000    0.000    0.000    0.000 codecs.py:192(setstate)
+        2    0.000    0.000    0.000    0.000 codecs.py:238(__init__)
+        2    0.000    0.000    0.000    0.000 codecs.py:287(__init__)
+        4    0.000    0.000    0.000    0.000 codecs.py:297(decode)
+        1    0.000    0.000    0.000    0.000 codecs.py:77(__new__)
+       89    0.000    0.000    0.000    0.000 collections.py:130(move_to_end)
+        4    0.000    0.000    0.000    0.000 collections.py:40(__init__)
+       32    0.000    0.000    0.000    0.000 collections.py:57(__setitem__)
+        3    0.000    0.000    0.000    0.000 collections.py:695(__init__)
+        3    0.000    0.000    0.000    0.000 collections.py:705(__getitem__)
+        7    0.000    0.000    0.000    0.000 collections.py:82(__iter__)
+        1    0.000    0.000    0.000    0.000 configparser.py:1084(_join_multiline_values)
+        3    0.000    0.000    0.000    0.000 configparser.py:1102(_unify_values)
+        1    0.000    0.000    0.000    0.000 configparser.py:1151(ConfigParser)
+        1    0.000    0.000    0.000    0.000 configparser.py:1170(SafeConfigParser)
+        1    0.000    0.000    0.000    0.000 configparser.py:1183(SectionProxy)
+        2    0.000    0.000    0.000    0.000 configparser.py:1186(__init__)
+        1    0.000    0.000    0.013    0.013 configparser.py:120(<module>)
+        1    0.000    0.000    0.000    0.000 configparser.py:144(Error)
+        1    0.000    0.000    0.000    0.000 configparser.py:174(NoSectionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:183(DuplicateSectionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:209(DuplicateOptionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:236(NoOptionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:247(InterpolationError)
+        1    0.000    0.000    0.000    0.000 configparser.py:257(InterpolationMissingOptionError)
+        1    0.000    0.000    0.000    0.000 configparser.py:272(InterpolationSyntaxError)
+        1    0.000    0.000    0.000    0.000 configparser.py:280(InterpolationDepthError)
+        1    0.000    0.000    0.000    0.000 configparser.py:293(ParsingError)
+        1    0.000    0.000    0.000    0.000 configparser.py:336(MissingSectionHeaderError)
+        1    0.000    0.000    0.000    0.000 configparser.py:356(Interpolation)
+        3    0.000    0.000    0.000    0.000 configparser.py:359(before_get)
+        3    0.000    0.000    0.000    0.000 configparser.py:365(before_read)
+        1    0.000    0.000    0.001    0.001 configparser.py:372(BasicInterpolation)
+        1    0.000    0.000    0.000    0.000 configparser.py:443(ExtendedInterpolation)
+        1    0.000    0.000    0.001    0.001 configparser.py:516(LegacyInterpolation)
+        1    0.000    0.000    0.011    0.011 configparser.py:554(RawConfigParser)
+        1    0.000    0.000    0.000    0.000 configparser.py:595(__init__)
+        1    0.001    0.001    0.001    0.001 configparser.py:671(read)
+        3    0.000    0.000    0.000    0.000 configparser.py:755(get)
+        2    0.000    0.000    0.000    0.000 configparser.py:792(_get)
+        2    0.000    0.000    0.000    0.000 configparser.py:795(getint)
+        6    0.000    0.000    0.000    0.000 configparser.py:855(optionxform)
+        1    0.000    0.000    0.000    0.000 configparser.py:970(_read)
+        2    0.000    0.000    0.001    0.000 csv.py:106(__next__)
+        1    0.000    0.000    0.000    0.000 csv.py:129(DictWriter)
+        1    0.000    0.000    0.000    0.000 csv.py:167(Sniffer)
+        1    0.000    0.000    0.000    0.000 csv.py:22(Dialect)
+        1    0.007    0.007    0.007    0.007 csv.py:4(<module>)
+        1    0.000    0.000    0.000    0.000 csv.py:53(excel)
+        1    0.000    0.000    0.000    0.000 csv.py:63(excel_tab)
+        1    0.000    0.000    0.000    0.000 csv.py:68(unix_dialect)
+        1    0.000    0.000    0.000    0.000 csv.py:79(DictReader)
+        1    0.000    0.000    0.000    0.000 csv.py:80(__init__)
+        1    0.000    0.000    0.000    0.000 csv.py:89(__iter__)
+        3    0.000    0.000    0.000    0.000 csv.py:92(fieldnames)
+        1    0.025    0.025    0.049    0.049 date_interpreter.py:20(<module>)
+        1    0.000    0.000    0.000    0.000 date_interpreter.py:35(DateInterpreter)
+        1    0.000    0.000    0.000    0.000 date_interpreter.py:38(__init__)
+        2    0.000    0.000    0.000    0.000 datetime.py:1017(__new__)
+        1    0.000    0.000    0.000    0.000 datetime.py:1302(datetime)
+        2    0.000    0.000    0.000    0.000 datetime.py:1312(__new__)
+        1    0.012    0.012    0.013    0.013 datetime.py:17(<module>)
+        1    0.000    0.000    0.000    0.000 datetime.py:1786(timezone)
+        3    0.000    0.000    0.000    0.000 datetime.py:1810(_create)
+        4    0.000    0.000    0.000    0.000 datetime.py:267(_check_date_fields)
+        4    0.000    0.000    0.000    0.000 datetime.py:278(_check_time_fields)
+        4    0.000    0.000    0.000    0.000 datetime.py:290(_check_tzinfo_arg)
+        1    0.000    0.000    0.000    0.000 datetime.py:298(timedelta)
+        9    0.000    0.000    0.000    0.000 datetime.py:317(__new__)
+        1    0.000    0.000    0.000    0.000 datetime.py:500(__neg__)
+        3    0.000    0.000    0.000    0.000 datetime.py:51(_days_before_year)
+        4    0.000    0.000    0.000    0.000 datetime.py:56(_days_in_month)
+        1    0.000    0.000    0.000    0.000 datetime.py:631(date)
+        4    0.000    0.000    0.000    0.000 datetime.py:661(__new__)
+        1    0.000    0.000    0.000    0.000 datetime.py:924(tzinfo)
+        1    0.000    0.000    0.000    0.000 datetime.py:993(time)
+        1    0.000    0.000    0.002    0.002 fix_imap_internaldate.py:108(load_configuration)
+        1    0.074    0.074  136.603  136.603 fix_imap_internaldate.py:20(<module>)
+        1    0.002    0.002  135.351  135.351 fix_imap_internaldate.py:30(main)
+      112    0.001    0.000    0.044    0.000 functools.py:170(wrapper)
+        2    0.000    0.000    0.000    0.000 genericpath.py:85(_splitext)
+        1    0.008    0.008    0.008    0.008 hashlib.py:53(<module>)
+        6    0.000    0.000    0.000    0.000 hashlib.py:94(__get_openssl_constructor)
+        1    0.000    0.000    0.000    0.000 idna.py:146(Codec)
+        2    0.000    0.000    0.000    0.000 idna.py:147(encode)
+        1    0.000    0.000    0.000    0.000 idna.py:196(IncrementalEncoder)
+        1    0.000    0.000    0.000    0.000 idna.py:231(IncrementalDecoder)
+        1    0.000    0.000    0.000    0.000 idna.py:270(StreamWriter)
+        1    0.000    0.000    0.000    0.000 idna.py:273(StreamReader)
+        1    0.000    0.000    0.000    0.000 idna.py:278(getregentry)
+        1    0.011    0.011    0.017    0.017 idna.py:3(<module>)
+        7    0.000    0.000    0.000    0.000 idna.py:62(ToASCII)
+      146    0.001    0.000    2.683    0.018 imaplib.py:1050(_get_tagged_response)
+        1    0.000    0.000    0.000    0.000 imaplib.py:107(IMAP4)
+      667    0.019    0.000    2.689    0.004 imaplib.py:1072(_get_line)
+     2186    0.005    0.000    0.017    0.000 imaplib.py:1091(_match)
+        1    0.054    0.054    0.161    0.161 imaplib.py:11(<module>)
+      146    0.001    0.000    0.001    0.000 imaplib.py:1103(_new_tag)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1111(_quote)
+      146    0.001    0.000    2.696    0.018 imaplib.py:1119(_simple_command)
+       96    0.000    0.000    0.000    0.000 imaplib.py:1124(_untagged_response)
+      813    0.003    0.000    0.004    0.000 imaplib.py:1153(_log)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1176(IMAP4_SSL)
+        1    0.000    0.000    0.155    0.155 imaplib.py:1191(__init__)
+        1    0.000    0.000    0.114    0.114 imaplib.py:1196(_create_socket)
+        1    0.000    0.000    0.114    0.114 imaplib.py:1200(open)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1211(IMAP4_stream)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1267(_Authenticator)
+        1    0.000    0.000    0.000    0.000 imaplib.py:1359(Int2AP)
+        1    0.000    0.000    0.000    0.000 imaplib.py:153(error)
+        1    0.000    0.000    0.000    0.000 imaplib.py:154(abort)
+        1    0.000    0.000    0.000    0.000 imaplib.py:155(readonly)
+        1    0.000    0.000    0.155    0.155 imaplib.py:157(__init__)
+        1    0.000    0.000    0.041    0.041 imaplib.py:182(_connect)
+        1    0.000    0.000    0.021    0.021 imaplib.py:235(_create_socket)
+        1    0.000    0.000    0.114    0.114 imaplib.py:238(open)
+      667    0.001    0.000    2.666    0.004 imaplib.py:263(readline)
+      146    0.000    0.000    0.006    0.000 imaplib.py:268(send)
+        1    0.000    0.000    0.000    0.000 imaplib.py:273(shutdown)
+        1    0.000    0.000    0.001    0.001 imaplib.py:381(capability)
+        1    0.000    0.000    0.484    0.484 imaplib.py:398(close)
+        1    0.000    0.000    0.004    0.004 imaplib.py:511(list)
+        1    0.000    0.000    0.001    0.001 imaplib.py:523(login)
+        1    0.000    0.000    0.001    0.001 imaplib.py:552(logout)
+       47    0.000    0.000    1.852    0.039 imaplib.py:656(select)
+       47    0.000    0.000    0.070    0.001 imaplib.py:751(status)
+       47    0.000    0.000    0.285    0.006 imaplib.py:792(uid)
+      806    0.002    0.000    0.002    0.000 imaplib.py:847(_append_untagged)
+      290    0.001    0.000    0.001    0.000 imaplib.py:861(_check_bye)
+      146    0.002    0.000    0.011    0.000 imaplib.py:867(_command)
+      146    0.001    0.000    2.685    0.018 imaplib.py:944(_command_complete)
+        1    0.000    0.000    0.001    0.001 imaplib.py:961(_get_capabilities)
+      667    0.009    0.000    2.720    0.004 imaplib.py:970(_get_response)
+        9    0.000    0.000    0.000    0.000 locale.py:526(setlocale)
+        3    0.000    0.000    0.000    0.000 locale.py:574(getpreferredencoding)
+        1    0.019    0.019    0.182    0.182 mail_iterator.py:20(<module>)
+        1    0.000    0.000    0.000    0.000 mail_iterator.py:29(MailIterator)
+        1    0.000    0.000    0.160    0.160 mail_iterator.py:32(__init__)
+        1    0.000    0.000    0.485    0.485 mail_iterator.py:42(__del__)
+       48    0.001    0.000    1.923    0.040 mail_iterator.py:47(__iter__)
+       47    0.000    0.000    0.305    0.006 mail_iterator.py:60(fetch_messages)
+        1    0.000    0.000    0.000    0.000 os.py:35(_get_exports_list)
+        1    0.000    0.000    0.000    0.000 os.py:39(<listcomp>)
+        1    0.000    0.000    0.002    0.002 pickle.py:173(<listcomp>)
+        1    0.000    0.000    0.000    0.000 pickle.py:177(_Pickler)
+        1    0.013    0.013    0.015    0.015 pickle.py:24(<module>)
+        1    0.000    0.000    0.000    0.000 pickle.py:68(PickleError)
+        1    0.000    0.000    0.000    0.000 pickle.py:72(PicklingError)
+        1    0.000    0.000    0.000    0.000 pickle.py:781(_Unpickler)
+        1    0.000    0.000    0.000    0.000 pickle.py:79(UnpicklingError)
+        1    0.000    0.000    0.000    0.000 pickle.py:92(_Stop)
+        2    0.000    0.000    0.000    0.000 posixpath.py:108(splitext)
+        2    0.000    0.000    0.000    0.000 posixpath.py:129(basename)
+        1    0.000    0.000    0.000    0.000 posixpath.py:330(normpath)
+        1    0.000    0.000    0.000    0.000 posixpath.py:367(abspath)
+        4    0.000    0.000    0.000    0.000 posixpath.py:38(_get_sep)
+        5    0.000    0.000    0.000    0.000 posixpath.py:49(normcase)
+        1    0.000    0.000    0.000    0.000 posixpath.py:61(isabs)
+        1    0.000    0.000    0.000    0.000 posixpath.py:71(join)
+        1    0.000    0.000    0.000    0.000 random.py:165(randrange)
+        1    0.000    0.000    0.000    0.000 random.py:210(randint)
+        1    0.000    0.000    0.000    0.000 random.py:216(_randbelow)
+        1    0.012    0.012    0.020    0.020 random.py:37(<module>)
+        1    0.000    0.000    0.000    0.000 random.py:625(SystemRandom)
+        1    0.000    0.000    0.000    0.000 random.py:68(Random)
+        1    0.000    0.000    0.000    0.000 random.py:84(__init__)
+        1    0.000    0.000    0.000    0.000 random.py:93(seed)
+       90    0.000    0.000    0.002    0.000 re.py:150(match)
+       22    0.000    0.000    0.043    0.002 re.py:204(compile)
+      112    0.000    0.000    0.045    0.000 re.py:254(_compile)
+       23    0.000    0.000    0.043    0.002 re.py:257(_compile_typed)
+        1    0.000    0.000    0.000    0.000 socket.py:141(makefile)
+        1    0.000    0.000    0.000    0.000 socket.py:184(_decref_socketios)
+        2    0.000    0.000    0.000    0.000 socket.py:190(_real_close)
+        1    0.000    0.000    0.000    0.000 socket.py:194(close)
+        1    0.000    0.000    0.000    0.000 socket.py:233(SocketIO)
+        1    0.000    0.000    0.000    0.000 socket.py:250(__init__)
+      529    0.003    0.000    2.657    0.005 socket.py:262(readinto)
+      530    0.001    0.000    0.001    0.000 socket.py:304(readable)
+        1    0.000    0.000    0.000    0.000 socket.py:331(close)
+        1    0.000    0.000    0.021    0.021 socket.py:370(create_connection)
+        1    0.006    0.006    0.007    0.007 socket.py:44(<module>)
+        1    0.000    0.000    0.000    0.000 socket.py:87(socket)
+        2    0.000    0.000    0.000    0.000 socket.py:93(__init__)
+       90    0.001    0.000    0.010    0.000 sre_compile.py:178(_compile_charset)
+       90    0.004    0.000    0.009    0.000 sre_compile.py:207(_optimize_charset)
+      330    0.000    0.000    0.000    0.000 sre_compile.py:24(_identityfunction)
+        9    0.000    0.000    0.000    0.000 sre_compile.py:258(_mk_bitmap)
+        2    0.003    0.001    0.005    0.002 sre_compile.py:301(_optimize_unicode)
+   150/23    0.002    0.000    0.011    0.000 sre_compile.py:32(_compile)
+       50    0.000    0.000    0.000    0.000 sre_compile.py:355(_simple)
+       23    0.000    0.000    0.005    0.000 sre_compile.py:362(_compile_info)
+       46    0.000    0.000    0.000    0.000 sre_compile.py:468(isstring)
+       23    0.000    0.000    0.016    0.001 sre_compile.py:471(_code)
+       23    0.000    0.000    0.043    0.002 sre_compile.py:486(compile)
+      200    0.000    0.000    0.000    0.000 sre_parse.py:127(__len__)
+      547    0.001    0.000    0.002    0.000 sre_parse.py:131(__getitem__)
+       50    0.000    0.000    0.000    0.000 sre_parse.py:135(__setitem__)
+      285    0.000    0.000    0.001    0.000 sre_parse.py:139(append)
+   200/73    0.001    0.000    0.001    0.000 sre_parse.py:141(getwidth)
+       23    0.000    0.000    0.000    0.000 sre_parse.py:179(__init__)
+     2064    0.009    0.000    0.013    0.000 sre_parse.py:183(__next)
+      608    0.001    0.000    0.003    0.000 sre_parse.py:202(match)
+     1757    0.003    0.000    0.013    0.000 sre_parse.py:208(get)
+        5    0.000    0.000    0.000    0.000 sre_parse.py:212(tell)
+        1    0.000    0.000    0.000    0.000 sre_parse.py:214(seek)
+      183    0.000    0.000    0.000    0.000 sre_parse.py:217(isident)
+        1    0.000    0.000    0.000    0.000 sre_parse.py:220(isdigit)
+       43    0.000    0.000    0.000    0.000 sre_parse.py:223(isname)
+        6    0.000    0.000    0.000    0.000 sre_parse.py:232(_class_escape)
+       36    0.000    0.000    0.000    0.000 sre_parse.py:264(_escape)
+    85/23    0.001    0.000    0.025    0.001 sre_parse.py:308(_parse_sub)
+    96/26    0.005    0.000    0.025    0.001 sre_parse.py:386(_parse)
+       23    0.000    0.000    0.000    0.000 sre_parse.py:670(fix_flags)
+       23    0.000    0.000    0.000    0.000 sre_parse.py:68(__init__)
+       23    0.000    0.000    0.026    0.001 sre_parse.py:682(parse)
+       59    0.000    0.000    0.000    0.000 sre_parse.py:73(opengroup)
+       59    0.000    0.000    0.000    0.000 sre_parse.py:84(closegroup)
+      154    0.000    0.000    0.000    0.000 sre_parse.py:91(__init__)
+        1    0.000    0.000    0.000    0.000 ssl.py:107(CertificateError)
+        1    0.000    0.000    0.000    0.000 ssl.py:166(SSLContext)
+        1    0.000    0.000    0.000    0.000 ssl.py:172(__new__)
+        1    0.000    0.000    0.000    0.000 ssl.py:178(__init__)
+        1    0.000    0.000    0.000    0.000 ssl.py:192(SSLSocket)
+        1    0.000    0.000    0.093    0.093 ssl.py:197(__init__)
+     1351    0.001    0.000    0.001    0.000 ssl.py:282(_checkClosed)
+      529    0.002    0.000    2.647    0.005 ssl.py:286(read)
+      146    0.001    0.000    0.005    0.000 ssl.py:329(send)
+      146    0.001    0.000    0.006    0.000 ssl.py:361(sendall)
+      529    0.003    0.000    2.651    0.005 ssl.py:388(recv_into)
+        1    0.000    0.000    0.000    0.000 ssl.py:426(shutdown)
+        2    0.000    0.000    0.000    0.000 ssl.py:439(_real_close)
+        1    0.000    0.000    0.093    0.093 ssl.py:444(do_handshake)
+        1    0.000    0.000    0.000    0.000 ssl.py:505(__del__)
+        1    0.000    0.000    0.093    0.093 ssl.py:510(wrap_socket)
+        1    0.017    0.017    0.018    0.018 ssl.py:55(<module>)
+        1    0.000    0.000    0.000    0.000 stringprep.py:6(<module>)
+        1    0.035    0.035    0.051    0.051 subprocess.py:336(<module>)
+        1    0.000    0.000    0.000    0.000 subprocess.py:351(CalledProcessError)
+        1    0.000    0.000    0.000    0.000 subprocess.py:641(Popen)
+        1    0.000    0.000    0.001    0.001 threading.py:1(<module>)
+        2    0.000    0.000    0.000    0.000 threading.py:1016(current_thread)
+        2    0.000    0.000    0.000    0.000 threading.py:172(Condition)
+        1    0.000    0.000    0.000    0.000 threading.py:175(_Condition)
+        2    0.000    0.000    0.000    0.000 threading.py:177(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:217(_is_owned)
+        1    0.000    0.000    0.000    0.000 threading.py:284(notify)
+        1    0.000    0.000    0.000    0.000 threading.py:302(notify_all)
+        1    0.000    0.000    0.000    0.000 threading.py:311(_Semaphore)
+        1    0.000    0.000    0.000    0.000 threading.py:369(_BoundedSemaphore)
+        1    0.000    0.000    0.000    0.000 threading.py:381(Event)
+        1    0.000    0.000    0.000    0.000 threading.py:384(_Event)
+        1    0.000    0.000    0.000    0.000 threading.py:388(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:402(set)
+        1    0.000    0.000    0.000    0.000 threading.py:43(_Verbose)
+        1    0.000    0.000    0.000    0.000 threading.py:439(Barrier)
+        4    0.000    0.000    0.000    0.000 threading.py:45(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:50(_note)
+        1    0.000    0.000    0.000    0.000 threading.py:595(BrokenBarrierError)
+        1    0.000    0.000    0.000    0.000 threading.py:615(Thread)
+        1    0.000    0.000    0.000    0.000 threading.py:627(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:719(_set_ident)
+        2    0.000    0.000    0.000    0.000 threading.py:872(name)
+        3    0.000    0.000    0.000    0.000 threading.py:88(RLock)
+        1    0.000    0.000    0.000    0.000 threading.py:923(_Timer)
+        1    0.000    0.000    0.000    0.000 threading.py:95(_RLock)
+        1    0.000    0.000    0.000    0.000 threading.py:952(_MainThread)
+        1    0.000    0.000    0.000    0.000 threading.py:954(__init__)
+        1    0.000    0.000    0.000    0.000 threading.py:961(_set_daemon)
+        1    0.000    0.000    0.000    0.000 threading.py:992(_DummyThread)
+        1    0.000    0.000    0.000    0.000 warnings.py:1(<module>)
+        1    0.000    0.000    0.000    0.000 warnings.py:269(WarningMessage)
+        1    0.000    0.000    0.000    0.000 warnings.py:289(catch_warnings)
+        1    0.000    0.000    0.000    0.000 warnings.py:83(_OptionError)
+        1    0.000    0.000    0.000    0.000 warnings.py:88(_processoptions)
+        1    0.000    0.000    0.000    0.000 weakref.py:200(update)
+        1    0.000    0.000    0.000    0.000 weakref.py:45(__init__)
+    95/92    0.003    0.000    0.016    0.000 {built-in method __build_class__}
+        1    0.002    0.002    0.019    0.019 {built-in method __import__}
+       25    0.000    0.000    0.000    0.000 {built-in method __new__ of type object at 0x7f0f161d7f20}
+        2    0.000    0.000    0.000    0.000 {built-in method _getframe}
+       82    0.000    0.000    0.000    0.000 {built-in method abs}
+        3    0.000    0.000    0.000    0.000 {built-in method allocate_lock}
+      462    0.000    0.000    0.000    0.000 {built-in method chr}
+       23    0.000    0.000    0.000    0.000 {built-in method compile}
+        2    0.000    0.000    0.000    0.000 {built-in method dir}
+       49    0.000    0.000    0.000    0.000 {built-in method divmod}
+        1    0.086    0.086    0.086    0.086 {built-in method dump}
+        1    0.000    0.000  136.603  136.603 {built-in method exec}
+        1    0.000    0.000    0.000    0.000 {built-in method exp}
+        1    0.000    0.000    0.000    0.000 {built-in method from_bytes}
+        5    0.000    0.000    0.000    0.000 {built-in method get_ident}
+        1    0.001    0.001    0.020    0.020 {built-in method getaddrinfo}
+      120    0.000    0.000    0.000    0.000 {built-in method getattr}
+        1    0.000    0.000    0.000    0.000 {built-in method getcwd}
+        2    0.000    0.000    0.000    0.000 {built-in method getpid}
+        6    0.000    0.000    0.000    0.000 {built-in method globals}
+       16    0.000    0.000    0.000    0.000 {built-in method hasattr}
+     3088    0.003    0.000    0.003    0.000 {built-in method isinstance}
+6063/5991    0.003    0.000    0.004    0.000 {built-in method len}
+        1    0.304    0.304    0.304    0.304 {built-in method load}
+        2    0.000    0.000    0.000    0.000 {built-in method localtime}
+        2    0.000    0.000    0.000    0.000 {built-in method log}
+       15    0.000    0.000    0.000    0.000 {built-in method max}
+      315    0.000    0.000    0.000    0.000 {built-in method min}
+        3    0.000    0.000    0.000    0.000 {built-in method next}
+        3    0.000    0.000    0.000    0.000 {built-in method nl_langinfo}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_md5}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha1}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha224}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha256}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha384}
+        1    0.000    0.000    0.000    0.000 {built-in method openssl_sha512}
+        5    0.007    0.001    0.007    0.001 {built-in method open}
+      260    0.000    0.000    0.000    0.000 {built-in method ord}
+       47    0.002    0.000    0.002    0.000 {built-in method print}
+       33    0.000    0.000    0.000    0.000 {built-in method proxy}
+        1    0.000    0.000    0.000    0.000 {built-in method reader}
+        3    0.000    0.000    0.000    0.000 {built-in method register_dialect}
+        1    0.000    0.000    0.000    0.000 {built-in method register}
+        9    0.000    0.000    0.000    0.000 {built-in method round}
+        9    0.000    0.000    0.000    0.000 {built-in method setlocale}
+        1    0.000    0.000    0.000    0.000 {built-in method sorted}
+        1    0.000    0.000    0.000    0.000 {built-in method sqrt}
+        2    0.000    0.000    0.000    0.000 {built-in method strftime}
+        1    0.000    0.000    0.000    0.000 {built-in method sysconf}
+      816    0.001    0.000    0.001    0.000 {built-in method time}
+        1    0.000    0.000    0.000    0.000 {built-in method urandom}
+        4    0.000    0.000    0.000    0.000 {built-in method utf_8_decode}
+        1    0.000    0.000    0.000    0.000 {function seed at 0x1502a68}
+      529    0.002    0.000    0.002    0.000 {method '_checkClosed' of '_io._IOBase' objects}
+      529    0.001    0.000    0.002    0.000 {method '_checkReadable' of '_io._IOBase' objects}
+        1    0.000    0.000    0.000    0.000 {method '_wrap_socket' of '_ssl._SSLContext' objects}
+        6    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.RLock' objects}
+        2    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.lock' objects}
+        5    0.000    0.000    0.000    0.000 {method 'add' of 'set' objects}
+     2553    0.002    0.000    0.002    0.000 {method 'append' of 'list' objects}
+        1    0.000    0.000    0.000    0.000 {method 'bit_length' of 'int' objects}
+        1    0.000    0.000    0.000    0.000 {method 'close' of '_io.BufferedReader' objects}
+        1    0.001    0.001    0.001    0.001 {method 'connect' of '_socket.socket' objects}
+       94    0.000    0.000    0.000    0.000 {method 'decode' of 'bytes' objects}
+        1    0.000    0.000    0.000    0.000 {method 'detach' of '_socket.socket' objects}
+        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
+        1    0.093    0.093    0.093    0.093 {method 'do_handshake' of '_ssl._SSLSocket' objects}
+        7    0.000    0.000    0.000    0.000 {method 'encode' of 'str' objects}
+      667    0.001    0.000    0.001    0.000 {method 'endswith' of 'bytes' objects}
+        1    0.000    0.000    0.000    0.000 {method 'endswith' of 'str' objects}
+       12    0.000    0.000    0.000    0.000 {method 'extend' of 'bytearray' objects}
+       21    0.000    0.000    0.000    0.000 {method 'extend' of 'list' objects}
+        1    0.000    0.000    0.000    0.000 {method 'fileno' of '_socket.socket' objects}
+        2    0.000    0.000    0.000    0.000 {method 'find' of 'str' objects}
+        2    0.001    0.000    0.001    0.000 {method 'flush' of '_io.TextIOWrapper' objects}
+        2    0.000    0.000    0.000    0.000 {method 'format' of 'str' objects}
+      465    0.000    0.000    0.000    0.000 {method 'get' of 'dict' objects}
+        1    0.000    0.000    0.000    0.000 {method 'getpeername' of '_socket.socket' objects}
+        1    0.000    0.000    0.000    0.000 {method 'getrandbits' of '_random.Random' objects}
+        3    0.000    0.000    0.000    0.000 {method 'gettimeout' of '_socket.socket' objects}
+     2148    0.003    0.000    0.003    0.000 {method 'group' of '_sre.SRE_Match' objects}
+       94    0.000    0.000    0.000    0.000 {method 'groups' of '_sre.SRE_Match' objects}
+   301881  132.333    0.000  132.333    0.000 {method 'index' of 'list' objects}
+        4    0.000    0.000    0.000    0.000 {method 'isalnum' of 'str' objects}
+       36    0.000    0.000    0.000    0.000 {method 'items' of 'dict' objects}
+        5    0.000    0.000    0.000    0.000 {method 'join' of 'str' objects}
+        7    0.000    0.000    0.000    0.000 {method 'lower' of 'str' objects}
+     2377    0.013    0.000    0.013    0.000 {method 'match' of '_sre.SRE_Pattern' objects}
+       96    0.000    0.000    0.000    0.000 {method 'pop' of 'dict' objects}
+      529    2.645    0.005    2.645    0.005 {method 'read' of '_ssl._SSLSocket' objects}
+      667    0.008    0.000    2.665    0.004 {method 'readline' of '_io.BufferedReader' objects}
+        6    0.000    0.000    0.000    0.000 {method 'release' of '_thread.RLock' objects}
+        1    0.000    0.000    0.000    0.000 {method 'release' of '_thread.lock' objects}
+       59    0.000    0.000    0.000    0.000 {method 'remove' of 'list' objects}
+        3    0.000    0.000    0.000    0.000 {method 'replace' of 'str' objects}
+        6    0.000    0.000    0.000    0.000 {method 'rfind' of 'str' objects}
+        6    0.000    0.000    0.000    0.000 {method 'rstrip' of 'str' objects}
+        4    0.000    0.000    0.000    0.000 {method 'search' of '_sre.SRE_Pattern' objects}
+        1    0.000    0.000    0.000    0.000 {method 'set_ciphers' of '_ssl._SSLContext' objects}
+      512    0.002    0.000    0.002    0.000 {method 'setdefault' of 'dict' objects}
+        4    0.000    0.000    0.000    0.000 {method 'setter' of 'property' objects}
+        2    0.000    0.000    0.000    0.000 {method 'settimeout' of '_socket.socket' objects}
+        2    0.000    0.000    0.000    0.000 {method 'split' of '_sre.SRE_Pattern' objects}
+       47    0.019    0.000    0.019    0.000 {method 'split' of 'bytes' objects}
+        2    0.000    0.000    0.000    0.000 {method 'split' of 'str' objects}
+        4    0.000    0.000    0.000    0.000 {method 'start' of '_sre.SRE_Match' objects}
+       13    0.000    0.000    0.000    0.000 {method 'startswith' of 'str' objects}
+       62    0.000    0.000    0.000    0.000 {method 'strip' of 'str' objects}
+        2    0.000    0.000    0.000    0.000 {method 'tobytes' of 'array.array' objects}
+        2    0.000    0.000    0.000    0.000 {method 'tolist' of 'array.array' objects}
+        1    0.000    0.000    0.000    0.000 {method 'union' of 'set' objects}
+       48    0.000    0.000    0.000    0.000 {method 'upper' of 'str' objects}
+        4    0.000    0.000    0.000    0.000 {method 'write' of '_io.TextIOWrapper' objects}
+      146    0.004    0.000    0.004    0.000 {method 'write' of '_ssl._SSLSocket' objects}
+