Open
Description
Hi 👋 I'm attempting to componentize a Python app which has anyio
as a transitive dependency, but it seems that anyio
imports ssl
and the ssl
module isn't present. As a simple repro, if I try to change the import asyncio
to import anyio
in the http
example I see this:
❯ uv venv && uv pip install anyio
Using CPython 3.13.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
Resolved 3 packages in 1ms
Installed 3 packages in 6ms
+ anyio==4.8.0
+ idna==3.10
+ sniffio==1.3.1
❮ uvx componentize-py -d ../../wit -w wasi:http/[email protected] componentize app -o http.wasm -p . -p .venv/lib/python3.13/site-packages
Traceback (most recent call last):
File "/home/ben/.cache/uv/archive-v0/7RckABgkkjmDH-UjGQyxC/bin/componentize-py", line 12, in <module>
sys.exit(script())
~~~~~~^^
AssertionError: Traceback (most recent call last):
File "/0/app.py", line 8, in <module>
import anyio
File "/1/anyio/__init__.py", line 26, in <module>
from ._core._sockets import connect_tcp as connect_tcp
File "/1/anyio/_core/_sockets.py", line 6, in <module>
import ssl
File "/python/ssl.py", line 100, in <module>
import _ssl # if we can't import it, let the error propagate
^^^^^^^^^^^
ModuleNotFoundError: No module named '_ssl'
Caused by:
ModuleNotFoundError: No module named '_ssl'
I feel like I'm probably doing something wrong since I couldn't find anything on the issue board about this and it feels like it would have come up already 🤔
Metadata
Metadata
Assignees
Labels
No labels