-
-
Notifications
You must be signed in to change notification settings - Fork 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
Yarl in reverse urls #1288
Yarl in reverse urls #1288
Conversation
@@ -296,7 +264,11 @@ def get_info(self): | |||
return {'path': self._path} | |||
|
|||
def url(self, *, query=None): | |||
return self._append_query(self._path, query) | |||
super().url() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning here will suggest to use url_for
, but url_for
doesn't accepts query
parameter. So deprecation message should be a bit different or it will cause confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url_for
returns URL
, not str
.
But functionally it's a replacement for deprecated API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I see that. I mean that simple replace url(...)
with url_for
as message says wouldn't be enough for upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a user will go to documentation chapter about url_for
and will figure out how to use new API properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's hope for that (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the documentation for Nevermind, found iturl_for
?
Current coverage is 98.41% (diff: 100%)@@ master #1288 diff @@
==========================================
Files 29 29
Lines 6520 6503 -17
Methods 0 0
Messages 0 0
Branches 1089 1094 +5
==========================================
- Hits 6422 6400 -22
- Misses 47 52 +5
Partials 51 51
|
No description provided.