Repository: psychopy/psychopy

Issue:
psychopy->Tools->psychopy updates has gotten version numbers backward for awhile
This has been a problem for quite awhile I think, but I didn't find it here, surprising that it doesn't recognise what is greater than less than because I know there's a function spceifically for comparing version numbers..
<img width="459" alt="screen shot 2017-06-22 at 11 24 48" src="https://user-images.githubusercontent.com/886094/27413286-bdf49508-573d-11e7-9ff7-1198d8b3c69d.png">



Discussion:
Is this issue able to be closed?
Perhaps (I myself haven't followed the issue, sorry).

On Tue, Nov 21, 2017 at 1:45 PM, Jason Bowen <notifications@github.com>
wrote:

> Is this issue able to be closed?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/psychopy/psychopy/issues/1443#issuecomment-345899419>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AA2FThpM06H4dKZZD2663lRdIcLOcFuCks5s4jk7gaJpZM4OBtMK>
> .
>



-- 
Alex Holcombe | Associate Professor
School of Psychology | Faculty of Science
The University of Sydney
Web <http://www.psych.usyd.edu.au/staff/alexh/lab/>, Twitter
<https://twitter.com/ceptional>, Map
<http://openwetware.org/wiki/Holcombe:Location>


Resolving patch:
diff --git a/psychopy/app/connections.py b/psychopy/app/connections.py
--- a/psychopy/app/connections.py
+++ b/psychopy/app/connections.py
@@ -136,7 +136,8 @@ def suggestUpdate(self, confirmationDlg=False):
             raise(err)
         skip = self.app.prefs.appData['skipVersion'] == self.latest['version']
         if newer and not skip:
-            if self.latest['lastUpdatable'] <= self.runningVersion:
+            if (parse_version(self.latest['lastUpdatable'])
+                    <= parse_version(self.runningVersion)):
                 # go to the updating window
                 confirmDlg = SuggestUpdateDialog(
                     self.latest, self.runningVersion)
@@ -347,7 +348,8 @@ def updateStatus(self):
             msg += _translate("PsychoPy could not connect to the \n internet"
                               " to check for more recent versions.\n")
             msg += _translate("Check proxy settings in preferences.")
-        elif self.latest['version'] < self.runningVersion:
+        elif (parse_version(self.latest['version'])
+                  < parse_version(self.runningVersion)):
             msg = _translate(
                 "You are running PsychoPy (%s), which is ahead of the latest"
                 " official version (%s)") % (self.runningVersion,
@@ -362,7 +364,8 @@ def updateStatus(self):
                 "PsychoPy v%(latest)s is available\nYou are running v%(running)s")
             msg = txt % {'latest': self.latest['version'],
                          'running': self.runningVersion}
-            if self.latest['lastUpdatable'] <= self.runningVersion:
+            if (parse_version(self.latest['lastUpdatable'])
+                                  <= parse_version(self.runningVersion)):
                 msg += _translate("\nYou can update to the latest version automatically")
             else:
                 msg += _translate("\nYou cannot update to the latest version "


Test patch: