Skip to content
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

Remove task arguments #1370

Merged
merged 1 commit into from
May 12, 2020
Merged

Remove task arguments #1370

merged 1 commit into from
May 12, 2020

Conversation

heyman
Copy link
Member

@heyman heyman commented May 12, 2020

This PR removes args and kwargs arguments from the internal TaskSet.schedule_task and TaskSet.execute_task methods.

Passing arguments to tasks was an old legacy feature that was never documented, and never used internally (except in tests). I think removing this feature in the name of KISS makes sense, since the feature aren't used internally, even though the methods are internal.

This will however be a breaking change for people who have looked at the Locust source and chosen to use this feature.

…nd TaskSet.execute_task methods

Passing arguments to tasks was an old legacy feature that was never documented, and never used internally. Removing this feature in the name of KISS, since there is no way of supplying task arguments for tasks that are automatically picked anyway.
@heyman heyman requested a review from cyberw May 12, 2020 09:43
@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #1370 into master will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1370      +/-   ##
==========================================
- Coverage   80.83%   80.76%   -0.08%     
==========================================
  Files          26       26              
  Lines        2265     2261       -4     
  Branches      345      345              
==========================================
- Hits         1831     1826       -5     
- Misses        342      343       +1     
  Partials       92       92              
Impacted Files Coverage Δ
locust/user/task.py 96.55% <100.00%> (-0.77%) ⬇️
locust/runners.py 80.62% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd198ac...82c2d6a. Read the comment docs.

@cyberw
Copy link
Collaborator

cyberw commented May 12, 2020

LGTM. That code always looked strange to me :)

@heyman heyman merged commit cd08d0e into master May 12, 2020
@cyberw cyberw deleted the remove-task-arguments branch March 22, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants