Skip to content

Commit

Permalink
feat(phishingprotection): undeprecate resource name helper methods, a…
Browse files Browse the repository at this point in the history
…dd 2.7 deprecation warning (via synth) (#10048)
  • Loading branch information
yoshi-automation authored and busunkim96 committed Jan 8, 2020
1 parent e04d1db commit 21e4ff3
Show file tree
Hide file tree
Showing 3 changed files with 3,418 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.phishingprotection_v1beta1 import types
from google.cloud.phishingprotection_v1beta1.gapic import (
phishing_protection_service_client,
)


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class PhishingProtectionServiceClient(
phishing_protection_service_client.PhishingProtectionServiceClient
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,7 @@ 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
)
Expand Down
Loading

0 comments on commit 21e4ff3

Please sign in to comment.