mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-17 16:34:44 -05:00
On packaged Linux installs the bundled venv is created with --system-site-packages (issue #7173) so it can reach system packages such as dbus-python. That also exposes the deprecated system oauth2client and whatever pyOpenSSL ships alongside it. googleapiclient imports oauth2client optionally, and on Ubuntu 24.04 that drags in a pyOpenSSL too old for our bundled cryptography, aborting startup at blueprint registration with "AttributeError: module 'lib' has no attribute 'GEN_EMAIL'". pgAdmin only ever authenticates to Google via google-auth and google-auth-oauthlib, so park a None sentinel under sys.modules['oauth2client'] before importing googleapiclient in both the web module and the standalone pgacloud provider. The optional import then fails cleanly and googleapiclient falls back to google-auth. Closes #10110