3 ms·
Python2 on AppEngine is a huge, painful Google GCP deprecation. I have a friend who built an AppEngine app within the first year of the platform's release, and
by mtlynch 6y ago
Python2 on AppEngine is a huge, painful Google GCP deprecation.
I have a friend who built an AppEngine app within the first year of the platform's release, and he's spent the better part of the past 9 months doing almost nothing but managing his company's migration to Python3 AppEngine.
It wasn't just migrating from Python2 to Python3 syntax. Google used it as an opportunity to also turn down tons of APIs and services they no longer felt like maintaining.
One big difference was the Users API. Python2 AppEngine had a pretty simple way to authenticate users that you could set up in an hour.[0] In Python3, they've dumped that entirely and tell you that you have to move to a totally different solution, and they offer no help with that migration.[1]
In Python2 AppEngine, you essentially got a memcache for free. The ndb library[2] allowed applications to read/write to Cloud Datastore, but it also automagically managed the cache for you so that you didn't have to set up a separate cache service. In Python3, they've dumped that and force you to maintain your own cache service and handle all the caching logic yourself.[3]
It looks like the ndb library is pretty complete at this point,[4] but when I was looking at a migration earlier this year, the ndb library wasn't even out of beta. Meanwhile, they were breathing down their customers' necks about moving off the Python2 version.
I had a fairly small (~8 KLOC) Python2 AppEngine app that I wrote in 2018, but when I realized how much of a hassle it would be to migrate to Python3, I just rewrote it using Gridsome and moved off of AppEngine entirely.[5]
[0] https://cloud.google.com/appengine/docs/standard/python/users https://cloud.google.com/appengine/docs/standard/python/user...
[1] https://cloud.google.com/appengine/docs/standard/python/migrate-to-python3/migrating-services#user_authentication https://cloud.google.com/appengine/docs/standard/python/migr...
[2] https://cloud.google.com/appengine/docs/standard/python/ndb https://cloud.google.com/appengine/docs/standard/python/ndb
[3] https://cloud.google.com/appengine/docs/standard/python3/migrating-to-cloud-ndb#caching https://cloud.google.com/appengine/docs/standard/python3/mig...
[4] https://googleapis.dev/python/python-ndb/latest/index.html https://googleapis.dev/python/python-ndb/latest/index.html
[5] https://whatgotdone.com/michael/2020-04-17 https://whatgotdone.com/michael/2020-04-17
- AnssiH 6y agoBut Python 2 on App Engine is not officially deprecated yet (e.g. not listed here: https://cloud.google.com/appengine/docs/deprecations https://cloud.google.com/appengine/docs/deprecations) and they have not sent the "[Action Required]" email (of which OP talks about) for that yet, so I'm not sure it counts. They are "just" recommending migration. I have a ~60 KLOC AppEngine Python 2 app (started in 2011), but I'll probably migrate that over only when the deprecation actually occurs, as: - that gives the python-ndb library more time to mature (performance and bugs), - easier migration paths for some of the non-py3 services I use (e.g. Images, Users, Memcache) might appear when deprecation actually occurs, either from Google or 3rd parties, - I'm in no hurry, - I will be surprised if Google gives less than 1 year of deprecation notice (Python 2.5 got 4 years from deprecation to termination). (If the APIs I use were available for py3, I would've probably already migrated.)
- dangoor 6y agoWe're in that boat as well and are rewriting in Go: https://blog.khanacademy.org/go-services-one-goliath-project/ https://blog.khanacademy.org/go-services-one-goliath-project...