| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,8 +50,16 @@ | |||
| 50 | 50 | DEFAULT_RETRY_TIMEOUT_SECS = 30 | |
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | + @CrossSync.convert_class( | ||
| 54 | + docstring_format_vars={ | ||
| 55 | + "experimental_api": ( | ||
| 56 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 57 | + "", | ||
| 58 | + ) | ||
| 59 | + } | ||
| 60 | + ) | ||
| 53 | 61 | class _BatchBase(_SessionWrapper): | |
| 54 | - """Accumulate mutations for transmission during :meth:`commit`. | ||
| 62 | + """{experimental_api}Accumulate mutations for transmission during :meth:`commit`. | ||
| 55 | 63 | ||
| 56 | 64 | :type session: :class:`~google.cloud.spanner_v1.session.Session` | |
| 57 | 65 | :param session: the session used to perform the commit | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -167,8 +167,16 @@ def _initialize_metrics(project, credentials): | |||
| 167 | 167 | ) | |
| 168 | 168 | ||
| 169 | 169 | ||
| 170 | + @CrossSync.convert_class( | ||
| 171 | + docstring_format_vars={ | ||
| 172 | + "experimental_api": ( | ||
| 173 | + "\n\n .. warning::\n The Async API is currently experimental and subject to breaking changes. This comment will be removed once the API has stabilized.\n", | ||
| 174 | + "", | ||
| 175 | + ) | ||
| 176 | + } | ||
| 177 | + ) | ||
| 170 | 178 | class Client(ClientWithProject): | |
| 171 | - """Client for interacting with Cloud Spanner API. | ||
| 179 | + """{experimental_api}Client for interacting with Cloud Spanner API. | ||
| 172 | 180 | ||
| 173 | 181 | .. note:: | |
| 174 | 182 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,8 +115,16 @@ | |||
| 115 | 115 | DEFAULT_RETRY_BACKOFF = AsyncRetry(initial=0.02, maximum=32, multiplier=1.3) | |
| 116 | 116 | ||
| 117 | 117 | ||
| 118 | + @CrossSync.convert_class( | ||
| 119 | + docstring_format_vars={ | ||
| 120 | + "experimental_api": ( | ||
| 121 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 122 | + "", | ||
| 123 | + ) | ||
| 124 | + } | ||
| 125 | + ) | ||
| 118 | 126 | class Database(object): | |
| 119 | - """Representation of a Cloud Spanner Database. | ||
| 127 | + """{experimental_api}Representation of a Cloud Spanner Database. | ||
| 120 | 128 | ||
| 121 | 129 | We can use a :class:`Database` to: | |
| 122 | 130 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,9 +80,17 @@ def _type_string_to_type_pb(type_string): | |||
| 80 | 80 | return _OPERATION_METADATA_TYPES.get(type_string, Empty) | |
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | - @CrossSync.convert_class(add_mapping_for_name="Instance") | ||
| 83 | + @CrossSync.convert_class( | ||
| 84 | + docstring_format_vars={ | ||
| 85 | + "experimental_api": ( | ||
| 86 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 87 | + "", | ||
| 88 | + ) | ||
| 89 | + }, | ||
| 90 | + add_mapping_for_name="Instance", | ||
| 91 | + ) | ||
| 84 | 92 | class Instance(object): | |
| 85 | - """Representation of a Cloud Spanner Instance. | ||
| 93 | + """{experimental_api}Representation of a Cloud Spanner Instance. | ||
| 86 | 94 | ||
| 87 | 95 | We can use a :class:`Instance` to: | |
| 88 | 96 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,9 +72,16 @@ async def __aexit__(self, exc_type, exc_value, traceback): | |||
| 72 | 72 | await self._pool.put(self._session) | |
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | - @CrossSync.convert_class | ||
| 75 | + @CrossSync.convert_class( | ||
| 76 | + docstring_format_vars={ | ||
| 77 | + "experimental_api": ( | ||
| 78 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 79 | + "", | ||
| 80 | + ) | ||
| 81 | + } | ||
| 82 | + ) | ||
| 76 | 83 | class AbstractSessionPool(object): | |
| 77 | - """Specifies required API for concrete session pool implementations. | ||
| 84 | + """{experimental_api}Specifies required API for concrete session pool implementations. | ||
| 78 | 85 | ||
| 79 | 86 | :type labels: dict (str -> str) or None | |
| 80 | 87 | :param labels: (Optional) user-assigned labels for sessions created | |
@@ -208,9 +215,16 @@ def session(self, **kwargs): | |||
| 208 | 215 | return SessionCheckout(self, **kwargs) | |
| 209 | 216 | ||
| 210 | 217 | ||
| 211 | - @CrossSync.convert_class | ||
| 218 | + @CrossSync.convert_class( | ||
| 219 | + docstring_format_vars={ | ||
| 220 | + "experimental_api": ( | ||
| 221 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 222 | + "", | ||
| 223 | + ) | ||
| 224 | + } | ||
| 225 | + ) | ||
| 212 | 226 | class FixedSizePool(AbstractSessionPool): | |
| 213 | - """Concrete session pool implementation: | ||
| 227 | + """{experimental_api}Concrete session pool implementation: | ||
| 214 | 228 | ||
| 215 | 229 | - Pre-allocates / creates a fixed number of sessions. | |
| 216 | 230 | ||
@@ -474,9 +488,16 @@ async def clear(self): | |||
| 474 | 488 | await session.delete() | |
| 475 | 489 | ||
| 476 | 490 | ||
| 477 | - @CrossSync.convert_class | ||
| 491 | + @CrossSync.convert_class( | ||
| 492 | + docstring_format_vars={ | ||
| 493 | + "experimental_api": ( | ||
| 494 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 495 | + "", | ||
| 496 | + ) | ||
| 497 | + } | ||
| 498 | + ) | ||
| 478 | 499 | class BurstyPool(AbstractSessionPool): | |
| 479 | - """Concrete session pool implementation: | ||
| 500 | + """{experimental_api}Concrete session pool implementation: | ||
| 480 | 501 | ||
| 481 | 502 | - "Pings" existing sessions via :meth:`session.exists` before returning | |
| 482 | 503 | them. | |
@@ -585,9 +606,16 @@ async def clear(self): | |||
| 585 | 606 | await session.delete() | |
| 586 | 607 | ||
| 587 | 608 | ||
| 588 | - @CrossSync.convert_class | ||
| 609 | + @CrossSync.convert_class( | ||
| 610 | + docstring_format_vars={ | ||
| 611 | + "experimental_api": ( | ||
| 612 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 613 | + "", | ||
| 614 | + ) | ||
| 615 | + } | ||
| 616 | + ) | ||
| 589 | 617 | class PingingPool(FixedSizePool): | |
| 590 | - """Concrete session pool implementation: | ||
| 618 | + """{experimental_api}Concrete session pool implementation: | ||
| 591 | 619 | ||
| 592 | 620 | - Pre-allocates / creates a fixed number of sessions. | |
| 593 | 621 | ||
@@ -834,9 +862,16 @@ async def ping(self): | |||
| 834 | 862 | await self.put(session) | |
| 835 | 863 | ||
| 836 | 864 | ||
| 837 | - @CrossSync.convert_class | ||
| 865 | + @CrossSync.convert_class( | ||
| 866 | + docstring_format_vars={ | ||
| 867 | + "experimental_api": ( | ||
| 868 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 869 | + "", | ||
| 870 | + ) | ||
| 871 | + } | ||
| 872 | + ) | ||
| 838 | 873 | class TransactionPingingPool(PingingPool): | |
| 839 | - """Concrete session pool implementation: | ||
| 874 | + """{experimental_api}Concrete session pool implementation: | ||
| 840 | 875 | ||
| 841 | 876 | Deprecated: TransactionPingingPool no longer begins a transaction for each of its sessions at startup. | |
| 842 | 877 | Hence the TransactionPingingPool is same as :class:`PingingPool` and maybe removed in the future. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,8 +48,16 @@ | |||
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | 50 | @total_ordering | |
| 51 | + @CrossSync.convert_class( | ||
| 52 | + docstring_format_vars={ | ||
| 53 | + "experimental_api": ( | ||
| 54 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 55 | + "", | ||
| 56 | + ) | ||
| 57 | + } | ||
| 58 | + ) | ||
| 51 | 59 | class Session(object): | |
| 52 | - """Representation of a Cloud Spanner Session. | ||
| 60 | + """{experimental_api}Representation of a Cloud Spanner Session. | ||
| 53 | 61 | ||
| 54 | 62 | We can use a :class:`Session` to: | |
| 55 | 63 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -776,8 +776,16 @@ def _update_for_precommit_token_pb_unsafe( | |||
| 776 | 776 | self._precommit_token = precommit_token_pb | |
| 777 | 777 | ||
| 778 | 778 | ||
| 779 | + @CrossSync.convert_class( | ||
| 780 | + docstring_format_vars={ | ||
| 781 | + "experimental_api": ( | ||
| 782 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 783 | + "", | ||
| 784 | + ) | ||
| 785 | + } | ||
| 786 | + ) | ||
| 779 | 787 | class Snapshot(_SnapshotBase): | |
| 780 | - """Allow a set of reads / SQL statements with shared staleness.""" | ||
| 788 | + """{experimental_api}Allow a set of reads / SQL statements with shared staleness.""" | ||
| 781 | 789 | ||
| 782 | 790 | def __init__( | |
| 783 | 791 | self, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,8 +23,16 @@ | |||
| 23 | 23 | from google.cloud.spanner_v1.types.type import TypeCode | |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | + @CrossSync.convert_class( | ||
| 27 | + docstring_format_vars={ | ||
| 28 | + "experimental_api": ( | ||
| 29 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 30 | + "", | ||
| 31 | + ) | ||
| 32 | + } | ||
| 33 | + ) | ||
| 26 | 34 | class StreamedResultSet(object): | |
| 27 | - """Process a sequence of partial result sets into a single set of row data. | ||
| 35 | + """{experimental_api}Process a sequence of partial result sets into a single set of row data. | ||
| 28 | 36 | ||
| 29 | 37 | :type response_iterator: | |
| 30 | 38 | :param response_iterator: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,8 +54,16 @@ | |||
| 54 | 54 | from google.cloud.spanner_v1.types.transaction import TransactionOptions | |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | + @CrossSync.convert_class( | ||
| 58 | + docstring_format_vars={ | ||
| 59 | + "experimental_api": ( | ||
| 60 | + "\n\n .. warning::\n The Spanner AsyncIO API is experimental and may be subject to breaking changes.\n", | ||
| 61 | + "", | ||
| 62 | + ) | ||
| 63 | + } | ||
| 64 | + ) | ||
| 57 | 65 | class Transaction(_SnapshotBase, _BatchBase): | |
| 58 | - """Implement read-write transaction semantics for a session. | ||
| 66 | + """{experimental_api}Implement read-write transaction semantics for a session. | ||
| 59 | 67 | ||
| 60 | 68 | :type session: :class:`~google.cloud.spanner_v1.session.Session` | |
| 61 | 69 | :param session: the session used to perform the commit | |
| Back | FazBrowse Home | New Git URL |
0 commit comments