mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support for psycopg3 along with psycopg2. #5011
This commit is contained in:
committed by
Akshay Joshi
parent
7a4951f211
commit
5e0daccf76
@@ -11,7 +11,6 @@
|
||||
a webserver, this will provide the WSGI interface, otherwise, we're going
|
||||
to start a web server."""
|
||||
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info < (3, 4):
|
||||
@@ -35,6 +34,17 @@ if 'PGADMIN_SERVER_MODE' in os.environ:
|
||||
else:
|
||||
builtins.SERVER_MODE = None
|
||||
|
||||
if (3, 10) > sys.version_info > (3, 8) and os.name == 'posix':
|
||||
# Fix eventlet issue with Python 3.9.
|
||||
# Ref: https://github.com/eventlet/eventlet/issues/670
|
||||
# This was causing issue in psycopg3
|
||||
from eventlet import hubs
|
||||
hubs.use_hub("poll")
|
||||
# Ref: https://github.com/miguelgrinberg/python-socketio/issues/567
|
||||
# Resolve BigAnimal API issue
|
||||
import selectors
|
||||
selectors.DefaultSelector = selectors.PollSelector
|
||||
|
||||
import config
|
||||
import setup
|
||||
from pgadmin import create_app, socketio
|
||||
|
||||
Reference in New Issue
Block a user