Skip to content

Commit b26c468

Browse files
dhermeslukesneeringer
authored andcommitted
Adding GCCL header for HTTP APIs. (#3046)
1 parent cdceb21 commit b26c468

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/google-cloud-storage/google/cloud/storage/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
machine).
3131
"""
3232

33+
34+
from pkg_resources import get_distribution
35+
__version__ = get_distribution('google-cloud-storage').version
36+
3337
from google.cloud.storage.batch import Batch
3438
from google.cloud.storage.blob import Blob
3539
from google.cloud.storage.bucket import Bucket

packages/google-cloud-storage/google/cloud/storage/_http.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414

1515
"""Create / interact with Google Cloud Storage connections."""
1616

17-
from pkg_resources import get_distribution
18-
1917
from google.cloud import _http
2018

19+
from google.cloud.storage import __version__
20+
2121

22-
_STORAGE_DIST = get_distribution('google-cloud-storage')
23-
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(_STORAGE_DIST.version)
22+
_CLIENT_INFO = _http.CLIENT_INFO_TEMPLATE.format(__version__)
2423

2524

2625
class Connection(_http.JSONConnection):

0 commit comments

Comments
 (0)