-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
Tightening public API on models #1275
Comments
By
did you mean If so, what about Lines 123 to 136 in 4bd08be
|
What we really want here is...
And also related...
And...
We can handle that by adding if value is None or isinstance(value, (str, bytes)):
value = value.decode("ascii") if isinstance(value, bytes) else value
items = parse_qsl(value) There's probably also some thinking about if we'd like That'll give us a more precise API where |
I'm a bit confused with one small detail, I'm sorry for the question, but
for now it's a In the example your provided with, if value is None or isinstance(value, (str, bytes)):
value = value.decode("ascii") if isinstance(value, bytes) else value
items = parse_qsl(value) The question is: may be it's more convenient to treat ---- From my point of view it might mislead someone (but it's ok if it's a part of the internal API) -- how do |
To clear up one part of this... we should rename |
Note to self wrt. comma delimited headers: https://github.com/bnoordhuis/mozilla-central/blob/master/netwerk/protocol/http/nsHttpHeaderArray.h#L185-L187 |
In our lead up to 0.14 we went though the public API of
Client
in a huge amount of detail to make sure we had everything exactly right, and were only exposing exactly what we needed to the public API.Eg see issues #997, #1065, #1066
To a lesser extent we still need to make sure to do the same on everything in
_models.py
before we can hit 1.0.Here are a few items from having taken a glance over...
Request.prepare
should be private.Response
should not expose a public.decoder
property. Particularly given that we don't expose theDecoder
interface anywhere. Let's replace it with a private._get_content_decoder()
method.The text was updated successfully, but these errors were encountered: