-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
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 |
docs/transition.rst
Outdated
@@ -63,7 +63,7 @@ suggesting alternatives even if they will stick around for a longer time. | |||
Do not use: | |||
|
|||
- `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.py
themake_action
method is related to the deprecated module. Should we drop the method, dropprofiler.py
or leave it?In eachSOLVED: 8098d03manage-X.py
in theexamples
folder,werkzeug.script
is imported (seemanage-coolmagic.py
for instance). We could replace it usingclick
and explaining whatclick
does 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: e722cb7click
module. Is this ok or should I useclick
instead?Waiting for your input 👌