@@ -16,7 +16,7 @@ developing RDFLib code.
1616* You must supply tests for new code.
1717* RDFLib uses `Poetry <https://python-poetry.org/docs/master/ >`_ for dependency management and packaging.
1818
19- If you add a new cool feature, consider also adding an example in ``./examples ``
19+ If you add a new cool feature, consider also adding an example in ``./examples ``.
2020
2121Pull Requests Guidelines
2222------------------------
@@ -71,6 +71,50 @@ the users of this project.
7171Please note that while we would like all PRs to follow the guidelines given
7272here, we will not reject a PR just because it does not.
7373
74+ Guidelines for breaking changes
75+ -------------------------------
76+
77+ Breaking changes to RDFLib's public API should be made incrementally, with small
78+ pull requests to the main branch that change as few things as possible.
79+
80+ Breaking changes should be discussed first in an issue before work is started,
81+ as it is possible that the change is not necessary or that there is a better way
82+ to achieve the same goal, in which case the work on the PR would have been
83+ wasted. This will however not be strictly enforced, and no PR will be rejected
84+ solely on the basis that it was not discussed upfront.
85+
86+ RDFLib follows `semantic versioning <https://semver.org/spec/v2.0.0.html >`_ and `trunk-based development
87+ <https://trunkbaseddevelopment.com/> `_, so if any breaking changes were
88+ introduced into the main branch since the last release, then the next release
89+ will be a major release with an incremented major version.
90+
91+ Releases of RDFLib will not as a rule be conditioned on specific features, so
92+ there may be new major releases that contain very few breaking changes, and
93+ there could be no minor or patch releases between two major releases.
94+
95+ Rationale
96+ ~~~~~~~~~
97+ RDFLib has been around for more than a decade, and in this time both Python and
98+ RDF have evolved. RDFLib's public API has also accumulated some problems over
99+ time.
100+
101+ There are more or less two ways to address the shortcomings of RDFLib's public
102+ API:
103+
104+ - Revolutionary: Create a new API from scratch and reimplement it, and when
105+ ready, release a new version of RDFLib with the new API.
106+ - Evolutionary: Incrementally improve the existing API with small changes and
107+ release any breaking changes that were made at regular intervals.
108+
109+ While the revolutionary approach seems appealing, it is also risky and
110+ time-consuming.
111+
112+ The evolutionary approach puts a lot of strain on the users of RDFLib as they
113+ have to adapt to breaking changes more often, but the shortcomings of the RDFLib
114+ public API also put a lot of strain on the users of RDFLib. On the other hand, a
115+ major advantage of the evolutionary approach is that it is simple and achievable
116+ from a maintenance and contributor perspective.
117+
74118.. _tests :
75119
76120Tests
0 commit comments