Warning rdbms deprecation notice in GAE

22 views
Skip to first unread message

Jacinto Parga

unread,
Feb 4, 2021, 4:27:34 AM2/4/21
to web2py-users
Hi, 

There is this warning in GAE deployment:

Please remove any imports of google.appengine.api.rdbms. First Generation Cloud SQL instances have been shut down, and rdbms.py will be removed in a future release. See: https://cloud.google.com/sql/docs/mysql/deprecation-notice

If you deploy using Datastore you don't need rdbms at all so I took this workaround:

In pydal _gae.py, line 15:

from google.appengine.api import namespace_manager #, rdbms

In pydal google.py lines 15, 16:
if gae:
    from .._gae import ndb, namespace_manager, classobj, NDBPolyModel #, rdbms 

In pyday google.py lines 54, 55:
#def connector(self):
#       return rdbms.connect(**self.driver_args)

It obviously disable @adapters.register_for("google:sql") but if Datastore is used  there is no problem.


Reply all
Reply to author
Forward
0 new messages