mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-23 23:13:38 -06:00
Remove support for Python 3.7 as Debian 10 is EOL.
This commit is contained in:
parent
91eb60a363
commit
3bb9f0ba8c
@ -8,25 +8,19 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
Flask==3.0.*; python_version > '3.7'
|
||||
Flask==2.2.*; python_version <= '3.7'
|
||||
Flask==3.0.*
|
||||
Flask-Login==0.*
|
||||
Flask-Mail==0.*
|
||||
Flask-Migrate==4.*
|
||||
greenlet==1.1.2; python_version <= '3.10'
|
||||
Flask-SQLAlchemy==3.1.*; python_version > '3.7'
|
||||
Flask-SQLAlchemy==3.0.*; python_version <= '3.7'
|
||||
Flask-WTF==1.2.*; python_version > '3.7'
|
||||
Flask-WTF==1.1.1; python_version <= '3.7'
|
||||
Flask-SQLAlchemy==3.1.*
|
||||
Flask-WTF==1.2.*
|
||||
Flask-Compress==1.*
|
||||
Flask-Paranoid==0.*
|
||||
Flask-Babel==4.0.*; python_version > '3.7'
|
||||
Flask-Babel==3.1.*; python_version <= '3.7'
|
||||
Flask-Security-Too==5.4.*; python_version > '3.7'
|
||||
Flask-Security-Too==5.1.*; python_version <= '3.7'
|
||||
Flask-Babel==4.0.*
|
||||
Flask-Security-Too==5.4.*
|
||||
Flask-SocketIO==5.3.*
|
||||
WTForms==3.1.*; python_version > '3.7'
|
||||
WTForms==3.0.*; python_version <= '3.7'
|
||||
WTForms==3.1.*
|
||||
passlib==1.*
|
||||
pytz==2024.*
|
||||
speaklater3==1.*
|
||||
@ -43,25 +37,19 @@ gssapi==1.8.*
|
||||
eventlet==0.36.1
|
||||
user-agents==2.2.0
|
||||
pywinpty==2.0.*; sys_platform=="win32"
|
||||
Authlib==1.3.*; python_version > '3.7'
|
||||
Authlib==1.2.*; python_version <= '3.7'
|
||||
Authlib==1.3.*
|
||||
pyotp==2.*
|
||||
qrcode==7.*
|
||||
boto3==1.34.*; python_version > '3.7'
|
||||
boto3==1.33.*; python_version <= '3.7'
|
||||
boto3==1.34.*
|
||||
urllib3==1.26.*
|
||||
azure-mgmt-rdbms==10.1.0
|
||||
azure-mgmt-resource==23.1.1; python_version > '3.7'
|
||||
azure-mgmt-resource==23.0.1; python_version <= '3.7'
|
||||
azure-mgmt-resource==23.1.1
|
||||
azure-mgmt-subscription==3.1.1
|
||||
azure-identity==1.17.1; python_version > '3.7'
|
||||
azure-identity==1.15.0; python_version <= '3.7'
|
||||
azure-identity==1.17.1
|
||||
google-api-python-client==2.*
|
||||
google-auth-oauthlib==1.2.0
|
||||
keyring==24.*; python_version > '3.7'
|
||||
keyring==23.*; python_version <= '3.7'
|
||||
Werkzeug==3.0.*; python_version > '3.7'
|
||||
Werkzeug==2.2.3; python_version <= '3.7'
|
||||
keyring==24.*
|
||||
Werkzeug==3.0.*
|
||||
typer[all]==0.12.*
|
||||
setuptools==70.*; python_version >= '3.12'
|
||||
jsonformatter~=0.3.2
|
||||
|
@ -15,8 +15,8 @@ import sys
|
||||
if sys.version_info <= (3, 9):
|
||||
import select
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
raise RuntimeError('This application must be run under Python 3.7 '
|
||||
if sys.version_info < (3, 8):
|
||||
raise RuntimeError('This application must be run under Python 3.8 '
|
||||
'or later.')
|
||||
import builtins
|
||||
import os
|
||||
|
@ -10,8 +10,8 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
raise Exception('This application must be run under Python 3.7 or later.')
|
||||
if sys.version_info < (3, 8):
|
||||
raise Exception('This application must be run under Python 3.8 or later.')
|
||||
|
||||
import builtins
|
||||
|
||||
|
@ -520,13 +520,9 @@ def create_app(app_name=None):
|
||||
|
||||
security.init_app(app, user_datastore)
|
||||
|
||||
# register custom unauthorised handler.
|
||||
if sys.version_info < (3, 8):
|
||||
app.login_manager.unauthorized_handler(pga_unauthorised)
|
||||
else:
|
||||
# Flask-Security-Too > 5.4.* requires custom unauth handeler
|
||||
# to be registeres with it.
|
||||
security.unauthn_handler(pga_unauthorised)
|
||||
# Flask-Security-Too > 5.4.* requires custom unauth handeler
|
||||
# to be registeres with it.
|
||||
security.unauthn_handler(pga_unauthorised)
|
||||
|
||||
# Set the permanent session lifetime to the specified value in config file.
|
||||
app.permanent_session_lifetime = timedelta(
|
||||
|
@ -65,13 +65,7 @@ from pgadmin.authenticate import AuthSourceManager
|
||||
from pgadmin.utils.exception import CryptKeyMissing
|
||||
|
||||
from pgadmin.user_login_check import pga_login_required
|
||||
|
||||
try:
|
||||
from flask_security.views import default_render_json
|
||||
except ImportError as e:
|
||||
# Support Flask-Security-Too == 3.2
|
||||
if sys.version_info < (3, 8):
|
||||
from flask_security.views import _render_json as default_render_json
|
||||
from flask_security.views import default_render_json
|
||||
|
||||
MODULE_NAME = 'browser'
|
||||
BROWSER_STATIC = 'browser.static'
|
||||
@ -1103,8 +1097,7 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
|
||||
form_class = _security.forms.get('reset_password_form').cls
|
||||
form = form_class(request.form) if request.form else form_class()
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
form.user = user
|
||||
form.user = user
|
||||
|
||||
if form.validate_on_submit():
|
||||
try:
|
||||
|
@ -12,8 +12,7 @@
|
||||
import json
|
||||
|
||||
import sys
|
||||
if sys.version_info >= (3, 8):
|
||||
from unicodedata import normalize, is_normalized
|
||||
from unicodedata import normalize, is_normalized
|
||||
|
||||
from flask import render_template, request, \
|
||||
Response, abort, current_app, session
|
||||
@ -446,10 +445,6 @@ def normalise_password(password):
|
||||
'NFKD'
|
||||
)
|
||||
|
||||
# Remove check of Python version once Python 3.7 support ends
|
||||
if sys.version_info < (3, 8):
|
||||
return password
|
||||
|
||||
return password if is_normalized(normalise_form, password) else\
|
||||
normalize(normalise_form, password)
|
||||
|
||||
|
@ -27,12 +27,6 @@ class RequestShim():
|
||||
|
||||
def set_cookie(self, key, value='', *args, **kwargs):
|
||||
"Set the cookie on the Flask test client."
|
||||
if sys.version_info <= (3, 7, 9999):
|
||||
server_name = current_app.config["SERVER_NAME"] or "localhost"
|
||||
return self.client.set_cookie(
|
||||
server_name, key=key, value=value, *args, **kwargs
|
||||
)
|
||||
|
||||
if kwargs['domain'] is None:
|
||||
kwargs['domain'] = current_app.config["SERVER_NAME"] or "localhost"
|
||||
|
||||
@ -102,10 +96,7 @@ class TestClient(testing.FlaskClient):
|
||||
environ_overrides = {
|
||||
'wsgi.url_scheme': ''
|
||||
}
|
||||
if sys.version_info <= (3, 7, 9999):
|
||||
self.cookie_jar.inject_wsgi(environ_overrides)
|
||||
else:
|
||||
self._add_cookies_to_wsgi(environ_overrides)
|
||||
self._add_cookies_to_wsgi(environ_overrides)
|
||||
|
||||
with self.app.test_request_context():
|
||||
# Now, we call Flask-WTF's method of generating a CSRF token...
|
||||
|
@ -29,8 +29,8 @@ from selenium.webdriver.firefox.options import Options as FirefoxOptions
|
||||
if sys.platform == "win32":
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
raise RuntimeError('The test suite must be run under Python 3.7 or later.')
|
||||
if sys.version_info < (3, 8):
|
||||
raise RuntimeError('The test suite must be run under Python 3.8 or later.')
|
||||
|
||||
import builtins
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user