locust 2.40.4.dev3__py3-none-any.whl → 2.40.5.dev5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- locust/_version.py +2 -2
- locust/contrib/fasthttp.py +14 -9
- locust/util/load_locustfile.py +1 -1
- {locust-2.40.4.dev3.dist-info → locust-2.40.5.dev5.dist-info}/METADATA +1 -1
- {locust-2.40.4.dev3.dist-info → locust-2.40.5.dev5.dist-info}/RECORD +8 -8
- {locust-2.40.4.dev3.dist-info → locust-2.40.5.dev5.dist-info}/WHEEL +0 -0
- {locust-2.40.4.dev3.dist-info → locust-2.40.5.dev5.dist-info}/entry_points.txt +0 -0
- {locust-2.40.4.dev3.dist-info → locust-2.40.5.dev5.dist-info}/licenses/LICENSE +0 -0
locust/_version.py
CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '2.40.
|
32
|
-
__version_tuple__ = version_tuple = (2, 40,
|
31
|
+
__version__ = version = '2.40.5.dev5'
|
32
|
+
__version_tuple__ = version_tuple = (2, 40, 5, 'dev5')
|
33
33
|
|
34
34
|
__commit_id__ = commit_id = None
|
locust/contrib/fasthttp.py
CHANGED
@@ -199,7 +199,7 @@ class FastHttpSession:
|
|
199
199
|
allow_redirects: bool = True,
|
200
200
|
context: dict = {},
|
201
201
|
**kwargs,
|
202
|
-
) -> ResponseContextManager:
|
202
|
+
) -> ResponseContextManager: # technically it can also return FastResponse
|
203
203
|
"""
|
204
204
|
Send an HTTP request
|
205
205
|
|
@@ -226,6 +226,8 @@ class FastHttpSession:
|
|
226
226
|
Another side effect of setting stream to True is that the time for downloading the response
|
227
227
|
content will not be accounted for in the request time that is reported by Locust.
|
228
228
|
:param allow_redirects: (optional) Set to True by default.
|
229
|
+
:return: A :py:class:`FastResponse <locust.contrib.fasthttp.FastResponse>` object if catch_response is False, and
|
230
|
+
:py:class:`ResponseContextManager <locust.contrib.fasthttp.ResponseContextManager>` if True.
|
229
231
|
"""
|
230
232
|
# prepend url with hostname unless it's already an absolute URL
|
231
233
|
built_url = self._build_url(url)
|
@@ -283,12 +285,12 @@ class FastHttpSession:
|
|
283
285
|
except HTTPParseError as e:
|
284
286
|
request_meta["response_time"] = (time.perf_counter() - start_perf_counter) * 1000
|
285
287
|
request_meta["exception"] = e
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
288
|
+
if catch_response:
|
289
|
+
return ResponseContextManager(response, self.request_event, request_meta, catch_response)
|
290
|
+
else:
|
291
|
+
self.request_event.fire(**request_meta)
|
292
|
+
return response # type: ignore[return-value]
|
290
293
|
|
291
|
-
rcm = ResponseContextManager(response, self.request_event, request_meta, catch_response)
|
292
294
|
# Record the consumed time
|
293
295
|
# Note: This is intentionally placed after we record the content_size above, since
|
294
296
|
# we'll then trigger fetching of the body (unless stream=True)
|
@@ -299,9 +301,12 @@ class FastHttpSession:
|
|
299
301
|
except FAILURE_EXCEPTIONS as e:
|
300
302
|
request_meta["exception"] = e # type: ignore[assignment] # mypy, why are you so dumb..
|
301
303
|
|
302
|
-
if
|
303
|
-
|
304
|
-
|
304
|
+
if catch_response:
|
305
|
+
return ResponseContextManager(response, self.request_event, request_meta, catch_response)
|
306
|
+
else:
|
307
|
+
# if not using with-block, report the request immediately
|
308
|
+
self.request_event.fire(**request_meta)
|
309
|
+
return response # type: ignore[return-value]
|
305
310
|
|
306
311
|
def delete(self, url: str, **kwargs: Unpack[RESTKwargs]) -> ResponseContextManager:
|
307
312
|
"""Sends a DELETE request"""
|
locust/util/load_locustfile.py
CHANGED
@@ -105,7 +105,7 @@ def load_locustfile_pytest(path) -> dict[str, type[User]]:
|
|
105
105
|
{},
|
106
106
|
[
|
107
107
|
"-q", # suppress pytest loggings about "test session starts" and "collected 0 items" etc
|
108
|
-
"-s", # dont capture stdin (locust uses it for opening a browser and
|
108
|
+
"-s", # dont capture stdin (locust uses it for opening a browser and other input events)
|
109
109
|
path,
|
110
110
|
],
|
111
111
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
locust/__init__.py,sha256=HadpgGidiyCDPSKwkxrk1Qw6eB7dTmftNJVftuJzAiw,1876
|
2
2
|
locust/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
|
3
|
-
locust/_version.py,sha256=
|
3
|
+
locust/_version.py,sha256=uvZOqZ1buA21o25CyOLGRDU1I6SPxE0F7w-KP2FRUDo,719
|
4
4
|
locust/argument_parser.py,sha256=t6mAoK9u13DxC9UH-alVqS6fFABFTyNWSJG89yQ4QQQ,33056
|
5
5
|
locust/clients.py,sha256=OfMTOT3LwijczdL3u6bpDwDNM2TDcPCIwXBelizPOyw,20776
|
6
6
|
locust/debug.py,sha256=7CCm8bIg44uGH2wqBlo1rXBzV2VzwPicLxLewz8r5CQ,5099
|
@@ -18,7 +18,7 @@ locust/shape.py,sha256=t-lwBS8LOjWcKXNL7j2U3zroIXJ1b0fazUwpRYQOKXw,1973
|
|
18
18
|
locust/stats.py,sha256=qyoSKT0i7RunLDj5pMGqizK1Sp8bcqUsXwh2m4_DpR8,47203
|
19
19
|
locust/web.py,sha256=pLYuocmx9gifJ4vsVDgGDYIPkQhQxI7kKjxoXcUajqM,31865
|
20
20
|
locust/contrib/__init__.py,sha256=LtZN7MczpIAbZkN7PT2h8W2wgb9nBl6cDXbFCVsV4fo,290
|
21
|
-
locust/contrib/fasthttp.py,sha256=
|
21
|
+
locust/contrib/fasthttp.py,sha256=bobc455EvX53brWPDXVy8UDITdH2YJ7iDpkSbNaZ_i8,31140
|
22
22
|
locust/contrib/milvus.py,sha256=YabgLd0lImzWupJFCm0OZAW-Nxeibwn91ldWpZ2irDo,12811
|
23
23
|
locust/contrib/mongodb.py,sha256=1seUYgJOaNKwybYOP9PUEVhgl8hGy-G33f8lFj3R8W8,1246
|
24
24
|
locust/contrib/oai.py,sha256=Ot3T8lp31ThckGbNps86oVvq6Vn845Eec0mxhDmONDE,2684
|
@@ -40,7 +40,7 @@ locust/util/date.py,sha256=2uZAY-fkJq7llUcVywTDTbe-_2IYumCv18n3Vrc75gw,833
|
|
40
40
|
locust/util/deprecation.py,sha256=4my4IcFpbM6yEKr569GMUKMsS0ywp0N4JPhhwm3J1-w,2026
|
41
41
|
locust/util/directory.py,sha256=2EeuVIIFEErm0OpNXdsEgQLx49jAXq-PvMj2uY0Mr8o,326
|
42
42
|
locust/util/exception_handler.py,sha256=jTMyBq2a0O07fRjmqGkheyaPj58tUgnbbcjoesKGPws,797
|
43
|
-
locust/util/load_locustfile.py,sha256=
|
43
|
+
locust/util/load_locustfile.py,sha256=0o2NFI2VVWe9l1_IjU1eHOnVg5W-U6pcd2YMQnOfrZ8,5179
|
44
44
|
locust/util/rounding.py,sha256=5haxR8mKhATqag6WvPby-MSRRgIw5Ob6thbyvMYZM7o,92
|
45
45
|
locust/util/timespan.py,sha256=Y0LtnhUq2Mq19p04u0XtBlYQ_-S2cRvwRdgru8W9WhA,986
|
46
46
|
locust/util/url.py,sha256=s_W2PCxvxTWxWX0yUvp-8VBuQm881KwI5X9iifogZG4,321
|
@@ -56,8 +56,8 @@ locust/webui/dist/assets/terminal.gif,sha256=iw80LO2u0dnf4wpGfFJZauBeKTcSpw9iUfI
|
|
56
56
|
locust/webui/dist/assets/testruns-dark.png,sha256=G4p2VZSBuuqF4neqUaPSshIp5OKQJ_Bvb69Luj6XuVs,125231
|
57
57
|
locust/webui/dist/assets/testruns-light.png,sha256=JinGDiiBPOkhpfF-XCbmQqhRInqItrjrBTLKt5MlqVI,130301
|
58
58
|
pytest_locust/plugin.py,sha256=WAyiRHLynXegbbX2DxIutPKO4PQRT6JdBFA7zbbaJgM,1469
|
59
|
-
locust-2.40.
|
60
|
-
locust-2.40.
|
61
|
-
locust-2.40.
|
62
|
-
locust-2.40.
|
63
|
-
locust-2.40.
|
59
|
+
locust-2.40.5.dev5.dist-info/METADATA,sha256=f6890UACy-DHeMZevIi1yHDp6zg6WSyQMk8ypsMZa00,9515
|
60
|
+
locust-2.40.5.dev5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
61
|
+
locust-2.40.5.dev5.dist-info/entry_points.txt,sha256=0uIHcQ71R1qaWhM_sd8uBUCCJgp7gJfGHUVMnJeZfcY,86
|
62
|
+
locust-2.40.5.dev5.dist-info/licenses/LICENSE,sha256=5hnz-Vpj0Z3kSCQl0LzV2hT1TLc4LHcbpBp3Cy-EuyM,1110
|
63
|
+
locust-2.40.5.dev5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|