|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -from abc import abstractmethod |
| 15 | +from abc import abstractmethod, ABCMeta |
16 | 16 | from concurrent.futures import Future |
17 | 17 | from typing import ContextManager, Mapping, Union, AsyncContextManager |
18 | 18 |
|
19 | 19 | from google.cloud.pubsublite.types import TopicPath |
20 | 20 |
|
21 | 21 |
|
22 | | -class AsyncPublisherClientInterface(AsyncContextManager): |
| 22 | +class AsyncPublisherClientInterface(AsyncContextManager, metaclass=ABCMeta): |
23 | 23 | """ |
24 | 24 | An AsyncPublisherClientInterface publishes messages similar to Google Pub/Sub, but must be used in an |
25 | 25 | async context. Any publish failures are unlikely to succeed if retried. |
@@ -50,9 +50,10 @@ async def publish( |
50 | 50 | Raises: |
51 | 51 | GoogleApiCallError: On a permanent failure. |
52 | 52 | """ |
| 53 | + raise NotImplementedError() |
53 | 54 |
|
54 | 55 |
|
55 | | -class PublisherClientInterface(ContextManager): |
| 56 | +class PublisherClientInterface(ContextManager, metaclass=ABCMeta): |
56 | 57 | """ |
57 | 58 | A PublisherClientInterface publishes messages similar to Google Pub/Sub. |
58 | 59 | Any publish failures are unlikely to succeed if retried. |
@@ -84,3 +85,4 @@ def publish( |
84 | 85 | Raises: |
85 | 86 | GoogleApiCallError: On a permanent failure. |
86 | 87 | """ |
| 88 | + raise NotImplementedError() |
0 commit comments