Add content on deprecating functionality

オープン
#33 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
documentation

調査の方向性

07_packaging.qmd の Module 7 を開き、132 行付近にある既存の「Breaking changes」セクションを読んでください。warning の種類と stacklevel、deprecation のタイムライン、コミュニケーションの実践、コード例および実世界の例を扱う、焦点を絞ったセクションを追加してください。モジュールがこれらの戦略を明確に説明し、周囲のコース内容に適合していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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 warnings module
  • Proper stacklevel usage
  • 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)

主要言語
Jupyter Notebook
スター
8
フォーク
1
平均マージ
4分
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DHI/python-package-development のほかの issue

DHI/python-package-development の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。