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

Commit8e95d75

Browse files
story645rcomer
andcommitted
document pending deprecation procedure
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
1 parentc01eb01 commit8e95d75

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

‎doc/devel/api_changes.rst

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,26 +62,32 @@ team. Generally API deprecation happens in two stages:
6262
* **expire:** API *is* changed as described in the introduction period
6363

6464
This ensures that users are notified before the change will take effect and thus
65-
prevents unexpected breaking of code.
65+
prevents unexpected breaking of code. Occasionally deprecations are marked as
66+
**pending**, which means that the deprecation will be introduced in a future release.
67+
Pending deprecations are noted in the documentation but do not raise a warning to the
68+
user.
6669

6770
Rules
6871
^^^^^
69-
- Deprecations are targeted at the next:ref:`meso release<pr-milestones>` (e.g. 3.x)
72+
- Deprecations are targeted at the next:ref:`meso release<pr-milestones>` (e.g. 3.Y)
7073
- Deprecated API is generally removed (expired) two point-releases after introduction
7174
of the deprecation. Longer deprecations can be imposed by core developers on
7275
a case-by-case basis to give more time for the transition
7376
- The old API must remain fully functional during the deprecation period
7477
- If alternatives to the deprecated API exist, they should be available
7578
during the deprecation period
79+
- If the deprecation is introduced as part of implementing an alternative, then it
80+
should be marked pending.
7681
- If in doubt, decisions about API changes are finally made by the
7782
`API consistency lead<https://matplotlib.org/governance/people.html>`_ developer.
7883

84+
7985
.. _intro-deprecation:
8086

8187
Introduce deprecation
8288
^^^^^^^^^^^^^^^^^^^^^
8389

84-
#. Create:ref:`deprecation notice<api_whats_new>`
90+
#. Createa:ref:`deprecation notice<api_whats_new>`
8591

8692
#. If possible, issue a `~matplotlib.MatplotlibDeprecationWarning` when the
8793
deprecated API is used. There are a number of helper tools for this:
@@ -118,7 +124,7 @@ Introduce deprecation
118124
Expire deprecation
119125
^^^^^^^^^^^^^^^^^^
120126

121-
#. Create:ref:`deprecation announcement<api_whats_new>`. For the content,
127+
#. Createa:ref:`deprecation announcement<api_whats_new>`. For the content,
122128
you can usually copy the deprecation notice and adapt it slightly.
123129

124130
#. Change the code functionality and remove any related deprecation warnings.
@@ -137,6 +143,30 @@ Expire deprecation
137143
instead. For removed items that were not in the stub file, only deleting from the
138144
allowlist is required.
139145

146+
.. _pending-deprecation:
147+
148+
Pending deprecations
149+
^^^^^^^^^^^^^^^^^^^^
150+
151+
If the deprecation is introduced as part of implementing an alternative, then the
152+
deprecation is marked as pending and introduced one meso release after the feature.
153+
154+
For example, if the feature is released in 3.Y, then code that should be deprecated
155+
because of the feature is marked with the appropriate deprecation decorator and
156+
the following settings:
157+
* the *pending* parameter is set to ``True``
158+
* the *removal* parameter is left blank
159+
160+
Once the version with the feature (e.g. 3.Y) has been released, the pending deprecation
161+
is introduced. The decorator should be updated such that:
162+
* *pending* is set to ``False``
163+
* *since* is set to the next meso release (3.Y+1)
164+
* *removal* is set to at least 2 versions after (3.Y+3) introduction.
165+
166+
Pending deprecations are documented in the:ref:`API change notes<api_whats_new>` in
167+
the same manner as introduced and expired deprecations. The notice should include
168+
*pending deprecation* in the title.
169+
140170

141171
..redirect-from::/devel/coding_guide#new-features-and-api-changes
142172

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp