NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #1221 most downloaded on PyPI
Developer-friendly load testing framework
Latest stable
2.47.0
Last release 5 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
1083 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
'Module' object is not callable \#1387
Fixed bugs:
Closed issues:
Merged pull requests:
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Check for low open files limit (ulimit) and try to automatically increase it from within the locust process.
Other various bug fixes as improvements
Add metadata for the locust PyPI package that marks the locustio package as obsolete \#1377 (heyman)
FastHttpUser doesn't use the SNI TLS extension \#1360
Fixed bugs:
Closed issues:
Merged pull requests:
This version contains some breaking changes.
We've renamed the Locust and HttpLocust classes to User and HttpUser. The locust attribute on TaskSet instances has been renamed to user.
The parameter for setting number of users has also been changed, from -c / --clients to -u / --users.
It's now possible to declare tasks directly under a User class like this:
class WebUser(User):
@task
def some_task(self):
pass
In tasks declared under a User class (e.g. some_task in the example above), self refers to the User instance, as one would expect. For tasks defined under a TaskSet class, self would refer to the TaskSet instance.
The task_set attribute on the User class (previously Locust class) has been removed. To declare a User class with a single TaskSet one would now use the tasks attribute instead:
class MyTaskSet(TaskSet):
...
class WebUser(User):
tasks = [MyTaskSet]
A new tag feature has been added that makes it possible to include/exclude tasks during a test run.
Tasks can be tagged using the @tag decorator:
class WebUser(User):
@task
@tag("tag1", "tag2")
def my_task(self):
...
And tasks can then be specified/excluded using the --tags/-T and --exclude-tags/-E command line arguments.
The following changes has been made to the configuration environment variables
LOCUST_MASTER has been renamed to LOCUST_MODE_MASTER (in order to make it less likely to get variable name collisions when running Locust in Kubernetes/K8s which automatically adds environment variables depending on service/pod names).
LOCUST_SLAVE has been renamed to LOCUST_MODE_WORKER.
LOCUST_MASTER_PORT has been renamed to LOCUST_MASTER_NODE_PORT.
LOCUST_MASTER_HOST has been renamed to LOCUST_MASTER_NODE_HOST.
CSVFILEBASE has been renamed to LOCUST_CSV.
See the configuration documentation for a full list of available environment variables.
The master/slave terminology has been changed to master/worker. Therefore the command line arguments --slave and --expect-slaves has been renamed to --worker and --expect-workers.
The option for running Locust without the Web UI has been renamed from --no-web to --headless.
Removed Locust.setup, Locust.teardown, TaskSet.setup and TaskSet.teardown hooks. If you want to run code at the start or end of a test, you should instead use the test_start and test_stop events:
from locust import events
@events.test_start.add_listener
def on_test_start(**kw):
print("test is starting")
@events.test_stop.add_listener
def on_test_start(**kw):
print("test is stopping")
TaskSequence and @seq_task has been replaced with SequentialTaskSet.
A User count column has been added to the history stats CSV file. The column order and column names has been changed.
The official docker image no longer uses a shell script with a bunch of special environment variables to configure how how locust is started. Instead, the locust command is now set as ENTRYPOINT of the docker image. See running-in-docker for more info.
Command line option --csv-base-name has been removed, since it was just an alias for --csv.
The way Locust handles logging has been changed. We no longer wrap stdout (and stderr) to automatically make print statements go into the log. print() statements now only goes to stdout. To add custom entries to the log, one should now use the Python logging module:
import logging
logging.info("custom logging message)
For more info see logging
It's now possible to protect the Web UI with Basic Auth using the --web-auth command line argument.
The Web UI can now be served over HTTPS by specifying a TLS certificate and key with the --tls-cert and --tls-key command line arguments.
If the number of users and hatch rate are specified on command line, it's now used to pre-populate the input fields in the Web UI.
Added --config command line option for specifying a configuration file path
The code base has been refactored to make it possible to run Locust as a python lib.
It's now possible to call response.failure() or response.success() multiple times when using the catch_response=True in the HTTP clients. Only the last call to success/failure will count.
The --help output has been improved by grouping related options together.
One column per quarter.