What is the problem or limitation you are having?
The BeeWare tutorial currently uses httpx in step 8, as we need to hit a HTTP API to retrieve JSON content using an async API.
Unfortunately, some recent events have led to questions around the maintenance of httpx; these events led to the emergence of a number of forks, including httpxyz and httpx2.
The maintainer of httpxyx blogged about the reasons for the fork; they followed up quickly with an endorsement of httpx2 as a "blessed" fork.
Describe the solution you'd like
The BeeWare tutorial should switch to using httpx2.
This is mostly a matter of replacing references to httpx with httpx2, as the two should be API compatible (although this should be verified).
There is one known discrepancy - on Android, truststore doesn't currently pick up the correct location for Android certificates (see sethmlarson/truststore#217). The current workaround is to add a verify=ssl.create_default_context() argument:
async with httpx2.AsyncClient(verify=ssl.create_default_context())
We don't need to modify the example code to accommodate this, as the tutorial doesn't suggest running on Android - but we should add a warning notifying people of the problem (referencing the upstream issue). The verify tag isn't needed on any other platform.
Describe alternatives you've considered
We could use a different fork, but httpx2 seems the best option at this point.
Additional context
No response
What is the problem or limitation you are having?
The BeeWare tutorial currently uses
httpxin step 8, as we need to hit a HTTP API to retrieve JSON content using an async API.Unfortunately, some recent events have led to questions around the maintenance of
httpx; these events led to the emergence of a number of forks, includinghttpxyzandhttpx2.The maintainer of
httpxyxblogged about the reasons for the fork; they followed up quickly with an endorsement ofhttpx2as a "blessed" fork.Describe the solution you'd like
The BeeWare tutorial should switch to using
httpx2.This is mostly a matter of replacing references to
httpxwithhttpx2, as the two should be API compatible (although this should be verified).There is one known discrepancy - on Android,
truststoredoesn't currently pick up the correct location for Android certificates (see sethmlarson/truststore#217). The current workaround is to add averify=ssl.create_default_context()argument:We don't need to modify the example code to accommodate this, as the tutorial doesn't suggest running on Android - but we should add a warning notifying people of the problem (referencing the upstream issue). The
verifytag isn't needed on any other platform.Describe alternatives you've considered
We could use a different fork, but
httpx2seems the best option at this point.Additional context
No response