Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixed required warning function
  • Loading branch information
Lincoln-developer committed Nov 11, 2024
commit d077a584de16c84e2a296ff18ff8a70b5d739ab2
2 changes: 1 addition & 1 deletion developer-workflow/cpython-deprecation-workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Deprecation implementation

Once approved:

* **Raise a Warning**: Use :func:`warnings.warn` with :exc:`DeprecationWarning` for typical cases.
* **Raise a Warning**: Use ``warnings._deprecated`` with :exc:`DeprecationWarning` for typical cases.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this preferred over the documented and more common warnings.warn (over 3x in the stdlib)?

If the feature is in its early deprecation phase:

* Use :exc:`PendingDeprecationWarning` initially, which transitions to :exc:`DeprecationWarning` after a suitable period.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We rarely use PendingDeprecationWarning, I think we can drop it?

Expand Down