anyio support
还没有人认领这个 Issue。
评估
调研方向
首先,使用所示的 componentize 命令在 http 示例的 app.py 中重现该故障,然后检查 componentize-py 如何打包 ssl 等 Python 标准库模块。当该示例能够在组件化过程中导入 anyio,且不会因 _ssl 引发 ModuleNotFoundError 时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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 🤔
- 主要语言
- Rust
- 星标
- 284
- 派生
- 56
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bytecodealliance/componentize-py 的其他 Issue
-
难度 3/5 半天 新手友好度 40/100
bytecodealliance/componentize-py#259 · 1 条评论 ·
-
wasm32-wasip3 target uses WASI preview 2 bindings可能已有人在做 @Snowiiii 于 6 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 57/100
bytecodealliance/componentize-py#253 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
bytecodealliance/componentize-py#247 · 12 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
bytecodealliance/componentize-py#217 · 6 条评论 ·
查看 bytecodealliance/componentize-py 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
area: settings bug Haiku review: no-score ui
难度 2/5 1-3 小时 新手友好度 78/100
MMFoundation/WallpaperMachine#346 ·
维护者通常 1 天内回复
-
Make the HTTP server's keep-alive and headers timeouts configurable可能已有人在做 @mattgodbolt 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
compiler-explorer/compiler-explorer#9902 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
jonathanong/no-mistakes#5490 ·
-
follow-up
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复