-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some deprecations in Excon backend.
- Loading branch information
1 parent
8dd0918
commit acee3ab
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So it looks like this will check the version on every single request, right? That's a bit wasteful since the version will never change between requests; once a version of excon is loaded, that's the version that will be used for the rest of that process's lifetime. For cases like these, I tend to define a helper method, and put the conditional at the class level:
Then you can call
make_request
from theperform
method, with no version conditional needed.