|
| 1 | +--- |
| 2 | +layout: reports |
| 3 | +title: "August 2021" |
| 4 | +--- |
| 5 | + |
| 6 | +## Weeknotes: Friday 6th August, 2021. |
| 7 | + |
| 8 | +#### HTTPCore |
| 9 | + |
| 10 | +I've been putting more work into the [revised version of `httpcore`][0]. |
| 11 | + |
| 12 | +The repository now includes a simple README which is starting to outline how the interface looks... |
| 13 | + |
| 14 | +```python |
| 15 | +import httpcore |
| 16 | + |
| 17 | +response = httpcore.request("GET", "https://www.example.com/") |
| 18 | + |
| 19 | +print(response) |
| 20 | +# <Response [200]> |
| 21 | +print(response.status) |
| 22 | +# 200 |
| 23 | +print(response.headers) |
| 24 | +# [(b'Accept-Ranges', b'bytes'), (b'Age', b'557328'), (b'Cache-Control', b'max-age=604800'), ...] |
| 25 | +print(response.content) |
| 26 | +# b'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>\n\n<meta charset="utf-8"/>\n ...' |
| 27 | +``` |
| 28 | + |
| 29 | +I've also [opened an issue][1] which sketches out my plans for the documentation and API. |
| 30 | + |
| 31 | +What I'm particularly excited about here is the way that the design will allow you to drop into the network stack at various layers. I think the fundamentals of the design are going to make it much easier for developers to properly dig into and understand how the connection pooling works, and what's happening at each layer. |
| 32 | + |
| 33 | +For example: |
| 34 | + |
| 35 | +* Being able to examine the connections within the connection pool, and see what state each of them are in. |
| 36 | +* Being able to work directly with individual HTTP connections, and get a better understanding of the different states an HTTP connection can be in. |
| 37 | +* Being able to work directly at the network layer, or customise the network backend in order to perform logging, record/replay, network mocking, and other advanced functionality. |
| 38 | + |
| 39 | +#### HTTPX |
| 40 | + |
| 41 | +I've started drawing up a potential kickstarter to launch alongside the HTTPX 1.0 release. This has also helped me start to clarify what the roadmap for HTTPX ought to look like. |
| 42 | + |
| 43 | +* Issuing an HTTPX 1.0 release. I've outlined my thoughts on [final blockers to this][2]. |
| 44 | +* An HTTPX 1.1 release, alongside an updated HTTPCore. |
| 45 | +* An HTTPX 1.2 release, including an integrated command line client. |
| 46 | + |
| 47 | +#### Django REST framework |
| 48 | + |
| 49 | +I've made a tentative start on re-committing to a little more time on REST framework, by working through a couple of existing issues and discussions. |
| 50 | + |
| 51 | +Really the project could do with having 1-day-a-week of my time dedicated to it. |
| 52 | + |
| 53 | +I made the mistake this week of earmarking Friday for that work. In coming weeks I think it'd work better to have it be at the start of the week, since I think that'd help keep it prioritised. |
| 54 | + |
| 55 | +[0]: https://github.com/tomchristie/httpcore-the-directors-cut |
| 56 | +[1]: https://github.com/tomchristie/httpcore-the-directors-cut/issues/3 |
| 57 | +[2]: https://github.com/encode/httpx/issues/947#issuecomment-893576096 |
0 commit comments