-
Notifications
You must be signed in to change notification settings - Fork 220
Description
The most recent release, 4.5, has been reported as backwards incompatible by django-cms (#210) and wagtail (#211). I'd like to discuss the problem in this ticket and make decisions on actions and policies to define.
Quick background: treebeard is an OLD and stable project. As such, it's filled with warts and idiosyncrasies for an era that doesn't exist any more. It is also written for a version of Django that nobody uses today, and while for most new releases of Django, treebeard is either compatible or needs only minor tweaks (thanks to the dedication of Django's maintainers for backwards compatibility), the fact remains that Django is an evolving framework, and treebeard hasn't been evolving with it.
Now to have a certain sense of stability, Treebeard has a very comprehensive test suite (#200), and follows Semver for version changes. A backwards incompatible change is, for us, a change in the public API. The PR being discussed in this ticket, #192, didn't expose any breaking changes when I reviewed it, and in fact it added more tests. This is the reason why this release is not tagged as a major one, or it would have been version 5.0 As discussed in #30, stability of this library is paramount, an opinion shared both by @jrief who has been active maintaining this library for years, and me.
Now, despite our commitment to stability, and our caution and respect to Semver, two of treebeard's biggest users report upgrade pains and backwards incompatibilities. I consider this a failure in our process and our testing, and would like to get the involved parties into a discussion on how to prevent this from happening again.
First, about the problem with migrations added (#211), I'd like to add potential migrations as a backwards incompatible change. For this, we need to add a test to make sure that the tables created in our tests don't change from version to version. Is there a library that does this so we can just use it? As a side note, what triggered this problem was adding a default value to MP_Node.depth. I removed it from the model in my local copy of current master, and all the tests pass, so I think this change can be reverted, unless somebody has a good reason not to? (pinging @johanneswilm and @obayemi for their input).
Second, about the deepcopy error (#210), I'm going to have to dig a bit more on this, but what occurs to me as a preventive measure is adding a quick sanity test run for projects of certain size that depend on treebeard's stability. Looking at pypi I see that we have maintainers from wagtail (@gasman), django-cms (@yakky) and django-oscar (@mvantellingen and @solarissmoke). If there is guidance on how to have a quick sanity test of developer branches of treebeard against these projects, it would help us fulfill our stability expectations.
Note that for both cases, I'm proposing setting policies and verifying them with running tests. The only way to know for sure the policies are not just words in a readme :)