-
Notifications
You must be signed in to change notification settings - Fork 8
feat: create alias alloydbconnector package #451
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
Conversation
fb235d1
to
9172c21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
@jackwotherspoon would you mind taking a quick pass on this? |
This naming of
In my mind this is a clear case where readability is improved by having the package name |
That makes sense. But I don't think the google cloud python repo has strict guidelines on this. So I think it's okay if we keep this change to have the package name without underscores. For example, The org-policy package name is not separated with underscores: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-org-policy/google/cloud. |
Just because "X" does it does not mean it is the right way. LangChain integrations are using underscores... https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/src/langchain_google_cloud_sql_pg |
Alright. I'll change the package name to |
This reverts commit 14509e8.
For posterity, we stuck with alloydbconnector. |
This PR creates a new package:
google.cloud.alloydbconnector
, which is an alias togoogle.cloud.alloydb.connector
. The implementation resides ingoogle.cloud.alloydbconnector
, andgoogle.cloud.alloydb.connector
points to it.So importing
google.cloud.alloydbconnector
is the same as importinggoogle.cloud.alloydb.connector
.This PR aims to fix googleapis/google-cloud-python#13871, where a PEX environment, containing google-cloud-alloydb and alloydb-python-connector packages, fails to import
google.cloud.alloydb.connector
, because it attempts to find aconnector/
directory under thegoogle-cloud-alloydb
package, which does not exist. The fix is that the user should import thegoogle.cloud.alloydbconnector
package instead.This PR also updates the README and integration tests to mention importing
google.cloud.alloydbconnector
instead ofgoogle.cloud.alloydb.connector
. This serves as documentation so that new users of the library will instead importgoogle.cloud.alloydbconnector
. Existing users can continue to importgoogle.cloud.alloydb.connector
without any issues.