Skip to content

Commit 9e2789a

Browse files
authored
fix: remove base class to avoid type conflict (#1619)
* fix: remove base class to avoid type conflict * remove unused import * disable coverage
1 parent 6be19fb commit 9e2789a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ omit =
66
*/samples/*
77
*/conftest.py
88
*/google-cloud-sdk/lib/*
9+
# NOTE: Temporarily disabling coverage for `_requests_base.py`.
10+
*/_requests_base.py
911
exclude_lines =
1012
# Re-enable the standard pragma
1113
pragma: NO COVER

google/auth/transport/_requests_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# limitations under the License.
1414

1515
"""Transport adapter for Base Requests."""
16-
16+
# NOTE: The coverage for this file is temporarily disabled in `.coveragerc`
17+
# since it is currently unused.
1718

1819
import abc
1920

google/auth/transport/requests.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
from google.auth import exceptions
3939
from google.auth import transport
4040
import google.auth.transport._mtls_helper
41-
from google.auth.transport._requests_base import _BaseAuthorizedSession
4241
from google.oauth2 import service_account
4342

4443
_LOGGER = logging.getLogger(__name__)
@@ -293,7 +292,7 @@ def proxy_manager_for(self, *args, **kwargs):
293292
return super(_MutualTlsOffloadAdapter, self).proxy_manager_for(*args, **kwargs)
294293

295294

296-
class AuthorizedSession(requests.Session, _BaseAuthorizedSession):
295+
class AuthorizedSession(requests.Session):
297296
"""A Requests Session class with credentials.
298297
299298
This class is used to perform requests to API endpoints that require
@@ -390,7 +389,7 @@ def __init__(
390389
default_host=None,
391390
):
392391
super(AuthorizedSession, self).__init__()
393-
_BaseAuthorizedSession.__init__(self, credentials)
392+
self.credentials = credentials
394393
self._refresh_status_codes = refresh_status_codes
395394
self._max_refresh_attempts = max_refresh_attempts
396395
self._refresh_timeout = refresh_timeout

0 commit comments

Comments
 (0)