Deprecate werkzeug.script#1090
Conversation
This commit deletes werkzeug/script.py, suggest using pallets/click instead of werkzeug.script for bigger applications and deletes script module from being loaded in werkzeug/__init__.py Signed-off-by: Antonio Ossa <aaossa@uc.cl>
As suggested in the corresponding issue, click is the recommended replacement #1079 (comment) Signed-off-by: Antonio Ossa <aaossa@uc.cl>
Signed-off-by: Antonio Ossa <aaossa@uc.cl>
I don't think it's very
Yes please, in this PR.
In either case please link to |
|
|
||
| - `werkzeug.script`, replace it with custom scripts written with | ||
| `argparse` or something similar. | ||
| `argparse`, pallets/click or something similar. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Every manage-<example>.py file used werkzeug.script a deprecated (and now definitely removed) module. The new cli are powered by click [1] [1]: https://github.com/pallets/click Signed-off-by: Antonio Ossa <aaossa@uc.cl>
This commit updates docs and comments to recommend `click` and display the `click` website ([1]) when possible [1]: http://click.pocoo.org Signed-off-by: Antonio Ossa <aaossa@uc.cl>
|
Travis says everything is ok 🙌 Can you please review this before merge @untitaker @ThiefMaster ? 😁 Thanks |
|
Yeah those examples are good. However, the Travis tests don't cover them at all. Did you get those running? Otherwise LGTM |
Some changes were made in `couchdb` and `werkzeug`. It's time to update our examples. Now they should work on Python 2. Signed-off-by: Antonio Ossa <aaossa@uc.cl>
|
@untitaker Almost all of them work, except for:
I just tried using Python 2 ( |
|
Thanks! The other stuff should be a separate PR. Ideally we'd have simple tests for each example like in Flask. |
This PR is directly related to #1079: "Fully deprecate werkzeug.script". These items must be solved before merge:
InSOLVED: Leave it 🙌werkzeug/contrib/profiler.pythemake_actionmethod is related to the deprecated module. Should we drop the method, dropprofiler.pyor leave it?In eachSOLVED: 8098d03manage-X.pyin theexamplesfolder,werkzeug.scriptis imported (seemanage-coolmagic.pyfor instance). We could replace it usingclickand explaining whatclickdoes inexamples/README. Should I add it in this PR or another?In docs and comments I've been using "pallets/click" to make reference to theSOLVED: e722cb7clickmodule. Is this ok or should I useclickinstead?Waiting for your input 👌