[pgAdmin][RM6033] Update the cryptography python package

2020-11-24 Thread Aditya Toshniwal
Hi Hackers,

Attached patch will conditionally update the python dependency
"cryptography" for standard venv and pip package. The latest version is not
supported for Python 3.4, so it will not update for v3.4.
We'll need to put a warning on the pgadmin.org website for this (will send
a patch for it later) for wheel/pip users. Since we're shipping our own
virtual env with the supported python version for other installers, no
README update is required.

Please let me know if I missed anything.

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

"Don't Complain about Heat, Plant a TREE"
diff --git a/pkg/pip/setup_pip.py b/pkg/pip/setup_pip.py
index b895c156d..edb6c1f00 100644
--- a/pkg/pip/setup_pip.py
+++ b/pkg/pip/setup_pip.py
@@ -32,18 +32,26 @@ builtins.SERVER_MODE = None
 req_file = '../requirements.txt'
 
 with open(req_file, 'r') as req_lines:
-requires = req_lines.read().splitlines()
+all_requires = req_lines.read().splitlines()
 
+requires = []
+extras_require = {}
 # Remove any requirements with environment specifiers. These
 # must be explicitly listed in extras_require below.
-for index, req in enumerate(requires):
+for index, req in enumerate(all_requires):
 if ";" in req or req.startswith("#") or req == "":
-requires.remove(req)
+# Add the pkgs to extras_require
+if ";" in req:
+pkg, env_spec = req.split(";")
+extras_require[env_spec] = extras_require.get(env_spec, [])
+extras_require[env_spec].append(pkg)
 continue
 
 # Ensure the Wheel will use psycopg2-binary, not the source distro
 if 'psycopg2' in req:
-requires[index] = req.replace('psycopg2', 'psycopg2-binary')
+req = req.replace('psycopg2', 'psycopg2-binary')
+
+requires.append(req)
 
 # Get the version
 config = load_source('APP_VERSION', '../web/config.py')
@@ -84,6 +92,8 @@ setup(
 
 install_requires=requires,
 
+extras_require=extras_require,
+
 entry_points={
 'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main'],
 },
diff --git a/requirements.txt b/requirements.txt
index a5815a34c..6295eb324 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -39,6 +39,7 @@ python-dateutil>=2.8.0
 SQLAlchemy>=1.3.13
 Flask-Security-Too>=3.0.0
 bcrypt<=3.1.7
-cryptography<=3.0
+cryptography<=3.0;python_version<="3.4"
+cryptography>=3.2;python_version>"3.4"
 sshtunnel>=0.1.5
 ldap3>=2.5.1


[pgAdmin][Patch] RM5328 - [Code Coverage] Improve API test cases for Foreign Tables

2020-11-24 Thread Yogesh Mahajan
Hi,

Please find the attached patch for foreign table tests.Code coverage for
foreign table node is 71%.

Thanks,
Yogesh Mahajan
EnterpriseDB


RM5328_v1.patch
Description: Binary data


Browser support update

2020-11-24 Thread Dave Page
We try to update the supported browser list around the end of the year.
This year, I'm a little early in doing some analysis, but here we go.

The currently (according to the FAQ at https://www.pgadmin.org/faq) support
the following browsers:

Chrome 72+
Firefox 65+
Edge 44+ (reported as 18+ by Google Analytics)
Safari 12+

I took a look at the Google Analytics data for the website and see the
following browser usage distribution. There are more, but they're all < 1%:

Browser   pgAdmin
===   ===
Chrome 69.75%
Firefox13.01%
Edge7.93%
Safari  5.45%
IE  1.53%
Opera   1.22%

We've already dropped support for IE (which I don't want to see
resurrected), and Opera should work fine as it's based on Chromium's Blink
engine, so whilst we don't test it explicitly, we should respond to any
issues reported.

Digging more into the details:

Chrome
==

94.1% of users are running Chrome 85+

Firefox
=

83.95% of users are running Firefox 80+. However, 6.84% run Firefox 78.0,
2.12% run Firefox 68.0, and 1.6% run Firefox 79.0. Perhaps these outliers
are versions that shipped with major OS releases and haven't been updated?

Edge


Much more varied usage, complicated by the change in versioning (and the
engine), when the version number went from 18 (Spartan releases) to 79
(Anaheim releases), as reported by Google Analytics. In the top 10
versions, 79.24% of users are running 86+. However, the top 10 also
includes 11.94% running 18.x and 1.55% running 17.x. This is likely from
corporate environments where updates are controlled in a conservative
manner.

Safari
=

Mixed usage. From the top 10, 83.68% use 13+. However, 8.65% use 9.0, and
1.84% use 12.1.2. There are also 2.03% using 538.1 (probably Epiphany).

Based on these numbers, I would suggest we test and support the following
browsers from the first release in 2021:

Chrome: 85+
Firefox: 78+ (this would exclude the 2.12% running 68, but as they're
likely not updating their software anyway it likely won't matter)
Edge: 44, and 86+ (44 is the last Spartan release. The vast majority of
users on the Anaheim release are on 86+).
Safari: 13+

Thoughts/comments/objections?

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

EDB: http://www.enterprisedb.com


Re: RHEL 7 + pgAdmin 4.28

2020-11-24 Thread Devrim Gündüz

Hi,

On Thu, 2020-11-19 at 12:06 +0530, Aditya Toshniwal wrote:
> Flask-babelex needs to be updated.

Thanks!

Cheers,
-- 
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


signature.asc
Description: This is a digitally signed message part