recipes icon indicating copy to clipboard operation
recipes copied to clipboard

Package `httpx`?

Open jtpio opened this issue 1 year ago • 6 comments

httpx is noarch on conda-forge: https://anaconda.org/conda-forge/httpx

But it looks like it might need some patching either upstream in https://github.com/encode/httpx or here as a recipe:

Running:

import httpx

Gives:

ModuleNotFoundError: No module named '_ssl'

image

For reference httpx can also be installed with Pyodide, but raising an error at runtime: (https://github.com/pyodide/pyodide/issues/4730#issuecomment-2155095492 may be relevant)

ConnectError: [Errno 23] Host is unreachable

image

jtpio avatar Jul 15 '24 13:07 jtpio

Also linking to https://github.com/pyodide/pyodide/pull/4549 which includes a patch for httpx.

jtpio avatar Jul 15 '24 13:07 jtpio

The ssl issue seems to be related to https://github.com/jupyterlite/xeus-python-demo/issues/32.

jtpio avatar Jul 15 '24 13:07 jtpio

for the missing ssl I think we just need to port https://github.com/pyodide/pyodide/blob/main/packages/ssl/meta.yaml which should be not that hard (famous last words... https://github.com/emscripten-forge/recipes/pull/1223)

DerThorsten avatar Jul 16 '24 12:07 DerThorsten

See also: https://github.com/pyodide/pyodide/discussions/4999

agriyakhetarpal avatar Aug 10 '24 11:08 agriyakhetarpal

Looks like httpx was finally added to Pyodide: https://github.com/pyodide/pyodide/pull/5302

jtpio avatar Feb 08 '25 12:02 jtpio

@jtpio for the 3.1.73 branch we should be able to add httpx easy since there we re-added python ssh back

DerThorsten avatar Feb 10 '25 07:02 DerThorsten

It looks like httpx can now be installed and imported, but it fails at runtime just like in pyodide with:

ConnectError: [Errno 23] Host is unreachable

Probably because of the use of sockets?

davidbrochart avatar May 26 '25 10:05 davidbrochart