-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean up core.py & __init__.py #1328
Comments
I think it's a good idea!
It's still used by
Yes, I think that's a good idea. I think we should still have those modules under a common
If we do such change, we should start with single commit that just moves
👍
I think we should keep at least |
cool, I'll get started! soon-ish anyway...
I dont quite agree on this. I think we should export all or none of the wait time functions from locust package. I'd prefer removing them (as things like editor auto completion would be much improved), but if I can't remove all of them then I think we should keep them all :) |
Hm, why is that the case?
I'm fine with keeping all of them (maybe that's even better). Our API is fairly small so I don't think the |
Hm, regarding the package/module structure I suggested.
At first I thought it would be strange to have the |
Also, can we nuke the old wait api? and its tests in test_old_wait_api.py... |
Ah.
I think having import shortcuts for a few very common functions/classes is an acceptable exception :). There's also the "Although practicality beats purity." 😉 Also, Flask does the same . Doesn't mean it's right, but at least it's such a hugely popular project, so many people will at least recognize it from there.
Yes 👍 |
"The good thing about standards is that there are so many to choose from" ;) Ok, but flask recommends users to import from the top level. Maybe we should too? I dislike the current way of providing a "shortcut" but documenting/recommending the "complex" version :) |
Hmm. Github didnt link this in #1329 |
Hmm. Moving stuff should probably wait for #1314 to be merged, and because it doesnt change anything in the public API it could be done at a later time. So I'll remove the 1.0 milestone from this. |
haha :)
Sounds good! I think we actually do import them from the top level in most of the examples in the docs, but we should make sure that we're consistent. |
) Stop exposing exceptions on locust module, remove old wait api (step 1 of fixing #1328)
core.py is big and messy. I think we should:
We can still export them in
__init__.py
, to keep the external interface unchanged.Some things should probably be removed from
__init__.py
though:from .exception import InterruptTaskSet, ResponseError, RescheduleTaskImmediately
and
from .wait_time import between, constant, constant_pacing
(the documentation instructs the user to get them from locust.wait_time module anyway...)If it lgty @heyman I can make a PR for this.
The text was updated successfully, but these errors were encountered: