Skip to content

Commit 87880a6

Browse files
committed
chore(auth): remove unused __eq__ implementations
1 parent 5a8ad8b commit 87880a6

2 files changed

Lines changed: 2 additions & 19 deletions

File tree

packages/google-auth/google/auth/_regional_access_boundary_utils.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ def __setstate__(self, state):
110110
self.__dict__.update(state)
111111
self._update_lock = threading.Lock()
112112

113-
def __eq__(self, other):
114-
if not isinstance(other, _RegionalAccessBoundaryManager):
115-
return False
116-
return (
117-
self._data == other._data
118-
and self.refresh_manager == other.refresh_manager
119-
and self._use_blocking_regional_access_boundary_lookup
120-
== other._use_blocking_regional_access_boundary_lookup
121-
)
122113

123114
def use_blocking_regional_access_boundary_lookup(self):
124115
"""Enables blocking regional access boundary lookup to true"""
@@ -333,12 +324,6 @@ def __setstate__(self, state):
333324
self._lock = threading.Lock()
334325
self._worker = None
335326

336-
def __eq__(self, other):
337-
if not isinstance(other, _RegionalAccessBoundaryRefreshManager):
338-
return False
339-
# Note: We only compare public/pickled properties.
340-
return self._worker == other._worker
341-
342327
def start_refresh(self, credentials, request, rab_manager):
343328
"""
344329
Starts a background thread to refresh the Regional Access Boundary if one is not already running.

packages/google-auth/system_tests/system_tests_sync/test_external_accounts.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,8 @@ def check_impersonation_expiration():
216216

217217
credentials.refresh(http_request)
218218

219-
now = _helpers.utcnow()
220-
# Allow for some clock skew between the test runner and the IAM server.
221-
utcmax = now + datetime.timedelta(seconds=TOKEN_LIFETIME_SECONDS + 10)
222-
utcmin = now + datetime.timedelta(seconds=TOKEN_LIFETIME_SECONDS - BUFFER_SECONDS)
219+
utcmax = _helpers.utcnow() + datetime.timedelta(seconds=TOKEN_LIFETIME_SECONDS)
220+
utcmin = utcmax - datetime.timedelta(seconds=BUFFER_SECONDS)
223221
assert utcmin < credentials._impersonated_credentials.expiry <= utcmax
224222

225223
return True

0 commit comments

Comments
 (0)