Skip to content
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

Version 1.0, working notes. #1092

Closed
7 of 11 tasks
tomchristie opened this issue Jul 27, 2020 · 7 comments
Closed
7 of 11 tasks

Version 1.0, working notes. #1092

tomchristie opened this issue Jul 27, 2020 · 7 comments
Milestone

Comments

@tomchristie
Copy link
Member

tomchristie commented Jul 27, 2020

Here are my current working notes on our remaining 1.0 items...

HTTPX 1.0

Minor:

Not strictly required, but worth looking at:


API Reference

Here's a high-level API reference...

Helper functions

request, stream, get, options, head, post, put, patch, delete

Clients

Client, AsyncClient

Models

Response, Request, URL, QueryParams, Headers, Cookies

Configuration

Limits, Proxy, Timeout

Authentication

Auth, BasicAuth, DigestAuth

Transports

ASGITransport, WSGITransport

Status Codes

codes

Exceptions

  • RequestError All exceptions that can occur during a .request()
    • TransportError These all have counterparts in httpcore
      • TimeoutException
        • ConnectTimeout
        • ReadTimeout
        • WriteTimeout
        • PoolTimeout
      • NetworkError
        • ConnectError
        • ReadError
        • WriteError
        • CloseError
      • ProxyError
      • ProtocolError
    • DecodingError
      • ContentDecodingError
      • TextDecodingError
    • TooManyRedirects
    • RequestBodyUnavailable
    • InvalidURL
  • HTTPStatusError - Occurs during .raise_for_status
  • NotRedirectResponse - Occurs if calling .next() without properly checking .is_redirect_response
  • CookieConflict - Can occur with response.cookies.get(...)
  • StreamError
    • StreamConsumed - Occurs if attempting to iterate over the stream twice
    • ResponseNotRead - Occurs if accessing .content without having .read() the stream
    • RequestNotRead - Occurs if accessing .content without having .read() the stream
    • ResponseClosed - Occurs if attempting to read the stream after response is already closed

Dependencies

Here's how our lovely & minimal core non-optional dependancies would look...
Depending on our assessment of #328 (comment)

  • httpcore
    • h11
    • sniffio
  • rfc3986
    • idna
  • certifi
@tomchristie tomchristie added this to the v1.0 milestone Jul 27, 2020
@tomchristie tomchristie changed the title Version 1.0, revisited. Version 1.0, working notes. Jul 27, 2020
@StephenBrown2
Copy link
Contributor

Gonna put in another request for built-in retries, though I understand if the answer is still "no" or "not for 1.0".

@florimondmanca
Copy link
Member

Went ahead and created #1102 to better track the "Drop HSTS" item - also updated the description here.

@tomchristie
Copy link
Member Author

@StephenBrown2 Fair question yup, seems to me that it's absolutely a 1.1 item. It's a great feature that we should look at, but I don't think there's any pressing need for it to block a release marked as 1.0, with the API stability that implies.

@tomchristie
Copy link
Member Author

@StephenBrown2 Want to open an issue for retries so we can start discussing the API, and finer details of the expected behaviours? Even tho it's not strictly a 1.0 blocker, perhaps it's feasible it might still land in time for that.

Useful initial points to discuss:

  • What API requests provides for retries. (I think you need to mount an adapter in order to get retry support right?)
  • What exact behaviour requests uses through urllib3, when enabled without providing any finer-tuning details?
  • What fine tuning options does urlilb3 offer in it's Retry config class?

@florimondmanca
Copy link
Member

florimondmanca commented Jul 31, 2020

Also I think there’s lots of useful context and ideas already starting from #784 :-)

No adapter required - the idea was to loop around send_single_request() (I think?) in case of connection failures. The PR stopped at handling network errors only (so no retries on HTTP status errors or stuff like that) and I think there was a rationale behind that, but don’t have the exact thing off the top of my mind.

@StephenBrown2
Copy link
Contributor

StephenBrown2 commented Jul 31, 2020

The original issue is #108 (gosh, over 900 Issues/PRs ago). I can try to summarize in a bit, but @florimondmanca is right, the interface is just a parameter to the client or requester, similar to the Timeout we've got now. However, #778 had a good idea with a retry_flow method to overwrite, similar to the auth_flow method httpx also has now.

@tomchristie
Copy link
Member Author

Closing this one off, since I think everything we need to track is appropriately milestoned now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants