[PATCH 07/10] Add support for Django REST Framework 3.7, 3.8

Stephen Finucane stephen at that.guru
Sat May 4 01:58:22 AEST 2019


On Fri, 2019-05-03 at 17:01 +1000, Daniel Axtens wrote:
> Daniel Axtens <dja at axtens.net> writes:
> 
> > Stephen Finucane <stephen at that.guru> writes:
> > 
> > > On Tue, 2019-04-30 at 16:03 +1000, Daniel Axtens wrote:
> > > > From: Stephen Finucane <stephen at that.guru>
> > > > 
> > > > No breaking changes that concern us here.
> > > > 
> > > > Signed-off-by: Stephen Finucane <stephen at that.guru>
> > > > Reviewed-by: Daniel Axtens <dja at axtens.net>
> > > > Signed-off-by: Daniel Axtens <dja at axtens.net>
> > > > (cherry picked from commit a27f36fb784867e434527b8e65064ae3bdb12c82)
> > > > Signed-off-by: Daniel Axtens <dja at axtens.net>
> > > 
> > > I'm conflicted on this. This introduces a change in requirements which
> > > is not something we should typically do on a stable branch. The only
> > > thing that could save us is that we don't *drop* support for something
> > > (I'd be a hard -1 if we did), but is there any reason we couldn't just
> > > cut a 2.2 release instead?
> > 
> > So:
> > 
> >  - Production systems may legitimately want to run with the most recent
> >    minor version of dependencies, because they often contain security
> >    fixes.
> > 
> >  - Production systems may also want to stick to stable versions of PW
> >    while running recent dependencies, especially since a 2.1->2.2
> >    upgrade will require a schema migration and downtime.
> > 
> >  - Therefore, stable versions of PW should support the most recent
> >    versions of our dependencies.
> > 
> > In this case, the only patch we _really_ need is the django-filters one,
> > as there's a change between 1.0 and 1.1 that we need support for. The
> > DRF changes just allow us to use tox and friends to test that we support
> > this usecase.
> > 
> > If you wanted, I'd be happy to only pick the changes to tox.ini and drop
> > the changes to requirements-* - then I can use tox to satisfy myself
> > that the OzLabs setup is likely to work but we don't change the default
> > versions.
> > 
> 
> I've adopted this approach (only change tox.ini), applied the patches,
> and tagged v2.1.2.

Yup, that's better. Thanks.

Stephen

> Regards,
> Daniel
> 
> > We also should cut 2.2 soon, if for no other reason than to get the db
> > speedups, but I don't think it provides a solution for this usecase.
> > 
> > Regards,
> > Daniel
> > 
> > > Stephen
> > > 
> > > > ---
> > > >  README.rst                                                  | 2 +-
> > > >  .../notes/django-rest-framework-3-7-bc6ad5df8bc54afc.yaml   | 6 ++++++
> > > >  .../notes/django-rest-framework-3-8-23865db833b4d188.yaml   | 6 ++++++
> > > >  requirements-dev.txt                                        | 2 +-
> > > >  requirements-prod.txt                                       | 2 +-
> > > >  tox.ini                                                     | 5 +++--
> > > >  6 files changed, 18 insertions(+), 5 deletions(-)
> > > >  create mode 100644 releasenotes/notes/django-rest-framework-3-7-bc6ad5df8bc54afc.yaml
> > > >  create mode 100644 releasenotes/notes/django-rest-framework-3-8-23865db833b4d188.yaml
> > > > 
> > > > diff --git a/README.rst b/README.rst
> > > > index 4a970ec5a9ff..ddc4b98125d1 100644
> > > > --- a/README.rst
> > > > +++ b/README.rst
> > > > @@ -45,7 +45,7 @@ Requirements
> > > >  
> > > >  - Django (1.8 - 1.11)
> > > >  
> > > > -- Django REST Framework (3.2 - 3.6)
> > > > +- Django REST Framework (3.4 - 3.8)
> > > >  
> > > >  - Django Filters (1.0)
> > > >  
> > > > diff --git a/releasenotes/notes/django-rest-framework-3-7-bc6ad5df8bc54afc.yaml b/releasenotes/notes/django-rest-framework-3-7-bc6ad5df8bc54afc.yaml
> > > > new file mode 100644
> > > > index 000000000000..4bf92c999df5
> > > > --- /dev/null
> > > > +++ b/releasenotes/notes/django-rest-framework-3-7-bc6ad5df8bc54afc.yaml
> > > > @@ -0,0 +1,6 @@
> > > > +---
> > > > +upgrade:
> > > > +  - |
> > > > +    `Django REST Framework 3.7
> > > > +    <http://www.django-rest-framework.org/topics/release-notes/#370/>`_ is now
> > > > +    supported.
> > > > diff --git a/releasenotes/notes/django-rest-framework-3-8-23865db833b4d188.yaml b/releasenotes/notes/django-rest-framework-3-8-23865db833b4d188.yaml
> > > > new file mode 100644
> > > > index 000000000000..dc2d2c8f8bfa
> > > > --- /dev/null
> > > > +++ b/releasenotes/notes/django-rest-framework-3-8-23865db833b4d188.yaml
> > > > @@ -0,0 +1,6 @@
> > > > +---
> > > > +upgrade:
> > > > +  - |
> > > > +    `Django REST Framework 3.8
> > > > +    <http://www.django-rest-framework.org/topics/release-notes/#380/>`_ is now
> > > > +    supported.
> > > > diff --git a/requirements-dev.txt b/requirements-dev.txt
> > > > index 7a8fdb9c8851..b12246dd1b89 100644
> > > > --- a/requirements-dev.txt
> > > > +++ b/requirements-dev.txt
> > > > @@ -1,4 +1,4 @@
> > > >  Django>=1.8,<2.0
> > > > -djangorestframework>=3.4,<3.7
> > > > +djangorestframework>=3.4,<3.9
> > > >  django-filter>=1.0,<1.1
> > > >  -r requirements-test.txt
> > > > diff --git a/requirements-prod.txt b/requirements-prod.txt
> > > > index d249ad84c10c..42ff8ecd82f1 100644
> > > > --- a/requirements-prod.txt
> > > > +++ b/requirements-prod.txt
> > > > @@ -1,5 +1,5 @@
> > > >  Django>=1.8,<2.0
> > > > -djangorestframework>=3.4,<3.7
> > > > +djangorestframework>=3.4,<3.9
> > > >  django-filter>=1.0,<1.1
> > > >  psycopg2>=2.7,<2.8
> > > >  sqlparse==0.2.4
> > > > diff --git a/tox.ini b/tox.ini
> > > > index 327b9e7c14a8..5c741d374a64 100644
> > > > --- a/tox.ini
> > > > +++ b/tox.ini
> > > > @@ -10,8 +10,9 @@ deps =
> > > >      django19: django>=1.9,<1.10
> > > >      django110: django>=1.10,<1.11
> > > >      django111: django>=1.11,<2.0
> > > > -    django{18,19,110}: djangorestframework>=3.4,<3.7
> > > > -    django111: djangorestframework>=3.6,<3.7
> > > > +    django{18,19}: djangorestframework>=3.4,<3.7
> > > > +    django110: djangorestframework>=3.4,<3.9
> > > > +    django111: djangorestframework>=3.6,<3.9
> > > >      django{18,19,110,111}: django-filter>=1.0,<1.1
> > > >  setenv =
> > > >      DJANGO_SETTINGS_MODULE = patchwork.settings.dev




More information about the Patchwork mailing list