Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Remove deprecations from path helpers #9

Merged
merged 1 commit into from Jan 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -93,36 +93,21 @@ def from_service_account_file(cls, filename, *args, **kwargs):

@classmethod
def project_path(cls, project):
"""DEPRECATED. Return a fully-qualified project string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
"projects/{project}", project=project
)

@classmethod
def secret_path(cls, project, secret):
"""DEPRECATED. Return a fully-qualified secret string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified secret string."""
return google.api_core.path_template.expand(
"projects/{project}/secrets/{secret}", project=project, secret=secret
)

@classmethod
def secret_version_path(cls, project, secret, secret_version):
"""DEPRECATED. Return a fully-qualified secret_version string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified secret_version string."""
return google.api_core.path_template.expand(
"projects/{project}/secrets/{secret}/versions/{secret_version}",
project=project,
Expand Down