Option to install without locust-cloud
Prerequisites
- [x] I am using the latest version of Locust
- [x] I am suggesting a new feature, not asking a question
Description
I see now pip install locust will also install locust-cloud as a dependency.
Could you please make it optional so that it's possible to install just locust without locust-cloud?
Also: do users really need setuptools as a dependency or was it added by accident?
The motivation for us is simply to have a smaller dependency tree and uv.lock file and for us locust is a (very) rarely used dev dependency. If it's difficult to achieve, not a big deal.
$ uv tree
...
locust v2.37.4 (group: dev)
│ ├── configargparse v1.7
│ ├── flask v3.1.1
│ │ ├── blinker v1.9.0
│ │ ├── click v8.2.1
│ │ ├── itsdangerous v2.2.0
│ │ ├── jinja2 v3.1.6 (*)
│ │ ├── markupsafe v3.0.2
│ │ └── werkzeug v3.1.3
│ │ └── markupsafe v3.0.2
│ ├── flask-cors v6.0.0
│ │ ├── flask v3.1.1 (*)
│ │ └── werkzeug v3.1.3 (*)
│ ├── flask-login v0.6.3
│ │ ├── flask v3.1.1 (*)
│ │ └── werkzeug v3.1.3 (*)
│ ├── gevent v24.11.1
│ │ ├── greenlet v3.2.2
│ │ ├── zope-event v5.0
│ │ │ └── setuptools v80.8.0
│ │ └── zope-interface v7.2
│ │ └── setuptools v80.8.0
│ ├── geventhttpclient v2.3.3
│ │ ├── brotli v1.1.0
│ │ ├── certifi v2025.4.26
│ │ ├── gevent v24.11.1 (*)
│ │ └── urllib3 v2.4.0
│ ├── locust-cloud v1.21.7
│ │ ├── configargparse v1.7
│ │ ├── gevent v24.11.1 (*)
│ │ ├── platformdirs v4.3.8
│ │ └── python-socketio[client] v5.13.0
│ │ ├── bidict v0.23.1
│ │ ├── python-engineio v4.12.1
│ │ │ └── simple-websocket v1.1.0
│ │ │ └── wsproto v1.2.0
│ │ │ └── h11 v0.16.0
│ │ ├── requests v2.32.3 (extra: client) (*)
│ │ └── websocket-client v1.8.0 (extra: client)
│ ├── msgpack v1.1.0
│ ├── psutil v7.0.0
│ ├── pyzmq v26.4.0
│ ├── requests v2.32.3 (*)
│ ├── setuptools v80.8.0
│ └── werkzeug v3.1.3 (*)
Unfortunately Python doesn't support opt-out dependencies, only extras. It was discussed a little bit in PR 3097
As for setuptools, it was introduced when we switched to uv, do you remember the reason @mquinnfd ? Do you think it would be possible to move it to dev-dependencies?
Sorry just saw this
AFAIK it should be fine to move setuptools to dev dependencies
I believe this was because Hatch VCS (used for dynamic versioning) uses setuptools-scm under the hood, in this case, it's not used in the prod build as far as I can tell
From the above dep tree, it will be pulled in by gevent anyway
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 20 days.
Unfortunately Python doesn't support opt-out dependencies, only extras. It was discussed a little bit in PR 3097
The reasons given in PR #3097 are completely unreasonable (of course you want Locust Cloud installed everywhere... it's your company). locust-cloud should absolutely be an extra (optional dependency) that is only installed if explicitly requested. Personally, I feel like it shouldn't be ANY type of dependency, but optional is slightly better.
I appreciate that the Locust Cloud package is open source, but you are forcing your personal business/platform onto users that may just want the Locust package. Locust was free and widely used long before Locust Cloud ever existed.
I mean... You're not wrong - the reason its installed by default is mainly for the benefit of the company (and I'm still convinced most users of Locust are better off with project having commercial backing, even though there may at times be some friction around what is included in the package and/or licensing)
Also, just to be clear, Locust Cloud / Locust Technologies Inc is not "my personal business", both Andrew and Jonatan are involved (Andrew hands-on, Jonatan mostly in an advisory capacity).
We might at some point be able to release locust in two "versions" (locust and maybe locust-ee), but I can't really commit to anything.
not "my personal business"
correction: yours and 2 others :)
I didn't mean for my comment to come off as rude or accusatory. I'm just a little wary of mixing commercial interests with open source ideals. I know it can often help a community, but it can also have negative effects.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 20 days.
This issue was closed because it has been marked stale for 20 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!