-
Notifications
You must be signed in to change notification settings - Fork 104
docs(async): mark new AsyncIO APIs as experimental #1533
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,6 +167,7 @@ def _initialize_metrics(project, credentials): | |
| ) | ||
|
|
||
|
|
||
| # Experimental API - Please note that this API is currently experimental and can change in the future. | ||
| class Client(ClientWithProject): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the most important class to mark clearly, as this is the main entry point for the async API. Can we add a bit more context to the docstring of this class? So something like this:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure will add |
||
| """Client for interacting with Cloud Spanner API. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -243,7 +243,7 @@ def wrapped_method(): | |
| max_commit_delay=max_commit_delay, | ||
| request_options=request_options, | ||
| ) | ||
| call_metadata, error_augmenter = database.with_error_augmentation( | ||
| (call_metadata, error_augmenter) = database.with_error_augmentation( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we move these other changes to a separate PR? |
||
| getattr(database, "_next_nth_request", 0), 1, metadata, span | ||
| ) | ||
| commit_method = functools.partial( | ||
|
|
||
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.
Normally, this should be part of the docstring so it shows up in IDEs. Now a customer must read the source code to see that this is an experimental API. So it should be something like this:
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.
So the problem with adding this directly to docString is that it will get copied to sync files as well. CrossSync ignores the "#"comments so it easily works this way.
Other way i can think of is by adding a method at the end of async classes to check if this is a async file using "crossSync.is_async" then append the experimental warning to the doc string. Something like: