You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pyinvoke has several serious issues. First and foremost, it is very
unsafe to pass any string arguments to `run()`, because it does not
verify the string arguments at all. Given this function in `tasks.py`:
```python
@task
def hello(c, name="user"):
run(f"echo {name}")
```
you can get quite interesting results:
```sh
❯ invoke hello
user
❯ invoke hello --name="; date"
Sat Oct 18 11:41:56 CEST 2025
```
This is an issue number 2 in pyinvoke and I can't see it closed in any
foreseeable future:
pyinvoke/invoke#2
Additionally, running linters from `invoke.run()` disables any colors
from the linters which makes it less comfortable to use and caused us to
force colors in some targets:
6111059
Even with that change, I have to pass additional `-c` any time I would
like to run linters with colored output.
Considering these main issues, I have considered different alternatives
to pyinvoke with one of them being `tox`:
#106
However, `tox` seems to be somewhat of an overkill for such a simple
task, and also packaging was done via `invoke` as well. Therefore I've
decided to pick `make` as an alternative.
This commit replaces `tasks.py` with a corresponding `Makefile`, removes
`invoke` from `dev` dependencies (additionally removing `click` that was
mentioned there explicitly for some reason) and replaces all the calls
for `invoke` with calls for `make`.
Signed-off-by: Mikhail Koviazin <[email protected]>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,18 +95,18 @@ Here's how to get started with your code contribution:
95
95
b. source .venv/bin/activate
96
96
c. pip install --group dev
97
97
98
-
4. If you need a development environment, run `invoke devenv`. Note: this relies on docker compose to build environments, and assumes that you have a version supporting [docker profiles](https://docs.docker.com/compose/profiles/).
99
-
5. While developing, make sure the tests pass by running `invoke tests`
98
+
4. If you need a development environment, run `make devenv`. Note: this relies on docker compose to build environments, and assumes that you have a version supporting [docker profiles](https://docs.docker.com/compose/profiles/).
99
+
5. While developing, make sure the tests pass by running `make tests`
100
100
6. If you like the change and think the project could use it, send a
101
101
pull request
102
102
103
-
To see what else is part of the automation, run `invoke -l`
103
+
To see what else is part of the automation, run `make help`
104
104
105
105
## The Development Environment
106
106
107
-
Running `invoke devenv` starts all of the dockers used by this
107
+
Running `make devenv` starts all of the dockers used by this
108
108
project, and leaves them running. These can be easily cleaned up with
109
-
`invoke clean`. NOTE: it is assumed that the user running these tests,
109
+
`make clean`. NOTE: it is assumed that the user running these tests,
0 commit comments