You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
Activity