feat: create alias alloydbconnector package#451
Conversation
fb235d1 to
9172c21
Compare
|
@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.connectorpoints to it.So importing
google.cloud.alloydbconnectoris 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-alloydbpackage, which does not exist. The fix is that the user should import thegoogle.cloud.alloydbconnectorpackage instead.This PR also updates the README and integration tests to mention importing
google.cloud.alloydbconnectorinstead 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.connectorwithout any issues.