-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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 flask.ext and create migration tool to flask_* #1135
Comments
A migration tool could be a simple lib2to3-based, but i am not sure if such a thing is necessary. This case seems to be an easy enough task for simple search-and-replace or regexes. |
Some introductory information for new contributors:
|
I'd like to try to tackle this. Just to get some clarification, the proposed migration tool would essentially search old sourcecode and replace instances of |
Yes. It would have to cover these imports (unless I missed anything):
|
And the aforementioned imports would be replaced with what? |
flask.ext.foo => flask_foo |
Exactly what ThiefMaster said. Thanks for giving this a try!
|
If you can actually evaluate the import, you could try to figure out the actual package name, rather than guessing that it's |
True, but then you'd be dependent on whether the migration script is running in the correct virtualenv, and things like that. Also I don't think anybody actually uses |
flask.ext Import Migration Tool #1135
Let's correct every answer on http://stackoverflow.com/search?q=flask.ext, and encourage users to use There are many Flask extentions whose documentation contains |
@lepture that's certainly ambitious, I think it would be nice to resolve #1367 and #1366 before doing something like that. The current documentation still suggests using the That said, I've fixed it a couple times when I happen to be using extensions and notice they had the old format in their examples. |
@keyanp in the meanwhile, we should notify Flask extention developers. Their documentations would also confuse users. |
@lepture sure, we can certainly try to let some developers know, alerting all extension developers is probably unrealistic. |
@keyanp that's what I am doing. I will do a search on these projects, find out who should be notified. |
Add description for the api specs flask.ext.xx is deprecated. need to use flask_xx instead pallets/flask#1135 Change-Id: I9960dd44d03243bde73df8633c45ec3a1f437cea Signed-off-by: Akhil Batra <[email protected]>
The `flask.ext` syntax has been deprecated in favour of the `flask_` syntax pallets/flask#1135
Importing flask extensions using flask.ext.* is deprecated in favor of flask_* For background, see: pallets/flask#1135
Nowadays one should import flask extensions with flask_<extension_name> instead of flask.ext.<extension_name>. pallets/flask#1135
Nowadays one should import flask extensions with flask_<extension_name> instead of flask.ext.<extension_name>. pallets/flask#1135
No description provided.
The text was updated successfully, but these errors were encountered: