locust 2.31.6.dev4__py3-none-any.whl → 2.31.6.dev7__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 CHANGED
@@ -14,7 +14,7 @@ __version_tuple__: VERSION_TUPLE
14
14
  version_tuple: VERSION_TUPLE
15
15
 
16
16
 
17
- __version__ = "2.31.6.dev4"
17
+ __version__ = "2.31.6.dev7"
18
18
  version = __version__
19
- __version_tuple__ = (2, 31, 6, "dev4")
19
+ __version_tuple__ = (2, 31, 6, "dev7")
20
20
  version_tuple = __version_tuple__
locust/argument_parser.py CHANGED
@@ -15,6 +15,7 @@ import tempfile
15
15
  import textwrap
16
16
  from collections import OrderedDict
17
17
  from typing import Any, NamedTuple
18
+ from urllib.parse import urlparse
18
19
  from uuid import uuid4
19
20
 
20
21
  if sys.version_info >= (3, 11):
@@ -159,7 +160,7 @@ def download_locustfile_from_url(url: str) -> str:
159
160
  sys.stderr.write(f"Failed to get locustfile from: {url}. Response is not valid python code.")
160
161
  sys.exit(1)
161
162
 
162
- with open(os.path.join(tempfile.gettempdir(), url.rsplit("/", 1)[-1]), "w") as locustfile:
163
+ with open(os.path.join(tempfile.gettempdir(), urlparse(url).path.split("/")[-1]), "w") as locustfile:
163
164
  locustfile.write(response.text)
164
165
 
165
166
  atexit.register(exit_handler, locustfile.name)
@@ -34,7 +34,7 @@ from requests.utils import get_encoding_from_headers
34
34
  if TYPE_CHECKING:
35
35
  import sys
36
36
  from collections.abc import Callable, Generator
37
- from typing import TypedDict
37
+ from typing import Any, TypedDict
38
38
 
39
39
  if sys.version_info >= (3, 11):
40
40
  from typing import Unpack
@@ -51,14 +51,14 @@ if TYPE_CHECKING:
51
51
  context: dict
52
52
 
53
53
  class PutKwargs(PostKwargs, total=False):
54
- json: dict | None
54
+ json: Any | None
55
55
 
56
56
  class PatchKwargs(PostKwargs, total=False):
57
- json: dict | None
57
+ json: Any | None
58
58
 
59
59
  class RESTKwargs(PostKwargs, total=False):
60
60
  data: str | dict | None
61
- json: dict | None
61
+ json: Any | None
62
62
 
63
63
 
64
64
  # Monkey patch geventhttpclient.useragent.CompatRequest so that Cookiejar works with Python >= 3.3
@@ -185,7 +185,7 @@ class FastHttpSession:
185
185
  stream: bool = False,
186
186
  headers: dict | None = None,
187
187
  auth: tuple[str | bytes, str | bytes] | None = None,
188
- json: dict | None = None,
188
+ json: Any | None = None,
189
189
  allow_redirects: bool = True,
190
190
  context: dict = {},
191
191
  **kwargs,
@@ -205,9 +205,9 @@ class FastHttpSession:
205
205
  return a context manager to work as argument to a with statement. This will allow the
206
206
  request to be marked as a fail based on the content of the response, even if the response
207
207
  code is ok (2xx). The opposite also works, one can use catch_response to catch a request
208
- and then mark it as successful even if the response code was not (i.e 500 or 404).
208
+ and then mark it as successful even if the response code was not (i.e. 500 or 404).
209
209
  :param data: (optional) String/bytes to send in the body of the request.
210
- :param json: (optional) Dictionary to send in the body of the request.
210
+ :param json: (optional) Json to send in the body of the request.
211
211
  Automatically sets Content-Type and Accept headers to "application/json".
212
212
  Only used if data is not set.
213
213
  :param headers: (optional) Dictionary of HTTP Headers to send with the request.
@@ -316,7 +316,7 @@ class FastHttpSession:
316
316
  return self.request("PATCH", url, data=data, **kwargs)
317
317
 
318
318
  def post(
319
- self, url: str, data: str | dict | None = None, json: dict | None = None, **kwargs: Unpack[PostKwargs]
319
+ self, url: str, data: str | dict | None = None, json: Any | None = None, **kwargs: Unpack[PostKwargs]
320
320
  ) -> ResponseContextManager | FastResponse:
321
321
  """Sends a POST request"""
322
322
  return self.request("POST", url, data=data, json=json, **kwargs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: locust
3
- Version: 2.31.6.dev4
3
+ Version: 2.31.6.dev7
4
4
  Summary: Developer-friendly load testing framework
5
5
  Home-page: https://locust.io/
6
6
  License: MIT
@@ -1,10 +1,10 @@
1
1
  locust/__init__.py,sha256=Jit8eNUrwuMLqavyFvMZr69e61DILq_KB4yT4MciScw,1681
2
2
  locust/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
3
- locust/_version.py,sha256=oPBsB4ZcBdTuICGVL72nwMaTGTRAuOD9iUlpqVPSj3E,458
4
- locust/argument_parser.py,sha256=NPdS1TzhN0C6W5Mc0b1lUbQsEhVoTWK4q1-ol1PjPeo,28963
3
+ locust/_version.py,sha256=LNan-q5oVrp-0sOepwBcvB2ZcPf2GBPVwC_Xz-818ac,458
4
+ locust/argument_parser.py,sha256=V0EI7vVvAFLX68ntjRg6qGr2hXSLJgQ0y743zvurwA8,29008
5
5
  locust/clients.py,sha256=OUc6N965Ip5HsRVt1GhnxCP_m9bgnLoredUHTHmyodc,19479
6
6
  locust/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- locust/contrib/fasthttp.py,sha256=3DoIkXZLbs3rWSGiAgsWYPJeU6UW3HXPCsnhsziq60Y,28471
7
+ locust/contrib/fasthttp.py,sha256=fRtFccM6Ky50RhVHmSrv5M_InlkwxXNw94bi-u0zil4,28466
8
8
  locust/contrib/postgres.py,sha256=OuMWnGYN10K65Tq2axVESEW25Y0g5gJb0rK90jkcCJg,1230
9
9
  locust/debug.py,sha256=We6Z9W0btkKSc7PxWmrZx-xMynvOOsKhG6jmDgQin0g,5134
10
10
  locust/dispatch.py,sha256=KPjyUFxXuK3u7nOvJs5ZB7KWKUlyvxHCPE3SWTddOiY,16193
@@ -46,8 +46,8 @@ locust/webui/dist/auth.html,sha256=lFK2hUASKiH4veqEKI8SVpVcv75L07iLgdsx1usfPRo,6
46
46
  locust/webui/dist/index.html,sha256=w1ar7WpzWHSVkgoL5n6IPCOvAgWfmOChoYofr2xsey0,654
47
47
  locust/webui/dist/report.html,sha256=bjpe_eyweJLqLk7REsQOdOPp7e8PoGRajD5P8gIJeNE,1472409
48
48
  poetry.lock,sha256=SYexv51dGkbiljj9e0x0LVzQ0-gxKn31hwhFTO2t298,205000
49
- locust-2.31.6.dev4.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
50
- locust-2.31.6.dev4.dist-info/METADATA,sha256=eIMPg9vCKXqRCwTE0U8HmpzwtGLj3vY4r-hL6E_C8cE,7678
51
- locust-2.31.6.dev4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
52
- locust-2.31.6.dev4.dist-info/entry_points.txt,sha256=RhIxlLwU_Ae_WjimS5COUDLagdCh6IOMyLtgaQxNmlM,43
53
- locust-2.31.6.dev4.dist-info/RECORD,,
49
+ locust-2.31.6.dev7.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
50
+ locust-2.31.6.dev7.dist-info/METADATA,sha256=WIPGHRH9xtaNWAvwlUm8sop9Ie_Uv-cpZI1C597Haew,7678
51
+ locust-2.31.6.dev7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
52
+ locust-2.31.6.dev7.dist-info/entry_points.txt,sha256=RhIxlLwU_Ae_WjimS5COUDLagdCh6IOMyLtgaQxNmlM,43
53
+ locust-2.31.6.dev7.dist-info/RECORD,,