Hello community,

here is the log from the commit of package offlineimap for openSUSE:Factory 
checked in at 2016-08-24 10:09:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/offlineimap (Old)
 and      /work/SRC/openSUSE:Factory/.offlineimap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "offlineimap"

Changes:
--------
--- /work/SRC/openSUSE:Factory/offlineimap/offlineimap.changes  2016-08-17 
12:04:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.offlineimap.new/offlineimap.changes     
2016-08-24 10:09:19.000000000 +0200
@@ -1,0 +2,8 @@
+Tue Aug 23 19:12:03 UTC 2016 - mimi...@gmail.com
+
+- update to 7.0.6
+* XOAUTH2: improve error message while trying to get access token. 
+* Show python version for -V CLI option.
+* offlineimap.conf: add note about Gmail\All Mail keeping the emails while 
deleted.
+
+-------------------------------------------------------------------

Old:
----
  offlineimap-7.0.5.tar.gz

New:
----
  offlineimap-7.0.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ offlineimap.spec ++++++
--- /var/tmp/diff_new_pack.BIXesQ/_old  2016-08-24 10:09:20.000000000 +0200
+++ /var/tmp/diff_new_pack.BIXesQ/_new  2016-08-24 10:09:20.000000000 +0200
@@ -19,7 +19,7 @@
 %{!?_userunitdir:%define _userunitdir /usr/lib/systemd/user}
 
 Name:           offlineimap
-Version:        7.0.5
+Version:        7.0.6
 Release:        0
 Summary:        Powerful IMAP/Maildir Synchronization Tool
 License:        GPL-2.0+

++++++ offlineimap-7.0.5.tar.gz -> offlineimap-7.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/Changelog.md 
new/offlineimap-7.0.6/Changelog.md
--- old/offlineimap-7.0.5/Changelog.md  2016-08-10 15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/Changelog.md  2016-08-21 20:43:03.000000000 +0200
@@ -15,6 +15,37 @@
 * The following excerpt is only usefull when rendered in the website.
 {:toc}
 
+### OfflineIMAP v7.0.6 (2016-08-21)
+
+#### Notes
+
+Evaluated XOAUTH2 configuration options are fixed. With this release,
+offlineimap can try to keep the UIDs in order.
+
+#### Authors
+
+- Nicolas Sebrecht (10)
+- James E. Blair (2)
+
+#### Features
+
+- Learn singlethreadperfolder configuration option. [James E. Blair]
+- folder: Base: sort message UID list. [James E. Blair]
+
+#### Fixes
+
+- Maildir: add missing exception instance "as e" in except clause. [Nicolas 
Sebrecht]
+- XOAUTH2: fix evaluated configuration options. [Nicolas Sebrecht]
+
+#### Changes
+
+- XOAUTH2: improve error message while trying to get access token. [Nicolas 
Sebrecht]
+- Show python version for -V CLI option. [Nicolas Sebrecht]
+- README: link Python 3 version to issues. [Nicolas Sebrecht]
+- offlineimap.conf: add note about Gmail\All Mail keeping the emails while 
deleted. [Nicolas Sebrecht]
+- release.sh: minor enhancements. [Nicolas Sebrecht]
+
+
 ### OfflineIMAP v7.0.5 (2016-08-10)
 
 #### Notes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/README.md 
new/offlineimap-7.0.6/README.md
--- old/offlineimap-7.0.5/README.md     2016-08-10 15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/README.md     2016-08-21 20:43:03.000000000 +0200
@@ -83,7 +83,7 @@
 ## Requirements & dependencies
 
 * Python v2.7+
-* Python v3.4+ ***(experimental)***
+* Python v3.4+ ***(experimental: [see known 
issues](https://github.com/OfflineIMAP/offlineimap/issues?q=is%3Aissue+is%3Aopen+label%3APy3))***
 * six (required)
 * imaplib2 >= 2.55 (optional)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/contrib/release.sh 
new/offlineimap-7.0.6/contrib/release.sh
--- old/offlineimap-7.0.5/contrib/release.sh    2016-08-10 15:03:17.000000000 
+0200
+++ new/offlineimap-7.0.6/contrib/release.sh    2016-08-21 20:43:03.000000000 
+0200
@@ -471,14 +471,12 @@
 Make your checks and push the changes for both offlineimap and the website.
 Announce template stands in '$TMP_ANNOUNCE'.
 Command samples to do manually:
-- git push <remote> master:master
-- git push <remote> next:next
-- git push <remote> $new_version
+- git push <remote> master next $new_version
 - python setup.py sdist && twine upload dist/* && rm -rf dist MANIFEST
 - cd website
 - git checkout master
 - git merge $branch_name
-- git push <remote> master:master
+- git push <remote> master
 - cd ..
 - git send-email $TMP_ANNOUNCE
 Have fun! ,-)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/__init__.py 
new/offlineimap-7.0.6/offlineimap/__init__.py
--- old/offlineimap-7.0.5/offlineimap/__init__.py       2016-08-10 
15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/offlineimap/__init__.py       2016-08-21 
20:43:03.000000000 +0200
@@ -2,7 +2,7 @@
 
 __productname__ = 'OfflineIMAP'
 # Expecting trailing "-rcN" or "" for stable releases.
-__version__     = "7.0.5"
+__version__     = "7.0.6"
 __copyright__   = "Copyright 2002-2016 John Goerzen & contributors"
 __author__      = "John Goerzen"
 __author_email__= "offlineimap-proj...@lists.alioth.debian.org"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/folder/Base.py 
new/offlineimap-7.0.6/offlineimap/folder/Base.py
--- old/offlineimap-7.0.5/offlineimap/folder/Base.py    2016-08-10 
15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/offlineimap/folder/Base.py    2016-08-21 
20:43:03.000000000 +0200
@@ -302,7 +302,7 @@
 
         You may have to call cachemessagelist() before calling this 
function!"""
 
-        return self.getmessagelist().keys()
+        return sorted(self.getmessagelist().keys())
 
     def getmessagecount(self):
         """Gets the number of messages."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/folder/IMAP.py 
new/offlineimap-7.0.6/offlineimap/folder/IMAP.py
--- old/offlineimap-7.0.5/offlineimap/folder/IMAP.py    2016-08-10 
15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/offlineimap/folder/IMAP.py    2016-08-21 
20:43:03.000000000 +0200
@@ -79,6 +79,11 @@
 
     # Interface from BaseFolder
     def suggeststhreads(self):
+        onethread = self.config.getdefaultboolean(
+            "Repository %s"% self.repository.getname(),
+            "singlethreadperfolder", False)
+        if onethread is True:
+            return False
         return not globals.options.singlethreading
 
     # Interface from BaseFolder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/folder/Maildir.py 
new/offlineimap-7.0.6/offlineimap/folder/Maildir.py
--- old/offlineimap-7.0.5/offlineimap/folder/Maildir.py 2016-08-10 
15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/offlineimap/folder/Maildir.py 2016-08-21 
20:43:03.000000000 +0200
@@ -158,8 +158,9 @@
         This handles the edge cases where the date is much earlier than 
messages
         with similar UID's (e.g. the UID was reassigned much later).
 
-        Maildir flags are: R (replied) S (seen) T (trashed) D (draft) F
-        (flagged), plus lower-case letters for custom flags.
+        Maildir flags are:
+            D (draft) F (flagged) R (replied) S (seen) T (trashed),
+        plus lower-case letters for custom flags.
         :returns: dict that can be used as self.messagelist.
         """
 
@@ -167,7 +168,7 @@
 
         retval = {}
         files = []
-        nouidcounter = -1          # Messages without UIDs get negative UIDs.
+        nouidcounter = -1   # Messages without UIDs get negative UIDs.
         for dirannex in ['new', 'cur']:
             fulldirname = os.path.join(self.getfullname(), dirannex)
             files.extend((dirannex, filename) for
@@ -180,11 +181,11 @@
             # We store just dirannex and filename, ie 'cur/123...'
             filepath = os.path.join(dirannex, filename)
             # Check maxsize if this message should be considered.
-            if maxsize and (os.path.getsize(os.path.join(
-                        self.getfullname(), filepath)) > maxsize):
+            if maxsize and (os.path.getsize(
+                    os.path.join(self.getfullname(), filepath)) > maxsize):
                 continue
 
-            (prefix, uid, fmd5, flags) = self._parse_filename(filename)
+            prefix, uid, fmd5, flags = self._parse_filename(filename)
             if uid is None: # Assign negative uid to upload it.
                 uid = nouidcounter
                 nouidcounter -= 1
@@ -359,7 +360,7 @@
         # to give it a permanent home.
         tmpdir = os.path.join(self.getfullname(), 'tmp')
 
-        # use the mail timestamp given by either Date or Delivery-date mail
+        # Use the mail timestamp given by either Date or Delivery-date mail
         # headers.
         message_timestamp = None
         if self._filename_use_mail_timestamp:
@@ -368,14 +369,15 @@
                 if message_timestamp is None:
                     # Give a try with Delivery-date
                     date = emailutil.get_message_date(content, 'Delivery-date')
-            except:
-                # This should never happen
+            except Exception as e:
+                # This should never happen.
                 from email.Parser import Parser
                 from offlineimap.ui import getglobalui
                 datestr = Parser().parsestr(content, True).get("Date")
                 ui = getglobalui()
                 ui.warn("UID %d has invalid date %s: %s\n"
-                    "Not using message timestamp as file prefix" % (uid, 
datestr, e))
+                    "Not using message timestamp as file prefix"%
+                    (uid, datestr, e))
                 # No need to check if date is None here since it would
                 # be overridden by _gettimeseq.
         messagename = self.new_message_filename(uid, flags, 
date=message_timestamp)
@@ -387,19 +389,20 @@
                 if date is not None:
                     os.utime(os.path.join(self.getfullname(), tmpname),
                         (date, date))
-            # In case date is wrongly so far into the future as to be > max 
int32
+            # In case date is wrongly so far into the future as to be > max
+            # int32.
             except Exception as e:
                 from email.Parser import Parser
                 from offlineimap.ui import getglobalui
                 datestr = Parser().parsestr(content, True).get("Date")
                 ui = getglobalui()
                 ui.warn("UID %d has invalid date %s: %s\n"
-                    "Not changing file modification time" % (uid, datestr, e))
+                    "Not changing file modification time"% (uid, datestr, e))
 
         self.messagelist[uid] = self.msglist_item_initializer(uid)
         self.messagelist[uid]['flags'] = flags
         self.messagelist[uid]['filename'] = tmpname
-        # savemessageflags moves msg to 'cur' or 'new' as appropriate
+        # savemessageflags moves msg to 'cur' or 'new' as appropriate.
         self.savemessageflags(uid, flags)
         self.ui.debug('maildir', 'savemessage: returning uid %d' % uid)
         return uid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/imapserver.py 
new/offlineimap-7.0.6/offlineimap/imapserver.py
--- old/offlineimap-7.0.5/offlineimap/imapserver.py     2016-08-10 
15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/offlineimap/imapserver.py     2016-08-21 
20:43:03.000000000 +0200
@@ -253,6 +253,12 @@
             try:
                 response = urllib.urlopen(
                     self.oauth2_request_url, urllib.urlencode(params)).read()
+            except Exception as e:
+                try:
+                    msg = "%s (configuration is: %s)"% (e, str(params))
+                except Exception as eparams:
+                    msg = "%s [cannot display configuration: %s]"% (e, eparams)
+                six.reraise(type(e), type(e)(msg), exc_info()[2])
             finally:
                 socket.socket = original_socket
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/init.py 
new/offlineimap-7.0.6/offlineimap/init.py
--- old/offlineimap-7.0.5/offlineimap/init.py   2016-08-10 15:03:17.000000000 
+0200
+++ new/offlineimap-7.0.6/offlineimap/init.py   2016-08-21 20:43:03.000000000 
+0200
@@ -34,7 +34,10 @@
 from offlineimap.repository import Repository
 from offlineimap.folder.IMAP import MSGCOPY_NAMESPACE
 
+
 ACCOUNT_LIMITED_THREAD_NAME = 'MAX_ACCOUNTS'
+PYTHON_VERSION = sys.version.split(' ')[0]
+
 
 def syncitall(list_accounts, config):
     """The target when in multithreading mode for running accounts threads."""
@@ -173,8 +176,10 @@
         globals.set_options (options)
 
         if options.version:
-            print("offlineimap v%s, imaplib2 v%s (%s)"% (
-                offlineimap.__version__, imaplib.__version__, imaplib.DESC))
+            print("offlineimap v%s, imaplib2 v%s (%s), Python v%s"% (
+                  offlineimap.__version__, imaplib.__version__, imaplib.DESC,
+                  PYTHON_VERSION)
+            )
             sys.exit(0)
 
         # Read in configuration file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap/repository/IMAP.py 
new/offlineimap-7.0.6/offlineimap/repository/IMAP.py
--- old/offlineimap-7.0.5/offlineimap/repository/IMAP.py        2016-08-10 
15:03:17.000000000 +0200
+++ new/offlineimap-7.0.6/offlineimap/repository/IMAP.py        2016-08-21 
20:43:03.000000000 +0200
@@ -309,36 +309,40 @@
         refresh_token = self.getconf('oauth2_refresh_token', None)
         if refresh_token is None:
             refresh_token = self.localeval.eval(
-                self.getconf('oauth2_refresh_token_eval',
-                             "lambda x: None")
-                )(self.account.getname())
+                self.getconf('oauth2_refresh_token_eval', "None")
+            )
+            if refresh_token is not None:
+                refresh_token = refresh_token.strip("\n")
         return refresh_token
 
     def getoauth2_access_token(self):
         access_token = self.getconf('oauth2_access_token', None)
         if access_token is None:
             access_token = self.localeval.eval(
-                self.getconf('oauth2_access_token_eval',
-                             "lambda x: None")
-                )(self.account.getname())
+                self.getconf('oauth2_access_token_eval', "None")
+            )
+            if access_token is not None:
+                access_token = access_token.strip("\n")
         return access_token
 
     def getoauth2_client_id(self):
         client_id = self.getconf('oauth2_client_id', None)
         if client_id is None:
             client_id = self.localeval.eval(
-                self.getconf('oauth2_client_id_eval',
-                             "lambda x: None")
-                )(self.account.getname())
+                self.getconf('oauth2_client_id_eval', "None")
+            )
+            if client_id is not None:
+                client_id = client_id.strip("\n")
         return client_id
 
     def getoauth2_client_secret(self):
         client_secret = self.getconf('oauth2_client_secret', None)
         if client_secret is None:
             client_secret = self.localeval.eval(
-                self.getconf('oauth2_client_secret_eval',
-                             "lambda x: None")
-                )(self.account.getname())
+                self.getconf('oauth2_client_secret_eval', "None")
+            )
+            if client_secret is not None:
+                client_secret = client_secret.strip("\n")
         return client_secret
 
     def getpreauthtunnel(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/offlineimap-7.0.5/offlineimap.conf 
new/offlineimap-7.0.6/offlineimap.conf
--- old/offlineimap-7.0.5/offlineimap.conf      2016-08-10 15:03:17.000000000 
+0200
+++ new/offlineimap-7.0.6/offlineimap.conf      2016-08-21 20:43:03.000000000 
+0200
@@ -183,7 +183,7 @@
 # through eval, so you can (and must) use Python quoting.
 #
 # The incremental setting controls whether the file is written after each
-# account completes or once all synced accounts are complete. This is usefull 
if
+# account completes or once all synced accounts are complete. This is useful if
 # an account is sightly slower than the other. It allows keeping the previous
 # file rather than having it partially written.
 # This works best with "no" if in one-shot mode started by cron or systemd
@@ -1018,6 +1018,22 @@
 
 # This option stands in the [Repository RemoteExample] section.
 #
+# If you want to ensure that only one single thread is used to synchronize each
+# folder, set this to 'yes'. If this is set, only one thread will be used to
+# copy messages for each folder, but up to maxconnections threads will be used
+# overall, copying different folders in parallel. This option is required to
+# download in UIDs order.
+#
+# If this is unset (the default), then up to maxconnections threads are used
+# across all currently syncing folders.
+#
+# This option is EXPERIMENTAL.
+#
+#singlethreadperfolder = no
+
+
+# This option stands in the [Repository RemoteExample] section.
+#
 # OfflineIMAP normally closes IMAP server connections between refreshes if
 # the global option autorefresh is specified.  If you wish it to keep the
 # connection open, set this to true.  If not specified, the default is
@@ -1227,8 +1243,11 @@
 #
 #  http://mail.google.com/support/bin/answer.py?answer=78799&topic=12814
 #
-# To enable GMail labels synchronisation, set the option "synclabels"
-# in the corresponding "Account" section.
+# To enable GMail labels synchronisation, set the option "synclabels" in the
+# corresponding "Account" section.
+#
+# Side note: Gmail will keep the deleted emails in "Gmail\All Mail" unless you
+# defined it differently in your online settings.
 #
 type = Gmail
 


Reply via email to