Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add a guide to deprecating features#1469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Lincoln-developer wants to merge11 commits intopython:main
base:main
Choose a base branch
Loading
fromLincoln-developer:fix-issue-1419

Conversation

Lincoln-developer
Copy link
Contributor

@Lincoln-developerLincoln-developer commentedNov 8, 2024
edited by hugovk
Loading

This pull request introduces a new section in the Developer Guide to document the practical steps for deprecating features in CPython. It complements the policy guidelines outlined inPEP 387 by providing a detailed, actionable workflow for contributors


📚 Documentation preview 📚:https://cpython-devguide--1469.org.readthedocs.build/developer-workflow/cpython-deprecation-workflow/

Copy link
Member

@AA-TurnerAA-Turner left a comment

Choose a reason for hiding this comment

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

I think we can make a few improvements here specific to CPython.

A

P.S. Out of idle curiosity, did you use an LLM/GPT to help write this document? There's a couple of hallmarks I recognise, but it could just be a general style!

Comment on lines 25 to 39
* **Raise a Warning**: Use :func:`warnings.warn` with :exc:`DeprecationWarning` for typical cases.
If the feature is in its early deprecation phase:

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

Example:

.. code-block:: python

import warnings
warnings.warn(
"Feature X is deprecated and will be removed in Python 3.Y",
DeprecationWarning,
stacklevel=2
)
Copy link
Member

Choose a reason for hiding this comment

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

We should probably usewarnings._deprecated() instead here

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks let me work on this change

------------------------------------
Before proposing deprecation:

* **Assess Usage**: Use tools like GitHub search, ``grep``, or ``PyPI statistics`` to determine the extent and context of usage.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps you could add links here?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

okay sure, let me add them

@AA-TurnerAA-Turner changed the titlegh-1419: Added deprecation workflow for CPython.Add a guide to deprecating featuresNov 8, 2024
@AA-TurnerAA-Turner linked an issueNov 8, 2024 that may beclosed by this pull request
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@python-cla-bot
Copy link

python-cla-botbot commentedApr 18, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AA-TurnerAA-TurnerAwaiting requested review from AA-Turner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Document the workflow for deprecating something in CPython.
2 participants
@Lincoln-developer@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp