public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin4][Patch] Minor fix in test file for the Template loader
7+ messages / 3 participants
[nested] [flat]
* [pgAdmin4][Patch] Minor fix in test file for the Template loader
@ 2017-01-31 05:25 Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Murtuza Zabuawala @ 2017-01-31 05:25 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
PFA patch to fix the issue in test suite for template loader.
*Issue(Python3):*
murtuza@vm:~/pgadmin4/web/regression$ python3 runtests.py
pgAdmin 4 - Application Initialisation
======================================
The configuration database - '/../.pgadmin/test_pgadmin4.db' does not exist.
Entering initial setup mode...
NOTE: Configuring authentication for SERVER mode.
The configuration database has been created at /../.pgadmin/test_pgadmin4.db
Traceback (most recent call last):
File "runtests.py", line 250, in <module>
test_module_list = get_test_modules(args)
File "runtests.py", line 138, in get_test_modules
TestsGeneratorRegistry.load_generators('pgadmin')
File "../../pgadmin4/web/pgadmin/utils/route.py", line 66, in
load_generators
import_module(module_name)
File "/../../3.5/lib/python3.5/importlib/__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 658, in exec_module
File "<frozen importlib._bootstrap_external>", line 764, in get_code
File "<frozen importlib._bootstrap_external>", line 724, in source_to_code
File "<frozen importlib._bootstrap>", line 222, in
_call_with_frames_removed
File
"/../../pgadmin4/web/pgadmin/utils/tests/test_versioned_template_loader.py",
line 50
except TemplateNotFound, e:
^
SyntaxError: invalid syntax
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] Fix_template_loader_test.patch (694B, 3-Fix_template_loader_test.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/tests/test_versioned_template_loader.py b/web/pgadmin/utils/tests/test_versioned_template_loader.py
index 3117c33..b2f5c4c 100644
--- a/web/pgadmin/utils/tests/test_versioned_template_loader.py
+++ b/web/pgadmin/utils/tests/test_versioned_template_loader.py
@@ -47,9 +47,10 @@ class TestVersionedTemplateLoader(BaseTestGenerator):
try:
self.loader.get_source(None, "some_feature/sql/#10100#/some_action.sql")
self.fail("No exception raised")
- except TemplateNotFound, e:
+ except TemplateNotFound:
return
+
class FakeApp(Flask):
def __init__(self):
super(FakeApp, self).__init__("")
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
@ 2017-01-31 10:04 ` Dave Page <[email protected]>
2017-01-31 10:32 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Ashesh Vashi <[email protected]>
2017-01-31 10:36 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
0 siblings, 2 replies; 7+ messages in thread
From: Dave Page @ 2017-01-31 10:04 UTC (permalink / raw)
To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers
Thanks Murtuza. When you get a minute, can you also look at the
following issue I get with the tests under Python 3.5? It doesn't seem
to stop them working.
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line
75, in load_generators
import_module(module_name)
File "/Users/dpage/.virtualenvs/pgadmin4-py35/lib/python3.5/importlib/__init__.py",
line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/sqlautocomplete/counter.py",
line 6, in <module>
from itertools import repeat, ifilter
ImportError: cannot import name 'ifilter'
On Tue, Jan 31, 2017 at 5:25 AM, Murtuza Zabuawala
<[email protected]> wrote:
> Hi,
>
> PFA patch to fix the issue in test suite for template loader.
>
> Issue(Python3):
> murtuza@vm:~/pgadmin4/web/regression$ python3 runtests.py
> pgAdmin 4 - Application Initialisation
> ======================================
>
>
> The configuration database - '/../.pgadmin/test_pgadmin4.db' does not exist.
> Entering initial setup mode...
> NOTE: Configuring authentication for SERVER mode.
>
>
> The configuration database has been created at /../.pgadmin/test_pgadmin4.db
> Traceback (most recent call last):
> File "runtests.py", line 250, in <module>
> test_module_list = get_test_modules(args)
> File "runtests.py", line 138, in get_test_modules
> TestsGeneratorRegistry.load_generators('pgadmin')
> File "../../pgadmin4/web/pgadmin/utils/route.py", line 66, in
> load_generators
> import_module(module_name)
> File "/../../3.5/lib/python3.5/importlib/__init__.py", line 126, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 986, in _gcd_import
> File "<frozen importlib._bootstrap>", line 969, in _find_and_load
> File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 658, in exec_module
> File "<frozen importlib._bootstrap_external>", line 764, in get_code
> File "<frozen importlib._bootstrap_external>", line 724, in source_to_code
> File "<frozen importlib._bootstrap>", line 222, in
> _call_with_frames_removed
> File
> "/../../pgadmin4/web/pgadmin/utils/tests/test_versioned_template_loader.py",
> line 50
> except TemplateNotFound, e:
> ^
> SyntaxError: invalid syntax
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
@ 2017-01-31 10:32 ` Ashesh Vashi <[email protected]>
1 sibling, 0 replies; 7+ messages in thread
From: Ashesh Vashi @ 2017-01-31 10:32 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: Murtuza Zabuawala <[email protected]>; pgadmin-hackers
Murtuza,
FYI -
http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html#itertools
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com;
*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi;
On Tue, Jan 31, 2017 at 3:34 PM, Dave Page <[email protected]> wrote:
> Thanks Murtuza. When you get a minute, can you also look at the
> following issue I get with the tests under Python 3.5? It doesn't seem
> to stop them working.
>
> Traceback (most recent call last):
> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line
> 75, in load_generators
> import_module(module_name)
> File "/Users/dpage/.virtualenvs/pgadmin4-py35/lib/python3.5/
> importlib/__init__.py",
> line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 986, in _gcd_import
> File "<frozen importlib._bootstrap>", line 969, in _find_and_load
> File "<frozen importlib._bootstrap>", line 958, in
> _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 673, in exec_module
> File "<frozen importlib._bootstrap>", line 222, in
> _call_with_frames_removed
> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/
> sqlautocomplete/counter.py",
> line 6, in <module>
> from itertools import repeat, ifilter
> ImportError: cannot import name 'ifilter'
>
>
> On Tue, Jan 31, 2017 at 5:25 AM, Murtuza Zabuawala
> <[email protected]> wrote:
> > Hi,
> >
> > PFA patch to fix the issue in test suite for template loader.
> >
> > Issue(Python3):
> > murtuza@vm:~/pgadmin4/web/regression$ python3 runtests.py
> > pgAdmin 4 - Application Initialisation
> > ======================================
> >
> >
> > The configuration database - '/../.pgadmin/test_pgadmin4.db' does not
> exist.
> > Entering initial setup mode...
> > NOTE: Configuring authentication for SERVER mode.
> >
> >
> > The configuration database has been created at
> /../.pgadmin/test_pgadmin4.db
> > Traceback (most recent call last):
> > File "runtests.py", line 250, in <module>
> > test_module_list = get_test_modules(args)
> > File "runtests.py", line 138, in get_test_modules
> > TestsGeneratorRegistry.load_generators('pgadmin')
> > File "../../pgadmin4/web/pgadmin/utils/route.py", line 66, in
> > load_generators
> > import_module(module_name)
> > File "/../../3.5/lib/python3.5/importlib/__init__.py", line 126, in
> > import_module
> > return _bootstrap._gcd_import(name[level:], package, level)
> > File "<frozen importlib._bootstrap>", line 986, in _gcd_import
> > File "<frozen importlib._bootstrap>", line 969, in _find_and_load
> > File "<frozen importlib._bootstrap>", line 958, in
> _find_and_load_unlocked
> > File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
> > File "<frozen importlib._bootstrap_external>", line 658, in
> exec_module
> > File "<frozen importlib._bootstrap_external>", line 764, in get_code
> > File "<frozen importlib._bootstrap_external>", line 724, in
> source_to_code
> > File "<frozen importlib._bootstrap>", line 222, in
> > _call_with_frames_removed
> > File
> > "/../../pgadmin4/web/pgadmin/utils/tests/test_versioned_
> template_loader.py",
> > line 50
> > except TemplateNotFound, e:
> > ^
> > SyntaxError: invalid syntax
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list ([email protected])
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
@ 2017-01-31 10:36 ` Murtuza Zabuawala <[email protected]>
2017-01-31 10:40 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
1 sibling, 1 reply; 7+ messages in thread
From: Murtuza Zabuawala @ 2017-01-31 10:36 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers
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
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Tue, Jan 31, 2017 at 3:34 PM, Dave Page <[email protected]> wrote:
> Thanks Murtuza. When you get a minute, can you also look at the
> following issue I get with the tests under Python 3.5? It doesn't seem
> to stop them working.
>
> Traceback (most recent call last):
> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line
> 75, in load_generators
> import_module(module_name)
> File "/Users/dpage/.virtualenvs/pgadmin4-py35/lib/python3.5/
> importlib/__init__.py",
> line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 986, in _gcd_import
> File "<frozen importlib._bootstrap>", line 969, in _find_and_load
> File "<frozen importlib._bootstrap>", line 958, in
> _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 673, in exec_module
> File "<frozen importlib._bootstrap>", line 222, in
> _call_with_frames_removed
> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/
> sqlautocomplete/counter.py",
> line 6, in <module>
> from itertools import repeat, ifilter
> ImportError: cannot import name 'ifilter'
>
>
> On Tue, Jan 31, 2017 at 5:25 AM, Murtuza Zabuawala
> <[email protected]> wrote:
> > Hi,
> >
> > PFA patch to fix the issue in test suite for template loader.
> >
> > Issue(Python3):
> > murtuza@vm:~/pgadmin4/web/regression$ python3 runtests.py
> > pgAdmin 4 - Application Initialisation
> > ======================================
> >
> >
> > The configuration database - '/../.pgadmin/test_pgadmin4.db' does not
> exist.
> > Entering initial setup mode...
> > NOTE: Configuring authentication for SERVER mode.
> >
> >
> > The configuration database has been created at
> /../.pgadmin/test_pgadmin4.db
> > Traceback (most recent call last):
> > File "runtests.py", line 250, in <module>
> > test_module_list = get_test_modules(args)
> > File "runtests.py", line 138, in get_test_modules
> > TestsGeneratorRegistry.load_generators('pgadmin')
> > File "../../pgadmin4/web/pgadmin/utils/route.py", line 66, in
> > load_generators
> > import_module(module_name)
> > File "/../../3.5/lib/python3.5/importlib/__init__.py", line 126, in
> > import_module
> > return _bootstrap._gcd_import(name[level:], package, level)
> > File "<frozen importlib._bootstrap>", line 986, in _gcd_import
> > File "<frozen importlib._bootstrap>", line 969, in _find_and_load
> > File "<frozen importlib._bootstrap>", line 958, in
> _find_and_load_unlocked
> > File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
> > File "<frozen importlib._bootstrap_external>", line 658, in
> exec_module
> > File "<frozen importlib._bootstrap_external>", line 764, in get_code
> > File "<frozen importlib._bootstrap_external>", line 724, in
> source_to_code
> > File "<frozen importlib._bootstrap>", line 222, in
> > _call_with_frames_removed
> > File
> > "/../../pgadmin4/web/pgadmin/utils/tests/test_versioned_
> template_loader.py",
> > line 50
> > except TemplateNotFound, e:
> > ^
> > SyntaxError: invalid syntax
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list ([email protected])
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
2017-01-31 10:36 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
@ 2017-01-31 10:40 ` Dave Page <[email protected]>
2017-01-31 10:49 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Dave Page @ 2017-01-31 10:40 UTC (permalink / raw)
To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers
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
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
2017-01-31 10:36 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:40 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
@ 2017-01-31 10:49 ` Murtuza Zabuawala <[email protected]>
2017-01-31 12:12 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Murtuza Zabuawala @ 2017-01-31 10:49 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
2017-01-31 10:36 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:40 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Dave Page <[email protected]>
2017-01-31 10:49 ` Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
@ 2017-01-31 12:12 ` Dave Page <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Dave Page @ 2017-01-31 12:12 UTC (permalink / raw)
To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers
Works a treat - thanks, applied.
On Tue, Jan 31, 2017 at 10:49 AM, Murtuza Zabuawala
<[email protected]> wrote:
> 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
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2017-01-31 12:12 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 05:25 [pgAdmin4][Patch] Minor fix in test file for the Template loader Murtuza Zabuawala <[email protected]>
2017-01-31 10:04 ` Dave Page <[email protected]>
2017-01-31 10:32 ` Ashesh Vashi <[email protected]>
2017-01-31 10:36 ` Murtuza Zabuawala <[email protected]>
2017-01-31 10:40 ` Dave Page <[email protected]>
2017-01-31 10:49 ` Murtuza Zabuawala <[email protected]>
2017-01-31 12:12 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox