Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove base class to avoid type conflict #1619

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ omit =
*/samples/*
*/conftest.py
*/google-cloud-sdk/lib/*
# NOTE: Temporarily disabling coverage for `_requests_base.py`.
*/_requests_base.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
3 changes: 2 additions & 1 deletion google/auth/transport/_requests_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# limitations under the License.

"""Transport adapter for Base Requests."""

# NOTE: The coverage for this file is temporarily disabled in `.coveragerc`
# since it is currently unused.

import abc

Expand Down
5 changes: 2 additions & 3 deletions google/auth/transport/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from google.auth import exceptions
from google.auth import transport
import google.auth.transport._mtls_helper
from google.auth.transport._requests_base import _BaseAuthorizedSession
from google.oauth2 import service_account

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


class AuthorizedSession(requests.Session, _BaseAuthorizedSession):
class AuthorizedSession(requests.Session):
"""A Requests Session class with credentials.

This class is used to perform requests to API endpoints that require
Expand Down Expand Up @@ -390,7 +389,7 @@ def __init__(
default_host=None,
):
super(AuthorizedSession, self).__init__()
_BaseAuthorizedSession.__init__(self, credentials)
self.credentials = credentials
self._refresh_status_codes = refresh_status_codes
self._max_refresh_attempts = max_refresh_attempts
self._refresh_timeout = refresh_timeout
Expand Down