locust 2.27.1.dev7__py3-none-any.whl → 2.27.1.dev12__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
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '2.27.1.dev7'
16
- __version_tuple__ = version_tuple = (2, 27, 1, 'dev7')
15
+ __version__ = version = '2.27.1.dev12'
16
+ __version_tuple__ = version_tuple = (2, 27, 1, 'dev12')
locust/argument_parser.py CHANGED
@@ -32,6 +32,16 @@ version = locust.__version__
32
32
  DEFAULT_CONFIG_FILES = ("~/.locust.conf", "locust.conf", "pyproject.toml")
33
33
 
34
34
 
35
+ # Clean up downloaded locustfile on exit
36
+ def exit_handler(filename) -> None:
37
+ try:
38
+ os.remove(filename)
39
+ except FileNotFoundError:
40
+ pass # when multiple workers are running on the same machine, another one may already have deleted it
41
+ except PermissionError:
42
+ pass # this happens occasionally on windows on GH, maybe for the same reason?
43
+
44
+
35
45
  class LocustArgumentParser(configargparse.ArgumentParser):
36
46
  """Drop-in replacement for `configargparse.ArgumentParser` that adds support for
37
47
  optionally exclude arguments from the UI.
@@ -170,14 +180,7 @@ def download_locustfile_from_url(url: str) -> str:
170
180
  with open(os.path.join(tempfile.gettempdir(), url.rsplit("/", 1)[-1]), "w") as locustfile:
171
181
  locustfile.write(response.text)
172
182
 
173
- # Clean up downloaded files on exit
174
- def exit_handler():
175
- try:
176
- os.remove(locustfile.name)
177
- except FileNotFoundError:
178
- pass # this is normal when multiple workers are running on the same machine
179
-
180
- atexit.register(exit_handler)
183
+ atexit.register(exit_handler, locustfile.name)
181
184
  return locustfile.name
182
185
 
183
186
 
@@ -263,13 +266,7 @@ def download_locustfile_from_master(master_host: str, master_port: int) -> str:
263
266
  with open(os.path.join(tempfile.gettempdir(), filename), "w", encoding="utf-8") as locustfile:
264
267
  locustfile.write(msg.data["contents"])
265
268
 
266
- def exit_handler():
267
- try:
268
- os.remove(locustfile.name)
269
- except FileNotFoundError:
270
- pass # this is normal when multiple workers are running on the same machine
271
-
272
- atexit.register(exit_handler)
269
+ atexit.register(exit_handler, locustfile.name)
273
270
 
274
271
  tempclient.close()
275
272
  return locustfile.name
locust/log.py CHANGED
@@ -1,8 +1,9 @@
1
1
  import logging
2
2
  import logging.config
3
+ import re
3
4
  import socket
4
5
 
5
- HOSTNAME = socket.gethostname()
6
+ HOSTNAME = re.sub(r"\..*", "", socket.gethostname())
6
7
 
7
8
  # Global flag that we set to True if any unhandled exception occurs in a greenlet
8
9
  # Used by main.py to set the process return code to non-zero
locust/main.py CHANGED
@@ -175,11 +175,11 @@ def main():
175
175
  sys.exit(1)
176
176
 
177
177
  if options.hatch_rate:
178
- sys.stderr.write("[DEPRECATED] The --hatch-rate parameter has been renamed --spawn-rate\n")
179
- options.spawn_rate = options.hatch_rate
178
+ sys.stderr.write("--hatch-rate parameter has been renamed --spawn-rate\n")
179
+ sys.exit(1)
180
180
 
181
181
  if options.legacy_ui:
182
- sys.stderr.write("[REMOVED] The legacy UI has been removed. Remove this flag to use the new UI")
182
+ sys.stderr.write("--legacy-ui is no longer supported, remove the parameter to continue\n")
183
183
  sys.exit(1)
184
184
 
185
185
  # setup logging
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: locust
3
- Version: 2.27.1.dev7
3
+ Version: 2.27.1.dev12
4
4
  Summary: Developer friendly load testing framework
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/locustio/locust
@@ -1,7 +1,7 @@
1
1
  locust/__init__.py,sha256=g6oA-Ba_hs3gLWVf5MKJ1mvfltI8MFnDWG8qslqm8yg,1402
2
2
  locust/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
3
- locust/_version.py,sha256=KfITNoysCewEedAEshROjJKa4Y8wd2JXKEHzxzR7Rpg,426
4
- locust/argument_parser.py,sha256=amD8faLijyrBtkDZaLuQdKXrN2U0DcvF_EWCTpnftNA,28714
3
+ locust/_version.py,sha256=SlnucZxuZwPMo0dXRQRXbQyCOSzZlMSwDLvlzPQdW8U,428
4
+ locust/argument_parser.py,sha256=5gUvJ6zLTscX1fUP25oAj_VemKl11Hm2aTm86cIlzWs,28680
5
5
  locust/clients.py,sha256=YKuAyMAbxs8_-w7XJw0hc67KFBNNLxibsw6FwiS01Q8,14781
6
6
  locust/debug.py,sha256=We6Z9W0btkKSc7PxWmrZx-xMynvOOsKhG6jmDgQin0g,5134
7
7
  locust/dispatch.py,sha256=vYh0QEDFgJ3hY0HgSk-EiNO7IP9ffzXF_Et8wB9JvsI,16995
@@ -10,8 +10,8 @@ locust/event.py,sha256=xgNKbcejxy1TNUfIdgV75KgD2_BOwQmvjrJ4hWuydRw,7740
10
10
  locust/exception.py,sha256=jGgJ32ubuf4pWdlaVOkbh2Y0LlG0_DHi-lv3ib8ppOE,1791
11
11
  locust/html.py,sha256=Qz3Php454f5QwIdJyP2ckJ2L9aNkdZQCVahFELfMBIc,3983
12
12
  locust/input_events.py,sha256=ZIyePyAMuA_YFYWg18g_pE4kwuQV3RbEB250MzXRwjY,3314
13
- locust/log.py,sha256=2IVp9YL4ZPfWdj3sBFuOHfgneg3g7m7tUGR-sy2s3E8,3155
14
- locust/main.py,sha256=FM8mkO3HGXJCaUbXZNXn1Yy37fuUaiS3VuLEk7pbbwQ,27831
13
+ locust/log.py,sha256=cqLt7nnxnQuM4vWFB5EpJpNUTxGBVEkUJuaJPI1S7_Y,3186
14
+ locust/main.py,sha256=snmuyKutaCYbjrhHDuPjbeqNAtWcC9wkPa0AnJswMGY,27780
15
15
  locust/py.typed,sha256=gkWLl8yD4mIZnNYYAIRM8g9VarLvWmTAFeUfEbxJLBw,65
16
16
  locust/runners.py,sha256=Go8b8fpOAfFy6JuNcot7KyguHuExA6eoPHVmcgx3RoI,67813
17
17
  locust/shape.py,sha256=t-lwBS8LOjWcKXNL7j2U3zroIXJ1b0fazUwpRYQOKXw,1973
@@ -70,9 +70,9 @@ locust/webui/dist/report.html,sha256=sOdZZVgZbqgu86BBCSQf3uQUYXgmgSnXF32JpnyAII8
70
70
  locust/webui/dist/assets/favicon.ico,sha256=IUl-rYqfpHdV38e-s0bkmFIeLS-n3Ug0DQxk-h202hI,8348
71
71
  locust/webui/dist/assets/index-941b6e82.js,sha256=G3n5R81Svt0HzbWaV3AV20jLWGLr4X50UZ-Adu2KcxU,1645614
72
72
  locust/webui/dist/assets/logo.png,sha256=EIVPqr6wE_yqguHaqFHIsH0ZACLSrvNWyYO7PbyIj4w,19299
73
- locust-2.27.1.dev7.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
74
- locust-2.27.1.dev7.dist-info/METADATA,sha256=RnJ-aygcQwLlpQsZUwU2Qq24xSXls2irhORfqQ6Tjtc,7266
75
- locust-2.27.1.dev7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
76
- locust-2.27.1.dev7.dist-info/entry_points.txt,sha256=RAdt8Ku-56m7bFjmdj-MBhbF6h4NX7tVODR9QNnOg0E,44
77
- locust-2.27.1.dev7.dist-info/top_level.txt,sha256=XSsjgPA8Ggf9TqKVbkwSqZFuPlZ085X13M9orDycE20,7
78
- locust-2.27.1.dev7.dist-info/RECORD,,
73
+ locust-2.27.1.dev12.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
74
+ locust-2.27.1.dev12.dist-info/METADATA,sha256=ZvElRnyCJOLhjqaI3iCzRQf5d3ap45u11yVozFvBHoQ,7267
75
+ locust-2.27.1.dev12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
76
+ locust-2.27.1.dev12.dist-info/entry_points.txt,sha256=RAdt8Ku-56m7bFjmdj-MBhbF6h4NX7tVODR9QNnOg0E,44
77
+ locust-2.27.1.dev12.dist-info/top_level.txt,sha256=XSsjgPA8Ggf9TqKVbkwSqZFuPlZ085X13M9orDycE20,7
78
+ locust-2.27.1.dev12.dist-info/RECORD,,