mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Raise an exception under Python < 3.4.
It also cleans up the README to remove references to Python 2 and removes Python 2-isms from the main config. refs #5443
This commit is contained in:
@@ -11,15 +11,11 @@
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
import builtins
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import builtins
|
||||
else:
|
||||
import __builtin__ as builtins
|
||||
|
||||
# We need to include the root directory in sys.path to ensure that we can
|
||||
# find everything we need when running in the standalone runtime.
|
||||
@@ -27,7 +23,7 @@ root = os.path.dirname(os.path.realpath(__file__))
|
||||
if sys.path[0] != root:
|
||||
sys.path.insert(0, root)
|
||||
|
||||
from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path
|
||||
from pgadmin.utils import env, IS_WIN, fs_short_path
|
||||
|
||||
##########################################################################
|
||||
# Application settings
|
||||
@@ -566,15 +562,6 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
# SUPPORT_SSH_TUNNEL can be override in local config file and if that
|
||||
# setting is False in local config then we should not check the Python version.
|
||||
if (SUPPORT_SSH_TUNNEL is True and
|
||||
((sys.version_info[0] == 2 and sys.version_info[1] < 7) or
|
||||
(sys.version_info[0] == 3 and sys.version_info[1] < 4))):
|
||||
SUPPORT_SSH_TUNNEL = False
|
||||
ALLOW_SAVE_TUNNEL_PASSWORD = False
|
||||
|
||||
# Disable USER_INACTIVITY_TIMEOUT when SERVER_MODE=False
|
||||
if not SERVER_MODE:
|
||||
USER_INACTIVITY_TIMEOUT = 0
|
||||
|
||||
@@ -11,13 +11,14 @@
|
||||
a webserver, this will provide the WSGI interface, otherwise, we're going
|
||||
to start a web server."""
|
||||
|
||||
import os
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import builtins
|
||||
else:
|
||||
import __builtin__ as builtins
|
||||
if sys.version_info < (3, 4):
|
||||
raise Exception('This application must be run under Python 3.4 or later.')
|
||||
|
||||
import builtins
|
||||
import os
|
||||
|
||||
# We need to include the root directory in sys.path to ensure that we can
|
||||
# find everything we need when running in the standalone runtime.
|
||||
|
||||
@@ -24,10 +24,10 @@ import coverage
|
||||
|
||||
import unittest
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import builtins
|
||||
else:
|
||||
import __builtin__ as builtins
|
||||
if sys.version_info < (3, 4):
|
||||
raise Exception('The test suite must be run under Python 3.4 or later.')
|
||||
|
||||
import builtins
|
||||
|
||||
# Ensure the global server mode is set.
|
||||
builtins.SERVER_MODE = None
|
||||
|
||||
Reference in New Issue
Block a user