Hello community,

here is the log from the commit of package kajongg for openSUSE:Factory checked 
in at 2017-01-18 21:46:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kajongg (Old)
 and      /work/SRC/openSUSE:Factory/.kajongg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kajongg"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kajongg/kajongg.changes  2016-12-17 
10:32:42.648360286 +0100
+++ /work/SRC/openSUSE:Factory/.kajongg.new/kajongg.changes     2017-01-18 
21:46:30.060743934 +0100
@@ -1,0 +2,7 @@
+Sat Jan 14 08:51:20 UTC 2017 - lbeltr...@kde.org
+
+- - Update to KDE Applications 16.12.1
+   * KDE Applications 16.12.1 
+   * https://www.kde.org/announcements/announce-applications-16.12.1.php
+
+-------------------------------------------------------------------

Old:
----
  kajongg-16.12.0.tar.xz

New:
----
  kajongg-16.12.1.tar.xz

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

Other differences:
------------------
++++++ kajongg.spec ++++++
--- /var/tmp/diff_new_pack.CKu3HM/_old  2017-01-18 21:46:31.072600810 +0100
+++ /var/tmp/diff_new_pack.CKu3HM/_new  2017-01-18 21:46:31.076600244 +0100
@@ -17,10 +17,10 @@
 
 
 Name:           kajongg
-Version:        16.12.0
+Version:        16.12.1
 Release:        0
 %define kf5_version 5.26.0
-# Latest stable Applications (e.g. 16.08 in KA, but 16.12.0 in KUA)
+# Latest stable Applications (e.g. 16.08 in KA, but 16.12.1 in KUA)
 %{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print 
$1"."$2}')}
 Summary:        4 Player Mahjongg game
 License:        GPL-2.0+

++++++ kajongg-16.12.0.tar.xz -> kajongg-16.12.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/animation.py 
new/kajongg-16.12.1/src/animation.py
--- old/kajongg-16.12.0/src/animation.py        2016-12-03 12:02:49.000000000 
+0100
+++ new/kajongg-16.12.1/src/animation.py        2017-01-06 23:13:40.000000000 
+0100
@@ -138,8 +138,8 @@
             if self.debug or ParallelAnimationGroup.current.debug:
                 logDebug(u'Chaining Animation group %d to %d' %
                          (id(self), id(ParallelAnimationGroup.current)))
-                self.doAfter = ParallelAnimationGroup.current.doAfter
-                ParallelAnimationGroup.current.doAfter = list()
+            self.doAfter = ParallelAnimationGroup.current.doAfter
+            ParallelAnimationGroup.current.doAfter = list()
             ParallelAnimationGroup.current.deferred.addCallback(self.start)
         else:
             self.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/background.py 
new/kajongg-16.12.1/src/background.py
--- old/kajongg-16.12.0/src/background.py       2016-12-03 12:02:49.000000000 
+0100
+++ new/kajongg-16.12.1/src/background.py       2017-01-06 23:13:40.000000000 
+0100
@@ -128,7 +128,7 @@
 
     def pixmap(self, size):
         """returns a background pixmap or None for isPlain"""
-        self.__pmap = None
+        self.__pmap = QBrush()
         if not self.isPlain:
             width = size.width()
             height = size.height()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/deferredutil.py 
new/kajongg-16.12.1/src/deferredutil.py
--- old/kajongg-16.12.0/src/deferredutil.py     2016-12-03 12:02:49.000000000 
+0100
+++ new/kajongg-16.12.1/src/deferredutil.py     2017-01-06 23:13:40.000000000 
+0100
@@ -279,11 +279,13 @@
             self.table.abort(msg, request.user.name)
         else:
             msg = m18nE('Error for player %1: %2\n%3')
-            try:
-                traceBack = result.getTraceback()
-            except BaseException:
-                # may happen with twisted 12.3.0
-                traceBack = u'twisted cannot give us a traceback'
+            if hasattr(result, 'traceback'):
+                traceBack = result.traceback
+            else:
+                try:
+                    traceBack = result.getBriefTraceback()
+                except BaseException as exc:
+                    traceBack = u'twisted cannot give us a 
traceback:{}'.format(exc)
             self.table.abort(
                 msg,
                 request.user.name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/dialogs.py 
new/kajongg-16.12.1/src/dialogs.py
--- old/kajongg-16.12.0/src/dialogs.py  2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/dialogs.py  2017-01-06 23:13:40.000000000 +0100
@@ -125,6 +125,7 @@
     def __init__(self, dlg, modal=True, always=False):
         Deferred.__init__(self)
         self.dlg = dlg
+        self.defaultResult = dlg.returns()
         self.modal = modal
         self.always = always
         if Options.gui:
@@ -145,7 +146,7 @@
             return
         scene = Internal.scene
         if not Options.gui or not isAlive(self.dlg):
-            return self.autoAnswer()
+            return self.clicked()
         autoPlay = scene and scene.game and scene.game.autoPlay
         autoAnswerDelayed = autoPlay and not self.always
         if self.modal and not autoAnswerDelayed:
@@ -155,31 +156,25 @@
         if autoAnswerDelayed:
             Internal.reactor.callLater(
                 Internal.Preferences.animationDuration() / 500.0,
-                self.autoAnswer)
-
-    def autoAnswer(self):
-        """autoPlay gets autoAnswer"""
-        result = self.dlg.returns()
-        if Internal.scene and isAlive(self.dlg):
-            self.dlg.hide()
-        self.dlg = None
-        self.callback(result)
+                self.clicked)
 
     def clicked(self, button=None):
         """we got a reaction"""
-        assert self.dlg
         if self.dlg:
             result = self.dlg.returns(button)
-            self.dlg.hide()
-            self.dlg = None
-            self.callback(result)
+        self.__removeFromScene()
+        self.callback(result)
 
     def cancel(self):
         """we want no answer, just let the dialog disappear"""
-        if self.dlg:
+        self.__removeFromScene()
+        Deferred.cancel(self)
+
+    def __removeFromScene(self):
+        """remove ourself"""
+        if self.dlg and Internal.scene and isAlive(self.dlg):
             self.dlg.hide()
         self.dlg = None
-        Deferred.cancel(self)
 
 
 class QuestionYesNo(DeferredDialog):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/handboard.py 
new/kajongg-16.12.1/src/handboard.py
--- old/kajongg-16.12.0/src/handboard.py        2016-12-03 12:02:49.000000000 
+0100
+++ new/kajongg-16.12.1/src/handboard.py        2017-01-06 23:13:40.000000000 
+0100
@@ -103,6 +103,7 @@
         self.setAcceptDrops(True)
         Internal.Preferences.addWatch(
             'rearrangeMelds', self.rearrangeMeldsChanged)
+        self.rearrangeMeldsChanged(None, Internal.Preferences.rearrangeMelds)
         Internal.Preferences.addWatch(
             'showShadows', self.showShadowsChanged)
 
@@ -211,7 +212,7 @@
         xPos = 13 - len(newBonusTiles)
         xPos = max(xPos, tileLen)
         result = list()
-        for bonus in sorted(newBonusTiles, key=lambda x: hash(x.tile)):
+        for bonus in sorted(newBonusTiles, key=lambda x: x.tile.key):
             bonus.xoffset, bonus.yoffset = xPos, bonusY
             bonus.dark = False
             result.append(bonus)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/kajonggtest.py 
new/kajongg-16.12.1/src/kajonggtest.py
--- old/kajongg-16.12.0/src/kajonggtest.py      2016-12-03 12:02:49.000000000 
+0100
+++ new/kajongg-16.12.1/src/kajonggtest.py      2017-01-06 23:13:40.000000000 
+0100
@@ -49,39 +49,41 @@
 
 OPTIONS = None
 
+KNOWNCOMMITS = set()
 
 class Clone(object):
 
     """make a temp directory for commitId"""
 
+    cacheDirectory = os.path.expanduser(os.path.join('~', '.kajongg', 
'.cache'))
+
     def __init__(self, commitId):
         self.commitId = commitId
-        if commitId is 'current':
-            self.tmpdir = os.path.abspath('..')
-            srcDir = os.path.join(self.tmpdir, 'src')
-            assert os.path.exists(srcDir), '{} does not exist'.format(srcDir)
-        else:
-            self.tmpdir = os.path.expanduser(os.path.join('~', '.kajongg', 
'.cache', commitId))
-            if not os.path.exists(self.tmpdir):
+        if commitId != 'current':
+            tmpdir = os.path.expanduser(os.path.join(self.cacheDirectory, 
commitId))
+            if not os.path.exists(tmpdir):
                 subprocess.Popen('git clone --shared --no-checkout -q .. 
{temp}'.format(
-                    temp=self.tmpdir).split()).wait()
+                    temp=tmpdir).split()).wait()
                 subprocess.Popen('git checkout -q {commitId}'.format(
-                    commitId=commitId).split(), cwd=self.tmpdir).wait()
-                if os.path.islink('twisted'):
-                    cpCmd = ['ln', '-s', '{}/twisted'.format(os.getcwd()),
-                             '{}/src/twisted'.format(self.tmpdir)]
-                    subprocess.Popen(cpCmd).wait()
+                    commitId=commitId).split(), cwd=tmpdir).wait()
 
-    @classmethod
-    def cloneDirectory(cls):
-        """the directory for this git commit"""
-        return os.path.expanduser(os.path.join('~', '.kajongg', '.cache'))
-
-    @classmethod
-    def commitDirectory(cls, commitId):
+    def sourceDirectory(self):
         """the source directory for this git commit"""
-        return os.path.join(cls.cloneDirectory(), commitId)
+        if self.commitId == 'current':
+            tmpdir = os.path.abspath('..')
+            result = os.path.join(tmpdir, 'src')
+        else:
+            result = os.path.join(self.cacheDirectory, self.commitId, 'src')
+        assert os.path.exists(result), '{} does not exist'.format(result)
+        return result
 
+    @classmethod
+    def removeObsolete(cls):
+        """remove all clones for obsolete commits"""
+        for commitDir in os.listdir(cls.cacheDirectory):
+            if not any(x.startswith(commitDir) for x in KNOWNCOMMITS):
+                removeDir = os.path.join(cls.cacheDirectory, commitDir)
+                shutil.rmtree(removeDir)
 
 class Client(object):
 
@@ -147,7 +149,6 @@
             self.start(job)
         else:
             self.jobs.append(job)
-        job.server = self
 
     @classmethod
     def allRunningJobs(cls):
@@ -156,9 +157,11 @@
 
     def start(self, job):
         """start this server"""
+        job.server = self
         assert self.process is None, 'Server.start already has a process'
         self.jobs.append(job)
-        assert self.commitId == job.commitId
+        assert self.commitId == job.commitId, 'Server.commitId {} != 
Job.commitId {}'.format(
+            self.commitId, job.commitId)
         cmd = [os.path.join(
             job.srcDir(),
             'kajonggserver.py')]
@@ -242,7 +245,9 @@
 
     def srcDir(self):
         """the path of the directory where the particular test is running"""
-        return os.path.join(Clone.commitDirectory(self.commitId), 'src')
+        assert self.server, 'Job {} has no server'.format(self)
+        assert self.server.clone, 'Job {} has no server.clone'.format(self)
+        return self.server.clone.sourceDirectory()
 
     def __startProcess(self, cmd):
         """call Popen"""
@@ -350,8 +355,6 @@
             row[idx] = field
         yield row
 
-KNOWNCOMMITS = set()
-
 
 def onlyExistingCommits(commits):
     """filter out non-existing commits"""
@@ -400,11 +403,7 @@
         except OSError:
             pass  # not yet empty
 
-    # remove all clones for obsolete commits
-    for commitDir in os.listdir(Clone.cloneDirectory()):
-        if not any(x.startswith(commitDir) for x in KNOWNCOMMITS):
-            removeDir = os.path.join(Clone.cloneDirectory(), commitDir)
-            shutil.rmtree(removeDir)
+    Clone.removeObsolete()
 
 def readGames(csvFile):
     """returns a dict holding a frozenset of games for each variant"""
@@ -566,7 +565,8 @@
                 break
             for job in running:
                 if not job.started:
-                    job.server.jobs.remove(job)
+                    if job.server:
+                        job.server.jobs.remove(job)
                 else:
                     job.check()
                     if job.process:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/kde.py 
new/kajongg-16.12.1/src/kde.py
--- old/kajongg-16.12.0/src/kde.py      2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/kde.py      2017-01-06 23:13:40.000000000 +0100
@@ -25,7 +25,7 @@
 import shutil
 import sip
 
-from common import Internal, Options, unicode, isPython3
+from common import Internal, Options, unicodeString, isPython3
 
 usingKDE = False  # pylint: disable=invalid-name
 
@@ -91,7 +91,7 @@
             # the client wants to place the socket in serverDir
             os.makedirs(serverDir)
         result = os.path.dirname(
-            unicode(KGlobal.dirs().locateLocal("appdata", ""))) + '/'
+            unicodeString(KGlobal.dirs().locateLocal("appdata", ""))) + '/'
         return result
 
 
@@ -101,7 +101,7 @@
         result = os.path.join(appdataDir(), 'cache')
     else:
         result = os.path.dirname(
-            unicode(KGlobal.dirs().locateLocal("cache", "")))
+            unicodeString(KGlobal.dirs().locateLocal("cache", "")))
         result = os.path.join(result, 'kajongg')
     if not os.path.exists(result):
         try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/kdestub.py 
new/kajongg-16.12.1/src/kdestub.py
--- old/kajongg-16.12.0/src/kdestub.py  2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/kdestub.py  2017-01-06 23:13:40.000000000 +0100
@@ -55,7 +55,7 @@
 # pylint: disable=wildcard-import,unused-wildcard-import
 from qt import *
 
-from common import Internal, Debug, ENGLISHDICT, unicodeString, isPython3
+from common import Internal, Debug, ENGLISHDICT, unicodeString, isPython3, 
nativeStringArgs
 from util import uniqueList
 from statesaver import StateSaver
 
@@ -90,6 +90,7 @@
     if '%' in result:
         for idx in range(len(args)):
             result = result.replace('%%%d' % (idx + 1), '{%d}' % idx)
+        args = nativeStringArgs(args)
         result = result.format(*args)
     for ignore in ['numid', 'filename', 'interface']:
         result = result.replace('<%s>' % ignore, '')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/login.py 
new/kajongg-16.12.1/src/login.py
--- old/kajongg-16.12.0/src/login.py    2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/login.py    2017-01-06 23:13:40.000000000 +0100
@@ -579,7 +579,7 @@
     def loginCommand(self, username):
         """send a login command to server. That might be a normal login
         or adduser/deluser/change passwd encoded in the username"""
-        factory = pb.PBClientFactory()
+        factory = pb.PBClientFactory(unsafeTracebacks=True)
         self.connector = self.url.connect(factory)
         utf8Password = self.dlg.password.encode('utf-8')
         utf8Username = username.encode('utf-8')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/mainwindow.py 
new/kajongg-16.12.1/src/mainwindow.py
--- old/kajongg-16.12.0/src/mainwindow.py       2016-12-03 12:02:49.000000000 
+0100
+++ new/kajongg-16.12.1/src/mainwindow.py       2017-01-06 23:13:40.000000000 
+0100
@@ -579,11 +579,7 @@
         view, scene = self.centralView, self.scene
         if scene:
             scene.adjustView()
-            oldRect = view.sceneRect()
-            view.setSceneRect(scene.itemsBoundingRect())
-            newRect = view.sceneRect()
-            if oldRect != newRect:
-                view.fitInView(scene.itemsBoundingRect(), Qt.KeepAspectRatio)
+            view.fitInView(scene.itemsBoundingRect(), Qt.KeepAspectRatio)
 
     @afterQueuedAnimations
     def backgroundChanged(self, dummyDeferredResult, dummyOldName, newName):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/player.py 
new/kajongg-16.12.1/src/player.py
--- old/kajongg-16.12.0/src/player.py   2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/player.py   2017-01-06 23:13:40.000000000 +0100
@@ -509,7 +509,9 @@
             PlayingPlayer.addConcealedTiles(
                 self,
                 [withDiscard])  # this should NOT invoke syncHandBoard
-            if self.lastSource is not TileSource.RobbedKong:
+            if len(list(self.game.lastMoves(only=(Message.Discard, )))) == 1:
+                self.lastSource = TileSource.East14th
+            elif self.lastSource is not TileSource.RobbedKong:
                 self.lastSource = TileSource.LivingWallDiscard
             # the last claimed meld is exposed
             melds.remove(lastMeld)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/query.py 
new/kajongg-16.12.1/src/query.py
--- old/kajongg-16.12.0/src/query.py    2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/query.py    2017-01-06 23:13:40.000000000 +0100
@@ -79,7 +79,7 @@
                     break
                 except sqlite3.OperationalError as exc:
                     logDebug(
-                        u'{} failed after {} tries:{}'.format(self, _, 
exc.message))
+                        u'{} failed after {} tries:{}'.format(self, _, ' 
'.join(exc.args)))
                     time.sleep(1)
                 else:
                     break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/rulecode.py 
new/kajongg-16.12.1/src/rulecode.py
--- old/kajongg-16.12.0/src/rulecode.py 2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/rulecode.py 2017-01-06 23:13:40.000000000 +0100
@@ -528,6 +528,8 @@
         if Tile.wind not in suits or Tile.dragon in suits or len(suits) > 2:
             return set()
         suits -= {Tile.wind}
+        if not suits:
+            return set()
         group = suits.pop()
         values = set(hand.values)
         if len(values) < 12:
@@ -1325,7 +1327,6 @@
             return False
         if hand.ownWind is East:
             return False
-        assert hand.lastTile.isExposed, '{}: Blessing of Earth: last tile must 
be exposed'.format(hand)
         return True
 
     def selectable(hand):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/server.py 
new/kajongg-16.12.1/src/server.py
--- old/kajongg-16.12.0/src/server.py   2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/server.py   2017-01-06 23:13:40.000000000 +0100
@@ -488,23 +488,21 @@
     import predefined  # pylint: disable=unused-variable
     try:
         if Options.socket:
+            # we do not want tracebacks to go from server to client,
+            # please check on the server side instead
+            factory = pb.PBServerFactory(kajonggPortal, unsafeTracebacks=False)
             if os.name == 'nt':
                 if Debug.connections:
                     logDebug(
                         u'local server listening on 127.0.0.1 port %d' %
                         options.port)
-                reactor.listenTCP(
-                    options.port,
-                    pb.PBServerFactory(kajonggPortal),
-                    interface='127.0.0.1')
+                reactor.listenTCP(options.port, factory, interface='127.0.0.1')
             else:
                 if Debug.connections:
                     logDebug(
                         u'local server listening on UNIX socket %s' %
                         Options.socket)
-                reactor.listenUNIX(
-                    Options.socket,
-                    pb.PBServerFactory(kajonggPortal))
+                reactor.listenUNIX(Options.socket, factory)
         else:
             if Debug.connections:
                 logDebug(u'server listening on port %d' % options.port)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/uitile.py 
new/kajongg-16.12.1/src/uitile.py
--- old/kajongg-16.12.0/src/uitile.py   2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/uitile.py   2017-01-06 23:13:40.000000000 +0100
@@ -22,7 +22,7 @@
 from qt import QGraphicsObject, QGraphicsItem, QPixmap, QPainter, QColor
 
 from util import stack
-from log import logException, logDebug
+from log import logException, logDebug, id4
 from guiutil import Painter
 from common import LIGHTSOURCES, ZValues, Internal, Debug, isAlive
 from common import StrMixin
@@ -69,8 +69,9 @@
 
     def keyPressEvent(self, event):
         """redirect to the board"""
-        assert self == self.board.focusTile, 'id(self):%s, self:%s, 
focusTile:%s/%s' % \
-            (id(self), self, id(self.board.focusTile), self.board.focusTile)
+        if self is not self.board.focusTile:
+            logDebug('id4(self):%s, self:%s, focusTile:%s/%s' % \
+                (id4(self), self, id4(self.board.focusTile), 
self.board.focusTile))
         return self.board.keyPressEvent(event)
 
     def __lightDistance(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kajongg-16.12.0/src/user.py 
new/kajongg-16.12.1/src/user.py
--- old/kajongg-16.12.0/src/user.py     2016-12-03 12:02:49.000000000 +0100
+++ new/kajongg-16.12.1/src/user.py     2017-01-06 23:13:40.000000000 +0100
@@ -103,6 +103,9 @@
                                              'Your client has version %1 but 
you need %2 for this server'),
                                          clientVersion or '<4.9.0',
                                          
'.'.join(serverVersion.split('.')[:2]) + '.*'))
+        if Debug.table:
+            logDebug(u'client has dbIdent={} voiceId={} maxGameId={} 
clientVersion {}'.format(
+                self.dbIdent, self.voiceId, self.maxGameId, clientVersion))
         self.server.sendTables(self)
 
     def perspective_ping(self):


Reply via email to