fix: drop pickled Google cloud instance from session
The google cloud-deployment module persisted the live Google class via pickle.dumps/pickle.loads across 14 sites: the verify_credentials handler, the OAuth2 callback, and every region/zone/version/instance- type lookup. Each call paid a pickle round-trip and re-introduced the deserialization risk inside session storage. Add Google.to_state()/Google.from_state() that round-trip the persistable fields (client_config, credentials_json, redirect_url, project_id, regions, availability_zones, verification flags) through a plain dict, and rebuild the google.oauth2.credentials.Credentials SDK object lazily from credentials_json. Module-level _get_google_from_session() / _save_google_to_session() helpers replace the per-site pickle dance. Six new tests cover: round-trip of all persistable fields, credential rebuild from token dict, helper construction from session state, helper returning None for missing/empty session, defaults for partial state, and a regression assertion that pickle is gone from the module.
A
Ashesh Vashi committed
fffc3cc242691029d9a582301ba6317c7bcc9967
Parent: adbb249