public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
Date: Tue, 31 Jan 2017 16:19:03 +0530
Message-ID: <CAKKotZRxkS9OSd93m=Mb5i6rknAgBWMfTjKbe6Tkgiv1PXc5iw@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxozgOtQtNRTzj3HB384CvhYZRfCpPVXOTz6eom6jkf0dVQ@mail.gmail.com>
References: <CAKKotZSe8LGDeYMPSYkPaEp05-Co4pL8_Vj1VedWwSg8QC+69w@mail.gmail.com>
	<CA+OCxoyGzA_6no2GPyjCky6T1xp1jmJjxvQxYf7BHhOOgimmPw@mail.gmail.com>
	<CAKKotZRHDWB0P+Fbr3Ng_gmKokkDkOdXmo7oeYRtu7Tb4V7K4w@mail.gmail.com>
	<CA+OCxozgOtQtNRTzj3HB384CvhYZRfCpPVXOTz6eom6jkf0dVQ@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi Dave,

Please find minor patch for the same.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Tue, Jan 31, 2017 at 4:10 PM, Dave Page <[email protected]> wrote:

> On Tue, Jan 31, 2017 at 10:36 AM, Murtuza Zabuawala
> <[email protected]> wrote:
> > Hi Dave,
> >
> > Even I tested against Python3.5 but did not receive any such error and I
> > tried again after your mail but still did not receive error.
> >
> > murtuza@vm:~/pgadmin4/web/regression$ python3 --version
> >
> > Python 3.5.0
>
> Hmm, I have:
>
> (pgadmin4-py35) piranha:web dpage$ python --version
> Python 3.5.3
> (pgadmin4-py35) piranha:web dpage$ pip freeze
> Babel==1.3
> beautifulsoup4==4.4.1
> blinker==1.3
> click==6.6
> extras==0.0.3
> fixtures==2.0.0
> Flask==0.11.1
> Flask-Babel==0.11.1
> Flask-Gravatar==0.4.2
> Flask-HTMLmin==1.2
> Flask-Login==0.3.2
> Flask-Mail==0.9.1
> Flask-Principal==0.4.0
> Flask-Security==1.7.5
> Flask-SQLAlchemy==2.1
> Flask-WTF==0.12
> html5lib==1.0b3
> htmlmin==0.1.10
> itsdangerous==0.24
> Jinja2==2.7.3
> linecache2==1.0.0
> MarkupSafe==0.23
> passlib==1.6.2
> pbr==1.9.1
> psycopg2==2.6.2
> pycrypto==2.6.1
> pyrsistent==0.11.13
> python-dateutil==2.5.0
> python-mimeparse==1.5.1
> pytz==2014.10
> simplejson==3.6.5
> six==1.9.0
> speaklater==1.3
> SQLAlchemy==1.0.14
> sqlparse==0.1.19
> testscenarios==0.5.0
> testtools==2.0.0
> traceback2==1.4.0
> unittest2==1.1.0
> Werkzeug==0.9.6
> WTForms==2.0.2
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

diff --git a/web/pgadmin/utils/sqlautocomplete/counter.py b/web/pgadmin/utils/sqlautocomplete/counter.py
index 081b390..1ccd99c 100644
--- a/web/pgadmin/utils/sqlautocomplete/counter.py
+++ b/web/pgadmin/utils/sqlautocomplete/counter.py
@@ -3,7 +3,12 @@ Copied from http://code.activestate.com/recipes/576611-counter-class/
 """
 
 from heapq import nlargest
-from itertools import repeat, ifilter
+from itertools import repeat
+try:
+    from itertools import ifilter
+except ImportError:
+    # ifilter is in-built function in Python3 as filter
+    ifilter = filter
 from operator import itemgetter
 
 


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [text/plain] counter.diff (606B, 3-counter.diff)
  download | inline diff:
diff --git a/web/pgadmin/utils/sqlautocomplete/counter.py b/web/pgadmin/utils/sqlautocomplete/counter.py
index 081b390..1ccd99c 100644
--- a/web/pgadmin/utils/sqlautocomplete/counter.py
+++ b/web/pgadmin/utils/sqlautocomplete/counter.py
@@ -3,7 +3,12 @@ Copied from http://code.activestate.com/recipes/576611-counter-class/
 """
 
 from heapq import nlargest
-from itertools import repeat, ifilter
+from itertools import repeat
+try:
+    from itertools import ifilter
+except ImportError:
+    # ifilter is in-built function in Python3 as filter
+    ifilter = filter
 from operator import itemgetter
 
 


view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
  In-Reply-To: <CAKKotZRxkS9OSd93m=Mb5i6rknAgBWMfTjKbe6Tkgiv1PXc5iw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox