Skip to content

Commit 68553c8

Browse files
TomAugspurgerproost
authored andcommitted
Added version policy (pandas-dev#28415)
1 parent 3bc7017 commit 68553c8

File tree

3 files changed

+91
-4
lines changed

3 files changed

+91
-4
lines changed

doc/source/development/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ Development
1616
internals
1717
extending
1818
developer
19+
policies
1920
roadmap

doc/source/development/policies.rst

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.. _develop.policies:
2+
3+
********
4+
Policies
5+
********
6+
7+
.. _policies.version:
8+
9+
Version Policy
10+
~~~~~~~~~~~~~~
11+
12+
.. versionchanged:: 1.0.0
13+
14+
Pandas uses a loose variant of semantic versioning (`SemVer`_) to govern
15+
deprecations, API compatibility, and version numbering.
16+
17+
A pandas release number is made up of ``MAJOR.MINOR.PATCH``.
18+
19+
API breaking changes should only occur in **major** releases. Theses changes
20+
will be documented, with clear guidance on what is changing, why it's changing,
21+
and how to migrate existing code to the new behavior.
22+
23+
Whenever possible, a deprecation path will be provided rather than an outright
24+
breaking change.
25+
26+
Pandas will introduce deprecations in **minor** releases. These deprecations
27+
will preserve the existing behavior while emitting a warning that provide
28+
guidance on:
29+
30+
* How to achieve similar behavior if an alternative is available
31+
* The pandas version in which the deprecation will be enforced.
32+
33+
We will not introduce new deprecations in patch releases.
34+
35+
Deprecations will only be enforced in **major** releases. For example, if a
36+
behavior is deprecated in pandas 1.2.0, it will continue to work, with a
37+
warning, for all releases in the 1.x series. The behavior will change and the
38+
deprecation removed in the next next major release (2.0.0).
39+
40+
.. note::
41+
42+
Pandas will sometimes make *behavior changing* bug fixes, as part of
43+
minor or patch releases. Whether or not a change is a bug fix or an
44+
API-breaking change is a judgement call. We'll do our best, and we
45+
invite you to participate in development discussion on the issue
46+
tracker or mailing list.
47+
48+
These policies do not apply to features marked as **experimental** in the documentation.
49+
Pandas may change the behavior of experimental features at any time.
50+
51+
Python Support
52+
~~~~~~~~~~~~~~
53+
54+
Pandas will only drop support for specific Python versions (e.g. 3.5.x, 3.6.x) in
55+
pandas **major** releases.
56+
57+
.. _SemVer: https://semver.org

doc/source/whatsnew/v1.0.0.rst

+33-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,39 @@
33
What's new in 1.0.0 (??)
44
------------------------
55

6-
.. warning::
7-
8-
Starting with the 0.25.x series of releases, pandas only supports Python 3.5.3 and higher.
9-
See `Dropping Python 2.7 <https://pandas.pydata.org/pandas-docs/version/0.24/install.html#install-dropping-27>`_ for more details.
6+
New Deprecation Policy
7+
~~~~~~~~~~~~~~~~~~~~~~
8+
9+
Starting with Pandas 1.0.0, pandas will adopt a version of `SemVer`_.
10+
11+
Historically, pandas has used a "rolling" deprecation policy, with occasional
12+
outright breaking API changes. Where possible, we would deprecate the behavior
13+
we'd like to change, giving an option to adopt the new behavior (via a keyword
14+
or an alternative method), and issuing a warning for users of the old behavior.
15+
Sometimes, a deprecation was not possible, and we would make an outright API
16+
breaking change.
17+
18+
We'll continue to *introduce* deprecations in major and minor releases (e.g.
19+
1.0.0, 1.1.0, ...). Those deprecations will be *enforced* in the next major
20+
release.
21+
22+
Note that *behavior changes* and *API breaking changes* are not identical. API
23+
breaking changes will only be released in major versions. If we consider a
24+
behavior to be a bug, and fixing that bug induces a behavior change, we'll
25+
release that change in a minor release. This is a sometimes difficult judgment
26+
call that we'll do our best on.
27+
28+
This doesn't mean that pandas' pace of development will slow down. In the `2019
29+
Pandas User Survey`_, about 95% of the respondents said they considered pandas
30+
"stable enough". This indicates there's an appetite for new features, even if it
31+
comes at the cost of break API. The difference is that now API breaking changes
32+
will be accompanied with a bump in the major version number (e.g. pandas 1.5.1
33+
-> 2.0.0).
34+
35+
See :ref:`policies.version` for more.
36+
37+
.. _2019 Pandas User Survey: http://dev.pandas.io/pandas-blog/2019-pandas-user-survey.html
38+
.. _SemVer: https://semver.org
1039

1140
.. warning::
1241

0 commit comments

Comments
 (0)