Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BE889200D61 for ; Tue, 14 Nov 2017 00:29:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BD28B160BF3; Mon, 13 Nov 2017 23:29:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 06A0E160C06 for ; Tue, 14 Nov 2017 00:29:44 +0100 (CET) Received: (qmail 15381 invoked by uid 500); 13 Nov 2017 23:29:44 -0000 Mailing-List: contact dev-help@madlib.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@madlib.apache.org Delivered-To: mailing list dev@madlib.apache.org Received: (qmail 15363 invoked by uid 99); 13 Nov 2017 23:29:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2017 23:29:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CF463DFCF9; Mon, 13 Nov 2017 23:29:43 +0000 (UTC) From: iyerr3 To: dev@madlib.apache.org Reply-To: dev@madlib.apache.org References: In-Reply-To: Subject: [GitHub] madlib pull request #197: Fix madlib version parsing for upgrade Content-Type: text/plain Message-Id: <20171113232943.CF463DFCF9@git1-us-west.apache.org> Date: Mon, 13 Nov 2017 23:29:43 +0000 (UTC) archived-at: Mon, 13 Nov 2017 23:29:45 -0000 Github user iyerr3 commented on a diff in the pull request: https://github.com/apache/madlib/pull/197#discussion_r150697403 --- Diff: src/madpack/upgrade_util.py --- @@ -142,11 +142,11 @@ def _load(self): """ # _mad_dbrev = 1.9.1 - if self._mad_dbrev.split('.') < '1.10.0'.split('.'): + if map(int,self._mad_dbrev.split('.')) < map(int,'1.10.0'.split('.')): --- End diff -- The change would have to go in both modules i.e. in `madpack.py` the import statement will have to be `import upgrade_util` instead of the `from upgrade_util import ...`. Alternatively, you could move the functions to `upgrade_util.py`, thus eliminating the circular imports. ---