74
74
_ASSIGNMENT_DEPRECATED_MSG = """\
75
75
Assigning to '{}' is deprecated. Use the `policy.bindings` property to modify bindings instead."""
76
76
77
- _FACTORY_DEPRECATED_MSG = """\
78
- Factory method {0} is deprecated. Replace with '{0}'."""
79
-
80
77
_DICT_ACCESS_MSG = """\
81
78
Dict access is not supported on policies with version > 1 or with conditional bindings."""
82
79
@@ -323,12 +320,7 @@ def user(email):
323
320
324
321
Returns:
325
322
str: A member string corresponding to the given user.
326
-
327
- DEPRECATED: set the role `user:{email}` in the binding instead.
328
323
"""
329
- warnings .warn (
330
- _FACTORY_DEPRECATED_MSG .format ("user:{email}" ), DeprecationWarning ,
331
- )
332
324
return "user:%s" % (email ,)
333
325
334
326
@staticmethod
@@ -341,12 +333,7 @@ def service_account(email):
341
333
Returns:
342
334
str: A member string corresponding to the given service account.
343
335
344
- DEPRECATED: set the role `serviceAccount:{email}` in the binding instead.
345
336
"""
346
- warnings .warn (
347
- _FACTORY_DEPRECATED_MSG .format ("serviceAccount:{email}" ),
348
- DeprecationWarning ,
349
- )
350
337
return "serviceAccount:%s" % (email ,)
351
338
352
339
@staticmethod
@@ -358,12 +345,7 @@ def group(email):
358
345
359
346
Returns:
360
347
str: A member string corresponding to the given group.
361
-
362
- DEPRECATED: set the role `group:{email}` in the binding instead.
363
348
"""
364
- warnings .warn (
365
- _FACTORY_DEPRECATED_MSG .format ("group:{email}" ), DeprecationWarning ,
366
- )
367
349
return "group:%s" % (email ,)
368
350
369
351
@staticmethod
@@ -375,12 +357,7 @@ def domain(domain):
375
357
376
358
Returns:
377
359
str: A member string corresponding to the given domain.
378
-
379
- DEPRECATED: set the role `domain:{email}` in the binding instead.
380
360
"""
381
- warnings .warn (
382
- _FACTORY_DEPRECATED_MSG .format ("domain:{email}" ), DeprecationWarning ,
383
- )
384
361
return "domain:%s" % (domain ,)
385
362
386
363
@staticmethod
@@ -389,12 +366,7 @@ def all_users():
389
366
390
367
Returns:
391
368
str: A member string representing all users.
392
-
393
- DEPRECATED: set the role `allUsers` in the binding instead.
394
369
"""
395
- warnings .warn (
396
- _FACTORY_DEPRECATED_MSG .format ("allUsers" ), DeprecationWarning ,
397
- )
398
370
return "allUsers"
399
371
400
372
@staticmethod
@@ -403,12 +375,7 @@ def authenticated_users():
403
375
404
376
Returns:
405
377
str: A member string representing all authenticated users.
406
-
407
- DEPRECATED: set the role `allAuthenticatedUsers` in the binding instead.
408
378
"""
409
- warnings .warn (
410
- _FACTORY_DEPRECATED_MSG .format ("allAuthenticatedUsers" ), DeprecationWarning ,
411
- )
412
379
return "allAuthenticatedUsers"
413
380
414
381
@classmethod
0 commit comments