pgAdmin 4 commit: Remove old Python 2 compatibility code. Fixes #5700

2020-07-27 Thread Dave Page
Remove old Python 2 compatibility code. Fixes #5700

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f93cfe8c4cb94fffbc4d273f196a8f06e83c4bb8
Author: Cyril Jouve 

Modified Files
--
docs/en_US/release_notes_4_25.rst  |  1 +
tools/copyright_updater.py |  1 -
tools/get_chromedriver.py  |  8 ++--
tools/sql_keywords.py  |  1 -
web/migrations/env.py  |  1 -
web/pgadmin/browser/__init__.py| 10 +++--
.../databases/casts/tests/test_cast_create.py  |  1 -
.../casts/tests/test_cast_create_get_functions.py  |  1 -
.../casts/tests/test_cast_create_get_type.py   |  1 -
.../databases/casts/tests/test_cast_delete.py  |  1 -
.../casts/tests/test_cast_delete_multiple.py   |  1 -
.../servers/databases/casts/tests/test_cast_get.py |  1 -
.../tests/test_cast_get_dependencies_dependent.py  |  1 -
.../databases/casts/tests/test_cast_get_node.py|  1 -
.../databases/casts/tests/test_cast_get_sql.py |  1 -
.../servers/databases/casts/tests/test_cast_put.py |  1 -
.../servers/databases/casts/tests/utils.py |  1 -
.../databases/event_triggers/tests/utils.py|  1 -
.../extensions/tests/test_extension_add.py |  1 -
.../extensions/tests/test_extension_delete.py  |  1 -
.../tests/test_extension_delete_multiple.py|  1 -
.../extensions/tests/test_extension_get.py |  1 -
.../extensions/tests/test_extension_put.py |  1 -
.../servers/databases/extensions/tests/utils.py|  1 -
.../tests/test_external_tables_module.py   |  4 +---
.../tests/test_foreign_servers_add.py  |  1 -
.../tests/test_foreign_servers_delete.py   |  1 -
.../tests/test_foreign_servers_delete_multiple.py  |  1 -
.../test_foreign_servers_dependent_dependency.py   |  1 -
.../tests/test_foreign_servers_get.py  |  1 -
.../tests/test_foreign_servers_msql.py |  1 -
.../tests/test_foreign_servers_node.py |  1 -
.../tests/test_foreign_servers_put.py  |  1 -
.../tests/test_foreign_servers_sql.py  |  1 -
.../foreign_servers/tests/utils.py |  1 -
.../user_mappings/tests/test_user_mapping_add.py   |  1 -
.../tests/test_user_mapping_delete.py  |  1 -
.../tests/test_user_mapping_delete_multiple.py |  1 -
.../test_user_mapping_dependent_dependency.py  |  1 -
.../user_mappings/tests/test_user_mapping_get.py   |  1 -
.../user_mappings/tests/test_user_mapping_msql.py  |  1 -
.../user_mappings/tests/test_user_mapping_node.py  |  1 -
.../user_mappings/tests/test_user_mapping_put.py   |  1 -
.../user_mappings/tests/test_user_mapping_sql.py   |  1 -
.../foreign_servers/user_mappings/tests/utils.py   |  1 -
.../foreign_data_wrappers/tests/test_fdw_add.py|  1 -
.../foreign_data_wrappers/tests/test_fdw_delete.py |  1 -
.../tests/test_fdw_delete_multiple.py  |  1 -
.../tests/test_fdw_dependency_dependent.py |  1 -
.../tests/test_fdw_get-handlers.py |  1 -
.../foreign_data_wrappers/tests/test_fdw_get.py|  1 -
.../tests/test_fdw_get_nodes.py|  1 -
.../tests/test_fdw_get_validators.py   |  1 -
.../foreign_data_wrappers/tests/test_fdw_msql.py   |  1 -
.../foreign_data_wrappers/tests/test_fdw_put.py|  1 -
.../foreign_data_wrappers/tests/test_fdw_sql.py|  1 -
.../databases/foreign_data_wrappers/tests/utils.py |  1 -
.../databases/languages/tests/test_language_add.py |  1 -
.../languages/tests/test_language_delete.py|  1 -
.../tests/test_language_delete_multiple.py |  1 -
.../languages/tests/test_language_dependency.py|  1 -
.../languages/tests/test_language_dependent.py |  1 -
.../databases/languages/tests/test_language_get.py |  1 -
.../test_language_get_function_and_template.py |  1 -
.../databases/languages/tests/test_language_put.py |  1 -
.../databases/languages/tests/test_language_sql.py |  1 -
.../servers/databases/languages/tests/utils.py |  1 -
.../databases/schemas/collations/tests/utils.py|  1 -
.../domains/domain_constraints/tests/utils.py  |  1 -
.../databases/schemas/domains/tests/utils.py   |  1 -
.../foreign_tables/tests/test_foreign_table_add.py |  1 -
.../tests/test_foreign_table_delete.py |  1 -
.../tests/test_foreign_table_delete_multiple.py|  1 -
.../foreign_tables/tests/test_foreign_table_get.py |  1 -
.../foreign_tables/tests/test_foreign_table_put.py |  1 -
.../schemas/foreign_tables/tests/utils.py  |  1 -
.../tests/test_fts_configuration_add.py|  1 -
.../tests/test_fts_configuration_copyConfig.py |  1 -
.../tests/test_fts_configuration_delete.py |  1 -
.../test_fts_configuration_delete_multiple.py  |  1 -
.../test_fts_configuration_dependency_dependent.py |  1 -
.../tests/test_fts_configuration_ge

Re: Remove compat code for py<3.4

2020-07-27 Thread Dave Page
On Sun, Jul 26, 2020 at 5:29 PM Cyril Jouve  wrote:

> Hello,
>
> The attached patch removes compatibility code for python 2 and python <3.4.
>

Thanks, patch applied with one minor typo fix.

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

EDB: http://www.enterprisedb.com


pgAdmin 4 commit: Add a --yes command line option to setup-web.sh to al

2020-07-27 Thread Dave Page
Add a --yes command line option to setup-web.sh to allow non-interactive use. 
Fixes #5610.

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_4_25.rst |  3 ++-
pkg/linux/setup-web.sh| 33 ++---
2 files changed, 32 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Fixed following SonarQube issues:

2020-07-27 Thread Akshay Joshi
Fixed following SonarQube issues:
  1) Define a constant instead of duplicating this literal.
  2) Reduce cognitive complexity (Patch by Aditya)

Branch
--
master

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

Modified Files
--
.../servers/databases/casts/__init__.py|  30 +-
.../external_tables/actions/get_all_nodes.py   |   4 -
.../servers/databases/languages/__init__.py|   3 +-
.../servers/databases/schemas/__init__.py  |  41 ++-
.../databases/schemas/collations/__init__.py   |  14 +-
.../servers/databases/schemas/domains/__init__.py  |   6 +-
.../databases/schemas/foreign_tables/__init__.py   |  10 +-
.../schemas/fts_configurations/__init__.py |  11 +-
.../databases/schemas/fts_parsers/__init__.py  |  15 +-
.../databases/schemas/fts_templates/__init__.py|   4 +-
.../databases/schemas/functions/__init__.py|   6 +-
.../servers/databases/schemas/tables/__init__.py   |   2 +-
.../databases/schemas/tables/indexes/__init__.py   |   2 +-
.../schemas/tables/partitions/__init__.py  |   2 +-
.../servers/databases/schemas/tables/utils.py  |   8 +-
.../servers/databases/schemas/views/__init__.py| 397 +++--
.../servers/resource_groups/__init__.py|  33 +-
.../server_groups/servers/tablespaces/__init__.py  |   8 +-
web/pgadmin/browser/utils.py   |   7 +
web/pgadmin/tools/debugger/__init__.py |  47 ++-
20 files changed, 346 insertions(+), 304 deletions(-)



Re: [pgAdmin][SonarQube] Reduce cognitive complexity

2020-07-27 Thread Akshay Joshi
Thanks, patch applied.

On Mon, Jul 27, 2020 at 11:00 AM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please ignore the previous patch. Attached is the latest.
>
> On Mon, Jul 27, 2020 at 10:42 AM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch to reduce cognitive complexity for:
>> 1) web/.../databases/schemas/views/__init__.py from 110 to the 15 allowed.
>> 2) web/.../servers/databases/casts/__init__.py from 18 to the 15 allowed.
>> 3) web/.../databases/schemas/collations/__init__.py from 16 to the 15
>> allowed.
>>
>> Please review.
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
>> 
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> 
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: Runtime refactoring

2020-07-27 Thread Akshay Joshi
Hi Dave

The patch is not applied, can you please rebase and send again.

On Fri, Jul 17, 2020 at 3:40 PM Dave Page  wrote:

> BTW, this will fix https://redmine.postgresql.org/issues/5490
>
> On Thu, Jul 16, 2020 at 10:41 AM Dave Page  wrote:
>
>> Here's a pretty large patch that implements a major refactoring of the
>> runtime code. Specifically:
>>
>> - Move the bulk of the core code from main() into a new Runtime class.
>> - Break up the mass of code that was main() into a number of relatively
>> simple functions.
>> - Make the Configuration dialog synchronous so the Log dialog can be
>> properly viewed.
>> - Enable/disable menu options at the right time.
>> - Remove support for Qt < 5.0.
>> - Remove the application name constant and hardcode the name to simplify
>> the code.
>> - Improve log messages.
>> - Replace the sdbm hashing with Qt's MD5 hashing.
>>
>> Please review & test, but do not commit before next week's release.
>>
>> Thanks!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: http://www.enterprisedb.com
>>
>>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Fixed incorrect import statement for urlopen.

2020-07-27 Thread Akshay Joshi
Fixed incorrect import statement for urlopen.
refs #5700

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Re: Runtime refactoring

2020-07-27 Thread Dave Page
Hi Akshay,

Updated patch attached.

Thanks.

On Mon, Jul 27, 2020 at 12:08 PM Akshay Joshi 
wrote:

> Hi Dave
>
> The patch is not applied, can you please rebase and send again.
>
> On Fri, Jul 17, 2020 at 3:40 PM Dave Page  wrote:
>
>> BTW, this will fix https://redmine.postgresql.org/issues/5490
>>
>> On Thu, Jul 16, 2020 at 10:41 AM Dave Page  wrote:
>>
>>> Here's a pretty large patch that implements a major refactoring of the
>>> runtime code. Specifically:
>>>
>>> - Move the bulk of the core code from main() into a new Runtime class.
>>> - Break up the mass of code that was main() into a number of relatively
>>> simple functions.
>>> - Make the Configuration dialog synchronous so the Log dialog can be
>>> properly viewed.
>>> - Enable/disable menu options at the right time.
>>> - Remove support for Qt < 5.0.
>>> - Remove the application name constant and hardcode the name to simplify
>>> the code.
>>> - Improve log messages.
>>> - Replace the sdbm hashing with Qt's MD5 hashing.
>>>
>>> Please review & test, but do not commit before next week's release.
>>>
>>> Thanks!
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EDB: http://www.enterprisedb.com
>>>
>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: http://www.enterprisedb.com
>>
>>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Sr. Software Architect*
> *EDB Postgres *
>
> *Mobile: +91 976-788-8246*
>


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

EDB: http://www.enterprisedb.com


Major_runtime_refactor_v2.patch
Description: Binary data


[pgAdmin][SonarQube] Rule - variable shadows a builtin

2020-07-27 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to rename all the variables which shadows any python
builtin.
Please review.

-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


sonarqube.inbuilt.patch
Description: Binary data