Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #2392

Announcing django-compat-patcher 0.2

From Pascal Chambon <chambon.pascal@gmail.com>
Newsgroups comp.lang.python.announce
Subject Announcing django-compat-patcher 0.2
Date 2017-02-01 20:15 +0100
Message-ID <mailman.249.1486043198.2473.python-announce-list@python.org> (permalink)
References <589233D2.80804@gmail.com>

Show all headers | View raw


*** django-compat-patcher 0.2 has been released. ***

DCP is a “magic” package which adds backwards/forwards compatibility 
patches to Django, so that your app ecosystem doesn’t get broken by 
trivial changes made to the core of the framework.

It injects compatibility shims like function/attribute aliases, restores 
data structures which were replaced by stdlib ones, extends the 
behaviour of callables (eg. referring to a view by object, by name, or 
by dotted path), and can even preserve deprecated module as “import 
aliases” (ex. keep importing from “django.contrib.comments” instead of 
the now external “django_comments”).

This allows to you upgrade your dependencies one at a time, to 
fork/patch them when you have a proper opportunity, and most importantly 
to not get stuck, when deadlines are tight and your dependencies 
suddenly have conflicting requirements. DCP somehow relaxes the 
deprecation policy of Django, so that it comes closer to semantic 
versioning.

Technically, DCP manages a set of “fixers”, small utilities which 
advertise the change that they make, the versions of Django that they 
support, and which on monkey-patch the Django framework on demand. By 
applying these fixers in a proper order (sometimes before, sometimes 
after django.setup()), DCP can workaround multiple breaking changes 
which target the same part of the code (eg. a tag library being added 
and then removed).

Beware, DCP is aimed at project maintainers. If you are developing a 
reusable Django application, you can’t expect all your users to 
integrate DCP as well. In this case, to support a wide range of Django 
versions, you should rather use a toolkit like Django-compat 
<https://github.com/arteria/django-compat>. You may think of DCP as a 
“runtime 2to3 for Django’, wherease Django-Compat is rather a “six 
module for Django”.

Feel free to contribute new fixers, for backwards or forwards 
compatibility, depending on the compatibility troubles you encounter on 
your projects

https://pypi.python.org/pypi/django-compat-patcher
https://github.com/pakal/django-compat-patcher

Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread


Thread

Announcing django-compat-patcher 0.2 Pascal Chambon <chambon.pascal@gmail.com> - 2017-02-01 20:15 +0100

csiph-web