fix: remove base class to avoid type conflict #1619
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Temporarily removing
_BaseAuthorizedSession
as a parent ofAuthorizedSession
to avoid type conflict between the meta classes of_BaseAuthorizedSession
(i.e.abc.ABCMeta
) andrequests.Session
(i.e.type
) .Possible solutions to tackle this are:
_BaseAuthorizedSession
. However, we lose the ability to enforce the methods in subclasses.requests.Session
withinAuthorizedSession
instead of using inheritance. However, this changes behaviour i.e. the underlying api methods are currently exposed viaAuthorizedSession
. We can probably define those methods (get
,post
,put
, etc) directly in theAuthorizedSession
class.