Cover PEP 420 namespace packages in "Creating and discovering plugins" guide
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với phần “Using namespace packages” trong hướng dẫn Creating and discovering plugins, sau đó so sánh ví dụ của phần này với PEP 420 và packaging namespace-packages guide. Làm rõ liệu các hướng dẫn hiện tại mô tả native hay pkg-style namespaces, đồng thời ghi lại một ví dụ native namespace tối thiểu và chính xác nếu phù hợp. Được xem là hoàn tất khi hướng dẫn không còn mâu thuẫn với PEP 420 và giải thích trường hợp không có plugin.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Using namespace packages is not explicit whether it talks about native PEP 420 namespace packages, or pkg-style namespace packages.
I tried to apply it for PEP 420 namespace packages and stumbled over two issues:
First, the given example doesn't wrap import myapp.plugin in try/except, but actually ModuleNotFoundError should be handled because, as a core package maintainer, you can't know how many plugins will be installed at runtime. In case of zero plugins installed, how would you guarantee a myapp.plugins namespace will exists anyways? At least setuptools won't let you install empty directories.
Second, the guide says
include the namespace-package style init.py in the namespace sub-package directory
But PEP 420 explicitly requires the absence of __init__.py files. Then, what is a namespace-package style __init__.py in the context of PEP 420? I believe @theacodes had pkg-style namespace packages in mind when adding that sentence with #296.
Could we make it either more clear the guide is not 1:1 applicable for native namespace packages, or even better, find a suggested minimal working PEP 420 example and adapt the guide accordingly?
- Ngôn ngữ chính
- Python
- Star
- 1.7k
- Fork
- 1.7k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pypa/packaging.python.org
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pypa/packaging.python.org#1960 · 4 bình luận ·
-
component: specifications good first issue type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pypa/packaging.python.org#1226 · 3 bình luận · 1 reaction ·
-
`test` vs. `tests` Đang mởcomponent: guides component: tutorials type: enhancement type: task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
pypa/packaging.python.org#1165 · 5 bình luận ·
-
type: task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pypa/packaging.python.org#792 · 2 bình luận · 1 reaction ·
-
good first issue help wanted type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pypa/packaging.python.org#463 · 5 bình luận ·
Tất cả issue của pypa/packaging.python.org
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·