-
Notifications
You must be signed in to change notification settings - Fork 3k
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
requests >1.0 #61
Comments
Hi! Yes we do. Currently however, the code relies on some event hooks that was removed in Requests 1.0, so there's some code in the HTTP client that needs to be rewritten before it can happen. |
True. I need locust on top of requests 1.1 so I started rewriting locust/client.py myself (I posted the question just to check you hadn't already been doing that in unpublished branch). The code I have is based on requests head (which added a response.elapsed attrib which gives you the response time). When requests 1.2 is released (which I think should be soon) and I shake the last bugs out of the migrated locust I can post a PR if you like. |
Oh, that sounds great! A PR would be much appreciated. |
apologies for radio silence on this. I have a branch against requests 1.2 that passes tests and appears to work. Would still like to test it a bit more though. |
Cool. Seems like you haven't pushed the branch to github yet though? :) |
Pushed here: https://github.com/sanga/locust/compare/requests_1_2_squashed A couple of points to note. I haven't tested this recently, but as I recall the tests were passing and it worked at least in my setup. Secondly, keep_alives are enabled in that branch. And as I recall they are disabled in locust. That would be the last thing so far as I'm aware. Lastly, probably still needs more testing/clean up etc, but if you fancy looking through then go ahead. Hmmmm... when I look at it now if looks like a depressingly small diff for something that needed a decent amount of testing to get working. |
Tested, updated to master and merged in #86 :-) |
Merged to master in 4aea348 |
Do you guys have any plans/code for migrating to requests >1.0?
The text was updated successfully, but these errors were encountered: