Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove deprecated global 'connector.connect' function #394

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

jackwotherspoon
Copy link
Collaborator

The global connector.connect(**kwargs) has been deprecated for the past several months and should be replaced with a Connector() object initialization.

All instances of global connector.connect (bad):

from google.cloud.sql.connector import connector

conn = connector.connect(
      ... arguments
)

Should be replaced with Connector() initialization (good):

from google.cloud.sql.connector import Connector  # uppercase Connector

# initialize Connector object
with Connector() as connector:
  conn = connector.connect(
        ... arguments
  )

Refer to README for more examples of using Connector()object.

@jackwotherspoon jackwotherspoon self-assigned this Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants