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* <http://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