Add content on deprecating functionality
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả 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
Mở Module 7 trong 07_packaging.qmd và đọc phần “Breaking changes” hiện có quanh dòng 132. Thêm một phần tập trung trình bày các loại warning và stacklevel, timeline deprecation, các phương pháp truyền đạt, cùng các ví dụ về mã và thực tế. Được xem là hoàn thành khi module giải thích rõ ràng các chiến lược này và phù hợp với nội dung khóa học xung quanh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The course covers semantic versioning and breaking changes in Module 7, but lacks content on deprecation strategies - a critical skill for package maintainers.
Proposed Content
Add a section to Module 7 (07_packaging.qmd) covering:
1. Deprecation Warnings
- Using Python's
warningsmodule - Proper
stacklevelusage - DeprecationWarning vs FutureWarning:
DeprecationWarning: For developers (filtered by default, shown when running tests)FutureWarning: For end users (always visible, for changes affecting user code)
2. Deprecation Timeline
- Announce in version X.Y
- Remove in version (X+1).0
- Maintain for 1-2 minor releases minimum
3. Communication Strategy
- CHANGELOG updates
- Release notes
- Documentation migration guides
- Clear docstring warnings
4. Code Examples
import warnings
def old_function(x):
warnings.warn(
"old_function is deprecated and will be removed in version 2.0. "
"Use new_function instead.",
DeprecationWarning,
stacklevel=2
)
return new_function(x)
5. Real-World Examples
Reference deprecation practices from popular packages (pandas, numpy, scikit-learn).
Location
Module 7 - after the "Breaking changes" section (around line 132)
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 8
- Fork
- 1
- Merge trung bình
- 4 phút
- Pull request đã merge (30 ngày)
- 1
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 DHI/python-package-development
-
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 72/100
DHI/python-package-development#37 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
Tất cả issue của DHI/python-package-development
Issue tương tự
-
The correction-threshold rationale says 17 restraint cases collide; the current corpus has 16 Đang mởarea:dictation documentation P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
uttrflow/uttrflow-swift#1180 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
falcosecurity/falco-website#1601 ·
-
Improve privacy considerations Đang mởspecification
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
WICG/webmonetization#729 ·