pgAdmin 4 commit: Don't use pycryptodome at the moment, as it doesn't p

2018-04-10 Thread Dave Page
Don't use pycryptodome at the moment, as it doesn't play well on Windows.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=051fd645d7f134af83215f783a155c8ef6db184b

Modified Files
--
requirements.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



pgAdmin 4 commit: Only avoid pre-built binaries for psycopg2 when build

2018-04-10 Thread Dave Page
Only avoid pre-built binaries for psycopg2 when building the Mac package, as 
some others (e.g. pbr) don't like being forced to source builds at the moment.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=97cf58fdc8c524ed4c85bb27ba82c54a9f46ae49

Modified Files
--
pkg/mac/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgAdmin 4 commit: Ensure the query tool will open properly under MS Edg

2018-04-10 Thread Dave Page
Ensure the query tool will open properly under MS Edge.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f5e474e4ece886830c2c7a870bee1fa8af90f4a5
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/browser/static/js/browser.js   |  4 +-
web/pgadmin/preferences/static/js/preferences.js   |  2 +-
web/pgadmin/static/js/modify_animation.js  | 53 +++---
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |  5 +-
.../javascript/browser/modify_animation_spec.js|  8 ++--
5 files changed, 47 insertions(+), 25 deletions(-)



pgAdmin 4 commit: Cleanup node modules when cleaning

2018-04-10 Thread Dave Page
Cleanup node modules when cleaning

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=be2ac25fed77963cf0e62834b074a3534e06acfa

Modified Files
--
Makefile | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



[pgAdmin4][RM#3257] Fix for explain functionality

2018-04-10 Thread Murtuza Zabuawala
Hi Dave,

A minor fix for explain functionality.

*Issue:* Due to multiline explain options in the SQL template CodeMirror
was failing to highlight the exact line of error.


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


RM_3257.diff
Description: Binary data


pgAdmin 3.0 builds

2018-04-10 Thread Dave Page
The pgAdmin 3.0 builds are at https://developer.pgadmin.org/~dpage/v3.0/.

Barring any show-stopper issues, these are what will be released on
Thursday.

As a reminder to packagers:

- This release removes dependencies on QtWebKit and/or QtWebEngine, and
uses the users default browser instead.

- Gnome 3.26 or above will require the TopIcons Plus extension to be
installed (or an equivalent). Ubuntu already seems to have this, per my
testing. Fedora does not.

A future release will resolve this last issue one way or another, but
that's a lot of work.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


[pgAdmin4] Changes required to support PyCrypto

2018-04-10 Thread Murtuza Zabuawala
Hi,

Please find patch to revert back the changes we have made for pycryptodom
module, This will fix encrypt & decrypt functionality in python3.


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


reverting_back_changes_for_pycrypto.diff
Description: Binary data


Re: pgAdmin 3.0 builds

2018-04-10 Thread Sandeep Thakkar
Hi Dave,

On Tue, Apr 10, 2018 at 4:21 PM, Dave Page  wrote:

> The pgAdmin 3.0 builds are at https://developer.pgadmin.org/~dpage/v3.0/.
>
> Barring any show-stopper issues, these are what will be released on
> Thursday.
>
> As a reminder to packagers:
>
> - This release removes dependencies on QtWebKit and/or QtWebEngine, and
> uses the users default browser instead.
>
> Will take care of this.


> - Gnome 3.26 or above will require the TopIcons Plus extension to be
> installed (or an equivalent). Ubuntu already seems to have this, per my
> testing. Fedora does not.
>
> Are you expecting the pgAdmin package should install this extension if the
desktop session is GNOME && it's version is >=3.26?


> A future release will resolve this last issue one way or another, but
> that's a lot of work.
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgAdmin 3.0 builds

2018-04-10 Thread Dave Page
On Tue, Apr 10, 2018 at 12:52 PM, Sandeep Thakkar <
sandeep.thak...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Tue, Apr 10, 2018 at 4:21 PM, Dave Page  wrote:
>
>> The pgAdmin 3.0 builds are at https://developer.pgadmin.org/~dpage/v3.0/.
>>
>> Barring any show-stopper issues, these are what will be released on
>> Thursday.
>>
>> As a reminder to packagers:
>>
>> - This release removes dependencies on QtWebKit and/or QtWebEngine, and
>> uses the users default browser instead.
>>
>> Will take care of this.
>
>
>> - Gnome 3.26 or above will require the TopIcons Plus extension to be
>> installed (or an equivalent). Ubuntu already seems to have this, per my
>> testing. Fedora does not.
>>
>> Are you expecting the pgAdmin package should install this extension if
> the desktop session is GNOME && it's version is >=3.26?
>

Not the package you're working on.  We should probably warn the user if
they need it though.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgAdmin 3.0 builds

2018-04-10 Thread Fahar Abbas
Hi Dave,

I am still able to reproduce pgadmin4 crash issue on Windows 07 64 and
Windows 2012 R2 64 on fresh VMs:

https://redmine.postgresql.org/issues/3227

Kind Regards,


On Tue, Apr 10, 2018 at 3:51 PM, Dave Page  wrote:

> The pgAdmin 3.0 builds are at https://developer.pgadmin.org/~dpage/v3.0/.
>
> Barring any show-stopper issues, these are what will be released on
> Thursday.
>
> As a reminder to packagers:
>
> - This release removes dependencies on QtWebKit and/or QtWebEngine, and
> uses the users default browser instead.
>
> - Gnome 3.26 or above will require the TopIcons Plus extension to be
> installed (or an equivalent). Ubuntu already seems to have this, per my
> testing. Fedora does not.
>
> A future release will resolve this last issue one way or another, but
> that's a lot of work.
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Fahar Abbas
QMG
EnterpriseDB Corporation
Phone Office: +92-51-835-8874
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com


Re: pgAdmin 3.0 builds

2018-04-10 Thread Dave Page
On Tue, Apr 10, 2018 at 12:54 PM, Fahar Abbas 
wrote:

> Hi Dave,
>
> I am still able to reproduce pgadmin4 crash issue on Windows 07 64 and
> Windows 2012 R2 64 on fresh VMs:
>
> https://redmine.postgresql.org/issues/3227
>

Did you ever correlate it to VMware versions as I asked last week?

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4] Changes required to support PyCrypto

2018-04-10 Thread Dave Page
On Tue, Apr 10, 2018 at 12:49 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find patch to revert back the changes we have made for pycryptodom
> module, This will fix encrypt & decrypt functionality in python3.
>

Wait, what? Are you telling me that encrypt/decrypt is broken under Python
3 in the builds I've just pushed?

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgAdmin 3.0 builds

2018-04-10 Thread Fahar Abbas
Yes Akshay is not able to reproduce this issue on VMWare Fusion 6.0.6 while
Khushboo is facing same issue on Windows 07 64.

I am using VMware Fusion 10 version and facing issue on Windows 2012 and
Windows 07 64 bit.

Kindly suggest, how i can proceed further on this, should we document this?



On Tue, Apr 10, 2018 at 4:55 PM, Dave Page  wrote:

>
>
> On Tue, Apr 10, 2018 at 12:54 PM, Fahar Abbas <
> fahar.ab...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I am still able to reproduce pgadmin4 crash issue on Windows 07 64 and
>> Windows 2012 R2 64 on fresh VMs:
>>
>> https://redmine.postgresql.org/issues/3227
>>
>
> Did you ever correlate it to VMware versions as I asked last week?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Fahar Abbas
QMG
EnterpriseDB Corporation
Phone Office: +92-51-835-8874
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com


Re: pgAdmin 3.0 builds

2018-04-10 Thread Dave Page
On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas 
wrote:

> Yes Akshay is not able to reproduce this issue on VMWare Fusion 6.0.6
> while Khushboo is facing same issue on Windows 07 64.
>
> I am using VMware Fusion 10 version and facing issue on Windows 2012 and
> Windows 07 64 bit.
>

I also cannot reproduce it in Windows 10, Windows 7 or Windows 2008r2 on
VMware Fusion 8.5.10.

Can anyone else test on Windows please?


>
> Kindly suggest, how i can proceed further on this, should we document this?
>

Ignore it for now. I'm far from convinced that it's not something odd with
your VMs.


>
>
>
> On Tue, Apr 10, 2018 at 4:55 PM, Dave Page  wrote:
>
>>
>>
>> On Tue, Apr 10, 2018 at 12:54 PM, Fahar Abbas <
>> fahar.ab...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> I am still able to reproduce pgadmin4 crash issue on Windows 07 64 and
>>> Windows 2012 R2 64 on fresh VMs:
>>>
>>> https://redmine.postgresql.org/issues/3227
>>>
>>
>> Did you ever correlate it to VMware versions as I asked last week?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Fahar Abbas
> QMG
> EnterpriseDB Corporation
> Phone Office: +92-51-835-8874
> Phone Direct: +92-51-8466803
> Mobile: +92-333-5409707
> Skype ID: syed.fahar.abbas
> Website: www.enterprisedb.com
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgAdmin 3.0 builds

2018-04-10 Thread Neel Patel
Hi,

On Tue, Apr 10, 2018 at 5:44 PM, Dave Page  wrote:

>
>
> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas  > wrote:
>
>> Yes Akshay is not able to reproduce this issue on VMWare Fusion 6.0.6
>> while Khushboo is facing same issue on Windows 07 64.
>>
>> I am using VMware Fusion 10 version and facing issue on Windows 2012 and
>> Windows 07 64 bit.
>>
>
> I also cannot reproduce it in Windows 10, Windows 7 or Windows 2008r2 on
> VMware Fusion 8.5.10.
>
> Can anyone else test on Windows please?
>

Working fine on my windows 10.


>
>>
>> Kindly suggest, how i can proceed further on this, should we document
>> this?
>>
>
> Ignore it for now. I'm far from convinced that it's not something odd with
> your VMs.
>
>
>>
>>
>>
>> On Tue, Apr 10, 2018 at 4:55 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 12:54 PM, Fahar Abbas <
>>> fahar.ab...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 I am still able to reproduce pgadmin4 crash issue on Windows 07 64 and
 Windows 2012 R2 64 on fresh VMs:

 https://redmine.postgresql.org/issues/3227

>>>
>>> Did you ever correlate it to VMware versions as I asked last week?
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Fahar Abbas
>> QMG
>> EnterpriseDB Corporation
>> Phone Office: +92-51-835-8874
>> Phone Direct: +92-51-8466803
>> Mobile: +92-333-5409707
>> Skype ID: syed.fahar.abbas
>> Website: www.enterprisedb.com
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: pgAdmin 3.0 builds

2018-04-10 Thread Fahar Abbas
Hi Neel,

On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel 
wrote:

> Hi,
>
> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page  wrote:
>
>>
>>
>> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
>> fahar.ab...@enterprisedb.com> wrote:
>>
>>> Yes Akshay is not able to reproduce this issue on VMWare Fusion 6.0.6
>>> while Khushboo is facing same issue on Windows 07 64.
>>>
>>> I am using VMware Fusion 10 version and facing issue on Windows 2012 and
>>> Windows 07 64 bit.
>>>
>>
>> I also cannot reproduce it in Windows 10, Windows 7 or Windows 2008r2 on
>> VMware Fusion 8.5.10.
>>
>> Can anyone else test on Windows please?
>>
>
> Working fine on my windows 10.
>
> This issue is not reproducible on Windows 10, can you please check this on
fresh VM of windows 2012 R2 64 and Windows 07 64 bit?


>>
>>>
>>> Kindly suggest, how i can proceed further on this, should we document
>>> this?
>>>
>>
>> Ignore it for now. I'm far from convinced that it's not something odd
>> with your VMs.
>>
>>
>>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 4:55 PM, Dave Page  wrote:
>>>


 On Tue, Apr 10, 2018 at 12:54 PM, Fahar Abbas <
 fahar.ab...@enterprisedb.com> wrote:

> Hi Dave,
>
> I am still able to reproduce pgadmin4 crash issue on Windows 07 64 and
> Windows 2012 R2 64 on fresh VMs:
>
> https://redmine.postgresql.org/issues/3227
>

 Did you ever correlate it to VMware versions as I asked last week?

 --
 Dave Page
 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

 EnterpriseDB UK: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

>>>
>>>
>>>
>>> --
>>> Fahar Abbas
>>> QMG
>>> EnterpriseDB Corporation
>>> Phone Office: +92-51-835-8874
>>> Phone Direct: +92-51-8466803
>>> Mobile: +92-333-5409707
>>> Skype ID: syed.fahar.abbas
>>> Website: www.enterprisedb.com
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Fahar Abbas
QMG
EnterpriseDB Corporation
Phone Office: +92-51-835-8874
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com


Re: [pgAdmin4] Changes required to support PyCrypto

2018-04-10 Thread Murtuza Zabuawala
On Tue, Apr 10, 2018 at 5:27 PM, Dave Page  wrote:

>
>
> On Tue, Apr 10, 2018 at 12:49 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find patch to revert back the changes we have made for pycryptodom
>> module, This will fix encrypt & decrypt functionality in python3.
>>
>
> Wait, what? Are you telling me that encrypt/decrypt is broken under Python
> 3 in the builds I've just pushed?
>
​Only if user's password contains non-ascii characters and running on
Python3.​


>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: pgAdmin 3.0 builds

2018-04-10 Thread Khushboo Vashi
On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas 
wrote:

> Hi Neel,
>
> On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel 
> wrote:
>
>> Hi,
>>
>> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
>>> fahar.ab...@enterprisedb.com> wrote:
>>>
 Yes Akshay is not able to reproduce this issue on VMWare Fusion 6.0.6
 while Khushboo is facing same issue on Windows 07 64.

 I am using VMware Fusion 10 version and facing issue on Windows 2012
 and Windows 07 64 bit.

>>>
>>> I also cannot reproduce it in Windows 10, Windows 7 or Windows 2008r2 on
>>> VMware Fusion 8.5.10.
>>>
>>> Can anyone else test on Windows please?
>>>
>>
>> Working fine on my windows 10.
>>
>> This issue is not reproducible on Windows 10, can you please check this
> on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?
>
> As usual not working for me on Windows 7 64 bit.

>
>>>

 Kindly suggest, how i can proceed further on this, should we document
 this?

>>>
>>> Ignore it for now. I'm far from convinced that it's not something odd
>>> with your VMs.
>>>
>>>



 On Tue, Apr 10, 2018 at 4:55 PM, Dave Page  wrote:

>
>
> On Tue, Apr 10, 2018 at 12:54 PM, Fahar Abbas <
> fahar.ab...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I am still able to reproduce pgadmin4 crash issue on Windows 07 64
>> and Windows 2012 R2 64 on fresh VMs:
>>
>> https://redmine.postgresql.org/issues/3227
>>
>
> Did you ever correlate it to VMware versions as I asked last week?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



 --
 Fahar Abbas
 QMG
 EnterpriseDB Corporation
 Phone Office: +92-51-835-8874
 Phone Direct: +92-51-8466803
 Mobile: +92-333-5409707
 Skype ID: syed.fahar.abbas
 Website: www.enterprisedb.com

>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Fahar Abbas
> QMG
> EnterpriseDB Corporation
> Phone Office: +92-51-835-8874
> Phone Direct: +92-51-8466803
> Mobile: +92-333-5409707
> Skype ID: syed.fahar.abbas
> Website: www.enterprisedb.com
>


Re: pgAdmin 3.0 builds

2018-04-10 Thread Dave Page
On Tue, Apr 10, 2018 at 2:36 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas  > wrote:
>
>> Hi Neel,
>>
>> On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel 
>> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page  wrote:
>>>


 On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
 fahar.ab...@enterprisedb.com> wrote:

> Yes Akshay is not able to reproduce this issue on VMWare Fusion 6.0.6
> while Khushboo is facing same issue on Windows 07 64.
>
> I am using VMware Fusion 10 version and facing issue on Windows 2012
> and Windows 07 64 bit.
>

 I also cannot reproduce it in Windows 10, Windows 7 or Windows 2008r2
 on VMware Fusion 8.5.10.

 Can anyone else test on Windows please?

>>>
>>> Working fine on my windows 10.
>>>
>>> This issue is not reproducible on Windows 10, can you please check this
>> on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?
>>
>> As usual not working for me on Windows 7 64 bit.
>

I downloaded fresh ISOs of Windows 7 64bit and Windows 2012r2 64bit from
MSDN, and installed them both in VMware Fusion 8.5.10. Each had 4GB RAM and
2 CPU cores assigned, otherwise default configs. I did not use Easy
Install, to ensure that no VMware Tools got installed (thus leaving Windows
completely clean).

- On Windows 7, IE crashed when loading pgAdmin. No great surprise - that
version is very old and won't work anyway. Installed Chrome and all is good.

- On Windows 2012r2, IE didn't crash, but as expected couldn't display
pgAdmin anyway. Installed Chrome and all is good.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4][RM#3257] Fix for explain functionality

2018-04-10 Thread Joao De Almeida Pereira
Hi Murtuza,
Looks like the tests are failing due to this change.
I also got some strange result on the linter, but I believe it is something
related to this machine.

Thanks
Joao

On Tue, Apr 10, 2018 at 6:20 AM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> A minor fix for explain functionality.
>
> *Issue:* Due to multiline explain options in the SQL template CodeMirror
> was failing to highlight the exact line of error.
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


Re: pgAdmin 3.0 builds

2018-04-10 Thread Dave Page
Hi

Windows 7 Professional here.

On Tue, Apr 10, 2018 at 3:50 PM, Fahar Abbas 
wrote:

> Hi Murtuza,
>
> I am using Windows 07 64 ultimate and updates are already applied and
> crash is still reproducible when change default browsers to chrome. So you
> are using Windows 07 Home Premium as per the snapshot.
>
> Hi Dave,
>
> Can you please let me know the version of  your Windows 07, is it ultimate
> or Home premium, it might possible that issue could be specific to Windows
> 07 ultimate
> ?
>
> Kind regards,
>
>
> On Tue, Apr 10, 2018 at 7:14 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> I also tried on my another Physical machine running Windows7, It's
>> working properly, No crash observed.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Tue, Apr 10, 2018 at 7:40 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 2:36 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas <
 fahar.ab...@enterprisedb.com> wrote:

> Hi Neel,
>
> On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel <
> neel.pa...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
>>> fahar.ab...@enterprisedb.com> wrote:
>>>
 Yes Akshay is not able to reproduce this issue on VMWare Fusion
 6.0.6 while Khushboo is facing same issue on Windows 07 64.

 I am using VMware Fusion 10 version and facing issue on Windows
 2012 and Windows 07 64 bit.

>>>
>>> I also cannot reproduce it in Windows 10, Windows 7 or Windows
>>> 2008r2 on VMware Fusion 8.5.10.
>>>
>>> Can anyone else test on Windows please?
>>>
>>
>> Working fine on my windows 10.
>>
>> This issue is not reproducible on Windows 10, can you please check
> this on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?
>
> As usual not working for me on Windows 7 64 bit.

>>>
>>> I downloaded fresh ISOs of Windows 7 64bit and Windows 2012r2 64bit from
>>> MSDN, and installed them both in VMware Fusion 8.5.10. Each had 4GB RAM and
>>> 2 CPU cores assigned, otherwise default configs. I did not use Easy
>>> Install, to ensure that no VMware Tools got installed (thus leaving Windows
>>> completely clean).
>>>
>>> - On Windows 7, IE crashed when loading pgAdmin. No great surprise -
>>> that version is very old and won't work anyway. Installed Chrome and all is
>>> good.
>>>
>>> - On Windows 2012r2, IE didn't crash, but as expected couldn't display
>>> pgAdmin anyway. Installed Chrome and all is good.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Fahar Abbas
> QMG
> EnterpriseDB Corporation
> Phone Office: +92-51-835-8874
> Phone Direct: +92-51-8466803
> Mobile: +92-333-5409707
> Skype ID: syed.fahar.abbas
> Website: www.enterprisedb.com
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Fix non-ASCII password decryption/encryption under Py

2018-04-10 Thread Dave Page
Fix non-ASCII password decryption/encryption under Python 3

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d0a640442cd6dc7bbfdb2647cf1775c13ad79a96
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/utils/crypto.py | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)



Re: [pgAdmin4] Changes required to support PyCrypto

2018-04-10 Thread Dave Page
*grumble*. Thanks, applied.

On Tue, Apr 10, 2018 at 1:52 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> On Tue, Apr 10, 2018 at 5:27 PM, Dave Page  wrote:
>
>>
>>
>> On Tue, Apr 10, 2018 at 12:49 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find patch to revert back the changes we have made for
>>> pycryptodom module, This will fix encrypt & decrypt functionality in
>>> python3.
>>>
>>
>> Wait, what? Are you telling me that encrypt/decrypt is broken under
>> Python 3 in the builds I've just pushed?
>>
> ​Only if user's password contains non-ascii characters and running on
> Python3.​
>
>
>>
>> --
>> 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


Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree

2018-04-10 Thread Joao De Almeida Pereira
Hello Khushboo

On Mon, Apr 9, 2018 at 1:59 AM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi Joao,
>
> I have reviewed your patch and have some suggestions.
>
> On Sat, Apr 7, 2018 at 12:43 AM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hello Murtuza/Dave,
>> Yes now the extracted functions are spread into different files. The
>> intent would be to make the files as small as possible, and also to group
>> and name them in a way that would be easy to understand what each file is
>> doing without the need of opening it.
>> As a example:
>> static/js/backup will contain all the backup related functionality
>> inside of this folder we can see the file:
>>
> menu_utils.js At this moment in time we decided to group all the
>> functions that are related to the menu, but we can split that also if we
>> believe it is easier to see.
>>
> It's really very good to see the separated code for backup module. As we
> have done for backup, we would like do it for other PG utilities like
> restore, maintenance etc.
> Considering this, we should separate the code in a way that some of the
> common functionalities can be used for other modules  like menu (as you
> have mentioned above), dialogue factory etc.
> Also, I think these functionalities should be in their respective static
> folder instead of pgadmin/static.
>

About the location of the files. The move of the files to pgadmin/static/js
was made on purpose in order to clearly separate Javascript from python
code.
The rational behind it was
- Create a clear separation between the backend and frontend
- Having Javascript code concentrated in a single place, hopefully, will
encourage to developers to look for a functionality, that is already
implemented in another modules, because they are right there. (When we
started this journey we realized that the 'nodes' have a big groups of code
that could be shared, but because the Javascript is spread everywhere it is
much harder to look for it)


There are some drawbacks of this separation:
- When creating a new module we will need to put the javascript in a
separate location from the backend code


>
>
>> static/js/datagrid folder contains all the datagrid related functionality
>>
> Same as backup module,  this should be in it's respective static/js folder.
>
>> Inside of the folder we can see the files:
>> get_panel_title.js is responsible for retrieving the name of the panel
>> show_data.js is responsible for showing the datagrid
>> show_query_tool.js is responsible for showing the query tool
>>
>> Does this structure make sense?
>> Can you give an example of a comment that you think is missing and that
>> could help?
>>
>> As a personal note, unless the algorithm is very obscure or very
>> complicated, I believe that if the code needs comments it is a signal that
>> something needs to change in terms of naming, structure of the part in
>> question. This being said, I am open to add some comments that might help
>> people.
>>
> You are right, with the help of naming convention and structure of the
> code, any one can get the idea about the code. But it is very useful to
> understand the code
> very easily with the proper comments especially when there are multiple
> developers working on a single project.
>
> I found some of the places where it would be great to have comments.
>
> - treeMenu: new tree.Tree()  in a browser.js
> - tree.js  (especially Tree class)
>
About the comment point I need a more clear understanding on what kind of
comments you are looking for. Because when you read the function names you
understand the intent, what they are doing. The parameters also explain
what you need to pass into them.

If what you are looking for in these comments is the reasoning being the
change itself, then that should be present in the commit message. Specially
because this is going to be a very big patch with a very big number of
changes.

>
> Thanks
>> Joao
>> ​
>>
>> Thanks,
> Khushboo
>
>>
>> On Fri, Apr 6, 2018 at 4:48 AM Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Joao,
>>>
>>> Patch looks good and working as expected.
>>>
>>> I also agree with Dave, Can we please add some comments in each file
>>> which can help us to understand the flow, I'm saying because now the code
>>> is segregated in so many separate files it will be hard to keep track of
>>> the flow from one file to another when debugging.
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> On Thu, Apr 5, 2018 at 7:08 PM, Joao De Almeida Pereira <
>>> jdealmeidapere...@pivotal.io> wrote:
>>>
 Hi Khushboo,
 Attached you can find both patches rebased

 Thanks


 On Thu, Apr 5, 2018 at 6:31 AM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Joao,
>
> Can you please rebase the second patch?
>
> Thanks,
> Khushboo
>

pgAdmin 4 commit: Revert "Fix non-ASCII password decryption/encryption

2018-04-10 Thread Dave Page
Revert "Fix non-ASCII password decryption/encryption under Python 3"

This reverts commit d0a640442cd6dc7bbfdb2647cf1775c13ad79a96.

Seems to anger Python 2.7

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=163cadc279cec25390a6dd0243e7491321ad8506

Modified Files
--
web/pgadmin/utils/crypto.py | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)



Re: [pgAdmin4] Changes required to support PyCrypto

2018-04-10 Thread Dave Page
On Tue, Apr 10, 2018 at 4:51 PM, Dave Page  wrote:

> *grumble*. Thanks, applied.
>

And reverted. When I went back to 2.7, it got very upset:

ERROR
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.tables.tests.test_table_put.TableUpdateTestCase)
Create partitions of existing range partitioned table ... 2018-04-10
17:10:57,703: ERROR pgadmin: Object type  cannot be passed
to C code
Traceback (most recent call last):
  File
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
line 962, in connect
if password is not None else server.password
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/crypto.py", line 31, in
encrypt
cipher = AES.new(pad(key), AES.MODE_CFB, iv)
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/Crypto/Cipher/AES.py",
line 200, in new
return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/Crypto/Cipher/__init__.py",
line 55, in _create_cipher
return modes[mode](factory, **kwargs)
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/Crypto/Cipher/_mode_cfb.py",
line 230, in _create_cfb_cipher
cipher_state = factory._create_base_cipher(kwargs)
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/Crypto/Cipher/AES.py",
line 100, in _create_base_cipher
result = start_operation(c_uint8_ptr(key),
  File
"/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/Crypto/Util/_raw_api.py",
line 151, in c_uint8_ptr
raise TypeError("Object type %s cannot be passed to C code" %
type(data))
TypeError: Object type  cannot be passed to C code



>
> On Tue, Apr 10, 2018 at 1:52 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> On Tue, Apr 10, 2018 at 5:27 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 12:49 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find patch to revert back the changes we have made for
 pycryptodom module, This will fix encrypt & decrypt functionality in
 python3.

>>>
>>> Wait, what? Are you telling me that encrypt/decrypt is broken under
>>> Python 3 in the builds I've just pushed?
>>>
>> ​Only if user's password contains non-ascii characters and running on
>> Python3.​
>>
>>
>>>
>>> --
>>> 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
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgAdmin 3.0 builds

2018-04-10 Thread Khushboo Vashi
On Tue, 10 Apr 2018, 20:20 Fahar Abbas, 
wrote:

> Hi Murtuza,
>
> I am using Windows 07 64 ultimate and updates are already applied and
> crash is still reproducible when change default browsers to chrome. So you
> are using Windows 07 Home Premium as per the snapshot.
>
> Hi Dave,
>
> Can you please let me know the version of  your Windows 07, is it ultimate
> or Home premium, it might possible that issue could be specific to Windows
> 07 ultimate
> ?
>
Looks like failing with Windows 7 ultimate as I tested it on ultimate and
crashed.

>
> Kind regards,
>
>
> On Tue, Apr 10, 2018 at 7:14 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> I also tried on my another Physical machine running Windows7, It's
>> working properly, No crash observed.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Tue, Apr 10, 2018 at 7:40 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 2:36 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas <
 fahar.ab...@enterprisedb.com> wrote:

> Hi Neel,
>
> On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel <
> neel.pa...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
>>> fahar.ab...@enterprisedb.com> wrote:
>>>
 Yes Akshay is not able to reproduce this issue on VMWare Fusion
 6.0.6 while Khushboo is facing same issue on Windows 07 64.

 I am using VMware Fusion 10 version and facing issue on Windows
 2012 and Windows 07 64 bit.

>>>
>>> I also cannot reproduce it in Windows 10, Windows 7 or Windows
>>> 2008r2 on VMware Fusion 8.5.10.
>>>
>>> Can anyone else test on Windows please?
>>>
>>
>> Working fine on my windows 10.
>>
>> This issue is not reproducible on Windows 10, can you please check
> this on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?
>
> As usual not working for me on Windows 7 64 bit.

>>>
>>> I downloaded fresh ISOs of Windows 7 64bit and Windows 2012r2 64bit from
>>> MSDN, and installed them both in VMware Fusion 8.5.10. Each had 4GB RAM and
>>> 2 CPU cores assigned, otherwise default configs. I did not use Easy
>>> Install, to ensure that no VMware Tools got installed (thus leaving Windows
>>> completely clean).
>>>
>>> - On Windows 7, IE crashed when loading pgAdmin. No great surprise -
>>> that version is very old and won't work anyway. Installed Chrome and all is
>>> good.
>>>
>>> - On Windows 2012r2, IE didn't crash, but as expected couldn't display
>>> pgAdmin anyway. Installed Chrome and all is good.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Fahar Abbas
> QMG
> EnterpriseDB Corporation
> Phone Office: +92-51-835-8874
> Phone Direct: +92-51-8466803
> Mobile: +92-333-5409707
> Skype ID: syed.fahar.abbas
> Website: www.enterprisedb.com
>


Re: pgAdmin 3.0 builds

2018-04-10 Thread Murtuza Zabuawala
I don't think sub version matters here.

On Tue, 10 Apr 2018, 22:08 Khushboo Vashi, 
wrote:

>
>
> On Tue, 10 Apr 2018, 20:20 Fahar Abbas, 
> wrote:
>
>> Hi Murtuza,
>>
>> I am using Windows 07 64 ultimate and updates are already applied and
>> crash is still reproducible when change default browsers to chrome. So you
>> are using Windows 07 Home Premium as per the snapshot.
>>
>> Hi Dave,
>>
>> Can you please let me know the version of  your Windows 07, is it
>> ultimate or Home premium, it might possible that issue could be specific to
>> Windows 07 ultimate
>> ?
>>
> Looks like failing with Windows 7 ultimate as I tested it on ultimate and
> crashed.
>
>>
>> Kind regards,
>>
>>
>> On Tue, Apr 10, 2018 at 7:14 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> I also tried on my another Physical machine running Windows7, It's
>>> working properly, No crash observed.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> On Tue, Apr 10, 2018 at 7:40 PM, Dave Page  wrote:
>>>


 On Tue, Apr 10, 2018 at 2:36 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas <
> fahar.ab...@enterprisedb.com> wrote:
>
>> Hi Neel,
>>
>> On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel <
>> neel.pa...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page 
>>> wrote:
>>>


 On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
 fahar.ab...@enterprisedb.com> wrote:

> Yes Akshay is not able to reproduce this issue on VMWare Fusion
> 6.0.6 while Khushboo is facing same issue on Windows 07 64.
>
> I am using VMware Fusion 10 version and facing issue on Windows
> 2012 and Windows 07 64 bit.
>

 I also cannot reproduce it in Windows 10, Windows 7 or Windows
 2008r2 on VMware Fusion 8.5.10.

 Can anyone else test on Windows please?

>>>
>>> Working fine on my windows 10.
>>>
>>> This issue is not reproducible on Windows 10, can you please check
>> this on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?
>>
>> As usual not working for me on Windows 7 64 bit.
>

 I downloaded fresh ISOs of Windows 7 64bit and Windows 2012r2 64bit
 from MSDN, and installed them both in VMware Fusion 8.5.10. Each had 4GB
 RAM and 2 CPU cores assigned, otherwise default configs. I did not use Easy
 Install, to ensure that no VMware Tools got installed (thus leaving Windows
 completely clean).

 - On Windows 7, IE crashed when loading pgAdmin. No great surprise -
 that version is very old and won't work anyway. Installed Chrome and all is
 good.

 - On Windows 2012r2, IE didn't crash, but as expected couldn't display
 pgAdmin anyway. Installed Chrome and all is good.

 --
 Dave Page
 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

 EnterpriseDB UK: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

>>>
>>>
>>
>>
>> --
>> Fahar Abbas
>> QMG
>> EnterpriseDB Corporation
>> Phone Office: +92-51-835-8874
>> Phone Direct: +92-51-8466803
>> Mobile: +92-333-5409707
>> Skype ID: syed.fahar.abbas
>> Website: www.enterprisedb.com
>>
>


Re: [pgAdmin4] Changes required to support PyCrypto

2018-04-10 Thread Murtuza Zabuawala
​This is the exact code we had before pycrptodom changes, Is it fresh
virtual environment?
I suspect ​some conflicts from pycrptodom files.

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


On Tue, Apr 10, 2018 at 9:51 PM, Dave Page  wrote:

>
>
> On Tue, Apr 10, 2018 at 4:51 PM, Dave Page  wrote:
>
>> *grumble*. Thanks, applied.
>>
>
> And reverted. When I went back to 2.7, it got very upset:
>
> ERROR
> runTest (pgadmin.browser.server_groups.servers.databases.
> schemas.tables.tests.test_table_put.TableUpdateTestCase)
> Create partitions of existing range partitioned table ... 2018-04-10
> 17:10:57,703: ERROR pgadmin: Object type  cannot be
> passed to C code
> Traceback (most recent call last):
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
> line 962, in connect
> if password is not None else server.password
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/crypto.py", line 31,
> in encrypt
> cipher = AES.new(pad(key), AES.MODE_CFB, iv)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/Crypto/Cipher/AES.py", line 200, in new
> return _create_cipher(sys.modules[__name__], key, mode, *args,
> **kwargs)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/Crypto/Cipher/__init__.py", line 55, in _create_cipher
> return modes[mode](factory, **kwargs)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/Crypto/Cipher/_mode_cfb.py", line 230, in _create_cfb_cipher
> cipher_state = factory._create_base_cipher(kwargs)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/Crypto/Cipher/AES.py", line 100, in _create_base_cipher
> result = start_operation(c_uint8_ptr(key),
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/Crypto/Util/_raw_api.py", line 151, in c_uint8_ptr
> raise TypeError("Object type %s cannot be passed to C code" %
> type(data))
> TypeError: Object type  cannot be passed to C code
>
>
>
>>
>> On Tue, Apr 10, 2018 at 1:52 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> On Tue, Apr 10, 2018 at 5:27 PM, Dave Page  wrote:
>>>


 On Tue, Apr 10, 2018 at 12:49 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find patch to revert back the changes we have made for
> pycryptodom module, This will fix encrypt & decrypt functionality in
> python3.
>

 Wait, what? Are you telling me that encrypt/decrypt is broken under
 Python 3 in the builds I've just pushed?

>>> ​Only if user's password contains non-ascii characters and running on
>>> Python3.​
>>>
>>>

 --
 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
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][RM#3257] Fix for explain functionality

2018-04-10 Thread Murtuza Zabuawala
Thanks for reviewing Joao.

Yeah missed to run tests. I assumed its just a SQL formatting it wouldn't
hurt anything but I was wrong :)
Here's updated patch.

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


On Tue, Apr 10, 2018 at 8:18 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Murtuza,
> Looks like the tests are failing due to this change.
> I also got some strange result on the linter, but I believe it is
> something related to this machine.
>
> Thanks
> Joao
>
> On Tue, Apr 10, 2018 at 6:20 AM Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> A minor fix for explain functionality.
>>
>> *Issue:* Due to multiline explain options in the SQL template CodeMirror
>> was failing to highlight the exact line of error.
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>


RM_3257_v1.diff
Description: Binary data


Ignoring web/yarn-error.log and runtime/moc_LogWindow.cpp

2018-04-10 Thread Rahul Soshte
These are generated files.
We can choose to ignore them.
diff --git a/.gitignore b/.gitignore
index 467505c7..3bec41ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,3 +40,4 @@ web/regression/test_config.json
 node_modules/
 web/pgAdmin/static/js/generated
 web/pgadmin/static/js/generated
+web/yarn-error.log
\ No newline at end of file
diff --git a/runtime/.gitignore b/runtime/.gitignore
index 5968496c..5793f773 100644
--- a/runtime/.gitignore
+++ b/runtime/.gitignore
@@ -15,3 +15,4 @@ ui_BrowserWindow.h
 ui_ConfigWindow.h
 ui_LogWindow.h
 object_script.*
+moc_LogWindow.cpp
\ No newline at end of file

Re: [pgAdmin4][Patch][Feature #1998] Appends .sql if extension not given when using 'save' or 'save as' feature

2018-04-10 Thread Rahul Soshte
I am trying to access the value in the format combobox for selected file
type to put it here..

This snippet happens to be in
web/pgadmin/tools/sqleditor/static/js/sqleditor.js



How do I get access to that format combobox value to determine whether it
is 'sql' or 'All Files' ?
Also What is e here ?

This passed as to sqleditor's save_file method as seen from the code here.

This snippet happens to be in web/pgadmin/tools/sqleditor/__init__.py






On Sat, Mar 31, 2018 at 12:05 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

>
> Then that's browser specific issue, please create one redmine ticket
>  for the issue.​
>
>
> On Fri, Mar 30, 2018 at 11:36 PM, Rahul Soshte 
> wrote:
>
>> Yeah the code is present.I have attached the screenshot.
>> Also  I have noticed that the format combobox appears clearly in my
>> Vivaldi Browser but it is not seen in my Firefox Browser.
>>
>> On Fri, Mar 30, 2018 at 9:59 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> ​I don't think so, Could you inspect html/css code on 'Save as' dialog
>>> within your browser window and see if it's present or not?​
>>>
>>>
>>> On Fri, Mar 30, 2018 at 8:30 PM, Rahul Soshte 
>>> wrote:
>>>
 Hi,
 I don't know why that combobox is not seen in my environment.I am using
 Ubuntu 17.10.I have attached the screenshot.
 Is this a bug?



 On Fri, Mar 30, 2018 at 7:07 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> ++ Attaching screenshot
>
> On Fri, Mar 30, 2018 at 7:06 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Rahul,
>>
>> When I said .sql extension, I meant selected sql option in 'Format'
>> combobox (check the screenshot I've attached)
>>
>> For the error you've mentioned you can create Fake application
>> context.
>> Ref: ../web/pgadmin/dashboard/tests/test_dashboard_templates.py +274
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Fri, Mar 30, 2018 at 6:36 PM, Rahul Soshte <
>> rahulsoshte...@gmail.com> wrote:
>>
>>> Hi,
>>> I tried writing tests in the web/pgadmin/tools/sqleditor/ut
>>> ils/tests/test_save_query_to_file_utils
>>> for the file web/pgadmin/tools/sqleditor/ut
>>> ils/tests/save_query_to_file_utils.py
>>>
>>> But I am getting a error,
>>>
>>> ERROR: runTest (pgadmin.tools.sqleditor.utils
>>> .tests.test_save_query_to_file_utils.TestSaveQueryToFile)
>>> When user has entered the extension .sql to the file while saving
>>> 
>>> --
>>> Traceback (most recent call last):
>>>   File "/var/www/flask/pgadmin4/pgadmin4/web/pgadmin/tools/sqledito
>>> r/utils/tests/test_save_query_to_file_utils.py", line 42, in runTest
>>> file_path_result = save_query_to_file(self.file_data)
>>>   File "/var/www/flask/pgadmin4/pgadmin4/web/pgadmin/tools/sqledito
>>> r/utils/save_query_to_file_utils.py", line 15, in save_query_to_file
>>> storage_manager_path = get_storage_directory()
>>>   File 
>>> "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/flask_login.py",
>>> line 788, in decorated_view
>>> if current_app.login_manager._login_disabled:
>>>   File 
>>> "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/werkzeug/local.py",
>>> line 338, in __getattr__
>>> return getattr(self._get_current_object(), name)
>>>   File 
>>> "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/werkzeug/local.py",
>>> line 297, in _get_current_object
>>> return self.__local()
>>>   File 
>>> "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/flask/globals.py",
>>> line 51, in _find_app
>>> raise RuntimeError(_app_ctx_err_msg)
>>> RuntimeError: Working outside of application context.
>>>
>>> How do I test the extracted code inside context? How do I resolve
>>> this error.
>>> I have attached test_save_query_to_file_utils.py
>>> and save_query_to_file_utils.py
>>>
>>> Murtuza, Actually I didnt find any toggable button in the File
>>> Dialog Box So I made it general purpose ( I guess I will have to make 
>>> one
>>> then and then if I select SQL all .sql files should be listed, and if I
>>> select All files then every type of file is shown in the File Dialog
>>> Box,this will be a new feature, wouldnt it ?  )
>>>
>>>
>>> On Fri, Mar 30, 2018 at 4:10 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>


 On Thu, Mar 29, 2018 at 11:45 PM, Joao De Almeida Pereira <
 jdealmeidapere...@pivotal.io> wrote:

>

Re: pgAdmin 3.0 builds

2018-04-10 Thread Fahar Abbas
Hi Dave/Team!

I just downloaded fresh iso and created new VM of Windows 2012 R2 server
from MSDN subscription and crash issue is still reproduce.
Now checking on Windows 07 Home basic 32 bit and Windows 07 Professional 64
bit.

Kind Regards


On Tue, Apr 10, 2018 at 10:15 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> I don't think sub version matters here.
>
> On Tue, 10 Apr 2018, 22:08 Khushboo Vashi,  com> wrote:
>
>>
>>
>> On Tue, 10 Apr 2018, 20:20 Fahar Abbas, 
>> wrote:
>>
>>> Hi Murtuza,
>>>
>>> I am using Windows 07 64 ultimate and updates are already applied and
>>> crash is still reproducible when change default browsers to chrome. So you
>>> are using Windows 07 Home Premium as per the snapshot.
>>>
>>> Hi Dave,
>>>
>>> Can you please let me know the version of  your Windows 07, is it
>>> ultimate or Home premium, it might possible that issue could be specific to
>>> Windows 07 ultimate
>>> ?
>>>
>> Looks like failing with Windows 7 ultimate as I tested it on ultimate and
>> crashed.
>>
>>>
>>> Kind regards,
>>>
>>>
>>> On Tue, Apr 10, 2018 at 7:14 PM, Murtuza Zabuawala >> enterprisedb.com> wrote:
>>>
 I also tried on my another Physical machine running Windows7, It's
 working properly, No crash observed.

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


 On Tue, Apr 10, 2018 at 7:40 PM, Dave Page  wrote:

>
>
> On Tue, Apr 10, 2018 at 2:36 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas <
>> fahar.ab...@enterprisedb.com> wrote:
>>
>>> Hi Neel,
>>>
>>> On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel <
>>> neel.pa...@enterprisedb.com> wrote:
>>>
 Hi,

 On Tue, Apr 10, 2018 at 5:44 PM, Dave Page 
 wrote:

>
>
> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
> fahar.ab...@enterprisedb.com> wrote:
>
>> Yes Akshay is not able to reproduce this issue on VMWare Fusion
>> 6.0.6 while Khushboo is facing same issue on Windows 07 64.
>>
>> I am using VMware Fusion 10 version and facing issue on Windows
>> 2012 and Windows 07 64 bit.
>>
>
> I also cannot reproduce it in Windows 10, Windows 7 or Windows
> 2008r2 on VMware Fusion 8.5.10.
>
> Can anyone else test on Windows please?
>

 Working fine on my windows 10.

 This issue is not reproducible on Windows 10, can you please check
>>> this on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?
>>>
>>> As usual not working for me on Windows 7 64 bit.
>>
>
> I downloaded fresh ISOs of Windows 7 64bit and Windows 2012r2 64bit
> from MSDN, and installed them both in VMware Fusion 8.5.10. Each had 4GB
> RAM and 2 CPU cores assigned, otherwise default configs. I did not use 
> Easy
> Install, to ensure that no VMware Tools got installed (thus leaving 
> Windows
> completely clean).
>
> - On Windows 7, IE crashed when loading pgAdmin. No great surprise -
> that version is very old and won't work anyway. Installed Chrome and all 
> is
> good.
>
> - On Windows 2012r2, IE didn't crash, but as expected couldn't display
> pgAdmin anyway. Installed Chrome and all is good.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


>>>
>>>
>>> --
>>> Fahar Abbas
>>> QMG
>>> EnterpriseDB Corporation
>>> Phone Office: +92-51-835-8874
>>> Phone Direct: +92-51-8466803
>>> Mobile: +92-333-5409707
>>> Skype ID: syed.fahar.abbas
>>> Website: www.enterprisedb.com
>>>
>>


-- 
Fahar Abbas
QMG
EnterpriseDB Corporation
Phone Office: +92-51-835-8874
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com


Re: pgAdmin 3.0 builds

2018-04-10 Thread Fahar Abbas
Hi Dave,

Now i know the actual root-cause of the issue. After further investigation,
i realized that pgAdmin4 applications works fine on same Windows 2012 R2
and Windows 07 64 bit VM once Administrator user does not contain any
space. Normally I use Fahar Abbas with Administrator user privileges and
issue is reproducible on my all VMs except windows 10 where i was using
administrator user instead of Fahar Abbas.

It would be your decision to fix that issue on current release cycle and
meanwhile resuming verification with Administrator Account.

Kind Regards,





On Wed, Apr 11, 2018 at 9:51 AM, Fahar Abbas 
wrote:

> Hi Dave/Team!
>
> I just downloaded fresh iso and created new VM of Windows 2012 R2 server
> from MSDN subscription and crash issue is still reproduce.
> Now checking on Windows 07 Home basic 32 bit and Windows 07 Professional
> 64 bit.
>
> Kind Regards
>
>
> On Tue, Apr 10, 2018 at 10:15 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> I don't think sub version matters here.
>>
>> On Tue, 10 Apr 2018, 22:08 Khushboo Vashi, > om> wrote:
>>
>>>
>>>
>>> On Tue, 10 Apr 2018, 20:20 Fahar Abbas, 
>>> wrote:
>>>
 Hi Murtuza,

 I am using Windows 07 64 ultimate and updates are already applied and
 crash is still reproducible when change default browsers to chrome. So you
 are using Windows 07 Home Premium as per the snapshot.

 Hi Dave,

 Can you please let me know the version of  your Windows 07, is it
 ultimate or Home premium, it might possible that issue could be specific to
 Windows 07 ultimate
 ?

>>> Looks like failing with Windows 7 ultimate as I tested it on ultimate
>>> and crashed.
>>>

 Kind regards,


 On Tue, Apr 10, 2018 at 7:14 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> I also tried on my another Physical machine running Windows7, It's
> working properly, No crash observed.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> On Tue, Apr 10, 2018 at 7:40 PM, Dave Page  wrote:
>
>>
>>
>> On Tue, Apr 10, 2018 at 2:36 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Tue, Apr 10, 2018 at 6:15 PM, Fahar Abbas <
>>> fahar.ab...@enterprisedb.com> wrote:
>>>
 Hi Neel,

 On Tue, Apr 10, 2018 at 5:43 PM, Neel Patel <
 neel.pa...@enterprisedb.com> wrote:

> Hi,
>
> On Tue, Apr 10, 2018 at 5:44 PM, Dave Page 
> wrote:
>
>>
>>
>> On Tue, Apr 10, 2018 at 1:02 PM, Fahar Abbas <
>> fahar.ab...@enterprisedb.com> wrote:
>>
>>> Yes Akshay is not able to reproduce this issue on VMWare Fusion
>>> 6.0.6 while Khushboo is facing same issue on Windows 07 64.
>>>
>>> I am using VMware Fusion 10 version and facing issue on Windows
>>> 2012 and Windows 07 64 bit.
>>>
>>
>> I also cannot reproduce it in Windows 10, Windows 7 or Windows
>> 2008r2 on VMware Fusion 8.5.10.
>>
>> Can anyone else test on Windows please?
>>
>
> Working fine on my windows 10.
>
> This issue is not reproducible on Windows 10, can you please check
 this on fresh VM of windows 2012 R2 64 and Windows 07 64 bit?

 As usual not working for me on Windows 7 64 bit.
>>>
>>
>> I downloaded fresh ISOs of Windows 7 64bit and Windows 2012r2 64bit
>> from MSDN, and installed them both in VMware Fusion 8.5.10. Each had 4GB
>> RAM and 2 CPU cores assigned, otherwise default configs. I did not use 
>> Easy
>> Install, to ensure that no VMware Tools got installed (thus leaving 
>> Windows
>> completely clean).
>>
>> - On Windows 7, IE crashed when loading pgAdmin. No great surprise -
>> that version is very old and won't work anyway. Installed Chrome and all 
>> is
>> good.
>>
>> - On Windows 2012r2, IE didn't crash, but as expected couldn't
>> display pgAdmin anyway. Installed Chrome and all is good.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


 --
 Fahar Abbas
 QMG
 EnterpriseDB Corporation
 Phone Office: +92-51-835-8874
 Phone Direct: +92-51-8466803
 Mobile: +92-333-5409707
 Skype ID: syed.fahar.abbas
 Website: www.enterprisedb.com

>>>
>
>
> --
> Fahar Abbas
> QMG
> EnterpriseDB Corporation
> Phone Office: +92-51-835-8874
> Phone Direct: +92-51-8466803
> Mobile: +92-333-5409707
> Skype ID: syed.fahar.abbas
> Website: www.enterprisedb.com
>



-- 
Fahar Abbas
QMG
EnterpriseDB Corporation
Phone Off

Re: [pgAdmin4][Patch][Feature #1998] Appends .sql if extension not given when using 'save' or 'save as' feature

2018-04-10 Thread Murtuza Zabuawala
Hi,

We are passing the file name when we trigger an event from File manager
whenever user selects any file
../pgadmin/misc/file_manager/static/js/file_manager.js   Line:302
OR creates any new file
../pgadmin/misc/file_manager/static/js/file_manager.js   Line:583, Line:678

You can use jQuery selector *$('.change_file_types select').val()* to fetch
the selected file type and write your logic accordingly.

On Wed, Apr 11, 2018 at 4:19 AM, Rahul Soshte 
wrote:

> I am trying to access the value in the format combobox for selected file
> type to put it here..
>
> This snippet happens to be in web/pgadmin/tools/sqleditor/st
> atic/js/sqleditor.js
>
>
>
> How do I get access to that format combobox value to determine whether it
> is 'sql' or 'All Files' ?
> Also What is e here ?
>
> This passed as to sqleditor's save_file method as seen from the code here.
>
> This snippet happens to be in web/pgadmin/tools/sqleditor/__init__.py
>
>
>
>
>
>
> On Sat, Mar 31, 2018 at 12:05 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> Then that's browser specific issue, please create one redmine ticket
>>  for the issue.​
>>
>>
>> On Fri, Mar 30, 2018 at 11:36 PM, Rahul Soshte 
>> wrote:
>>
>>> Yeah the code is present.I have attached the screenshot.
>>> Also  I have noticed that the format combobox appears clearly in my
>>> Vivaldi Browser but it is not seen in my Firefox Browser.
>>>
>>> On Fri, Mar 30, 2018 at 9:59 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 ​I don't think so, Could you inspect html/css code on 'Save as' dialog
 within your browser window and see if it's present or not?​


 On Fri, Mar 30, 2018 at 8:30 PM, Rahul Soshte >>> > wrote:

> Hi,
> I don't know why that combobox is not seen in my environment.I am
> using Ubuntu 17.10.I have attached the screenshot.
> Is this a bug?
>
>
>
> On Fri, Mar 30, 2018 at 7:07 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> ++ Attaching screenshot
>>
>> On Fri, Mar 30, 2018 at 7:06 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Rahul,
>>>
>>> When I said .sql extension, I meant selected sql option in 'Format'
>>> combobox (check the screenshot I've attached)
>>>
>>> For the error you've mentioned you can create Fake application
>>> context.
>>> Ref: ../web/pgadmin/dashboard/tests/test_dashboard_templates.py +274
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> On Fri, Mar 30, 2018 at 6:36 PM, Rahul Soshte <
>>> rahulsoshte...@gmail.com> wrote:
>>>
 Hi,
 I tried writing tests in the web/pgadmin/tools/sqleditor/ut
 ils/tests/test_save_query_to_file_utils
 for the file web/pgadmin/tools/sqleditor/ut
 ils/tests/save_query_to_file_utils.py

 But I am getting a error,

 ERROR: runTest (pgadmin.tools.sqleditor.utils
 .tests.test_save_query_to_file_utils.TestSaveQueryToFile)
 When user has entered the extension .sql to the file while saving
 
 --
 Traceback (most recent call last):
   File "/var/www/flask/pgadmin4/pgadmin4/web/pgadmin/tools/sqledito
 r/utils/tests/test_save_query_to_file_utils.py", line 42, in
 runTest
 file_path_result = save_query_to_file(self.file_data)
   File "/var/www/flask/pgadmin4/pgadmin4/web/pgadmin/tools/sqledito
 r/utils/save_query_to_file_utils.py", line 15, in
 save_query_to_file
 storage_manager_path = get_storage_directory()
   File 
 "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/flask_login.py",
 line 788, in decorated_view
 if current_app.login_manager._login_disabled:
   File 
 "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/werkzeug/local.py",
 line 338, in __getattr__
 return getattr(self._get_current_object(), name)
   File 
 "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/werkzeug/local.py",
 line 297, in _get_current_object
 return self.__local()
   File 
 "/var/www/flask/pgadmin4/local/lib/python2.7/site-packages/flask/globals.py",
 line 51, in _find_app
 raise RuntimeError(_app_ctx_err_msg)
 RuntimeError: Working outside of application context.

 How do I test the extracted code inside context? How do I resolve
 this error.
 I have attached test_save_query_to_file_utils.py
 and save_query_to_file_utils.py

 Murtuza, Actually I didnt find a