bitstamp-python-client icon indicating copy to clipboard operation
bitstamp-python-client copied to clipboard

Use requests sesison to preserve TCP connection

Open martinramsdale opened this issue 7 years ago • 4 comments

Use requests session to preserve TCP connection - massively improves performance

[ NB: tests not run ]

martinramsdale avatar Dec 27 '17 23:12 martinramsdale

Hi @martinramsdale. Thank you for pull request. I'm sorry I cannot merge it as unit tests are not passing. Can you try to make tests run?

kmadac avatar Jan 01 '18 20:01 kmadac

Hi @martinramsdale, I just modified the tests to work with your changes. Can you please allow me to push changes to your PR branch created from a fork? Here is how to do it: https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/

kmadac avatar Jan 01 '18 22:01 kmadac

If you're going to add this, perhaps you should make the requests session passable into BaseClient for more flexibility.

SmileyChris avatar Jan 02 '18 09:01 SmileyChris

@kmadac Thanks for fixing up the tests. I was doing some manual testing since posting the PR and have noticed some intermittent errors being returned from BitStamp with these diffs. I haven't had a chance to repro/debug further, but for now am going to hold off on collapsing until I can confirm either way. @SmileyChris: Pending debug above, yes this seems like a reasonable idea, will add

martinramsdale avatar Jan 02 '18 09:01 martinramsdale