[4/4] tox: Test all supported versions of DRF

Submitted by Stephen Finucane on April 4, 2017, 9:38 p.m.

Details

Message ID 20170404213820.13350-4-stephen@that.guru
State New
Headers show

Commit Message

Stephen Finucane April 4, 2017, 9:38 p.m.
We should validate against the various DRF versions that support the
Django versions we support.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Cc: Daniel Axtens <dja@axtens.net>
---
I'm not sure about this one: it's a _lot_ of extra testing that I'm not
so sure people will run. I wonder if it's even worth it? Perhaps Travis
could test using system packages in addition to pip?
---
 tox.ini | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

Comments

Daniel Axtens April 5, 2017, 4:29 a.m.
Hi Stephen,

Thanks for doing all of these - I will test them soon.

> I'm not sure about this one: it's a _lot_ of extra testing that I'm not
> so sure people will run. I wonder if it's even worth it? Perhaps Travis
> could test using system packages in addition to pip?

I have a partial patch in this direction - I suggest adding things like
py{27,35}-{xenial,jessie,etc} that install the versions known to be
available on those platforms.

Regards,
Daniel

> ---
>  tox.ini | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/tox.ini b/tox.ini
> index 8cf23f6..72ec5c9 100644
> --- a/tox.ini
> +++ b/tox.ini
> @@ -1,22 +1,27 @@
>  [tox]
>  minversion = 2.0
> -envlist = pep8,py{27,34}-django{16,17,18,19,110},py35-django{18,19,110}
> +envlist =
> +    pep8
> +    py{27,34}-django16-drf32
> +    py{27,34}-django17-drf{32,33}
> +    py{27,34,35}-django{18,19,110}-drf{34,35,36}
>  skipsdist = True
>  
>  [testenv]
>  deps =
>      -r{toxinidir}/requirements-test.txt
>      django16: django>=1.6,<1.7
> -    django16: djangorestframework>=3.2,<3.3
> -    django16: django-filter>=0.11,<0.12
>      django17: django>=1.7,<1.8
> -    django17: djangorestframework>=3.3,<3.4
> -    django17: django-filter>=0.11,<0.12
>      django18: django>=1.8,<1.9
>      django19: django>=1.9,<1.10
>      django110: django>=1.10,<1.11
> -    django{18,19,110}: djangorestframework>=3.5,<3.6
> -    django{18,19,110}: django-filter>=1.0,<1.1
> +    drf32: djangorestframework>=3.2,<3.3
> +    drf33: djangorestframework>=3.3,<3.4
> +    drf34: djangorestframework>=3.4,<3.5
> +    drf35: djangorestframework>=3.5,<3.6
> +    drf36: djangorestframework>=3.6,<3.7
> +    drf{32,33,34}: django-filter>=0.11,<0.12
> +    drf{35,36}: django-filter>=1.0,<1.1
>  setenv =
>      DJANGO_SETTINGS_MODULE = patchwork.settings.dev
>      PYTHONDONTWRITEBYTECODE = 1
> -- 
> 2.9.3
Stephen Finucane April 5, 2017, 9:47 a.m.
On Wed, 2017-04-05 at 14:29 +1000, Daniel Axtens wrote:
> Hi Stephen,
> 
> Thanks for doing all of these - I will test them soon.

No problem. Do note that there's an apparent issue with DRF 3.4 and
Django 1.10. It _should_ work, but it gives an odd warning. You can
probably ignore that particular combination given the age gap between
them.

> > I'm not sure about this one: it's a _lot_ of extra testing that I'm
> > not
> > so sure people will run. I wonder if it's even worth it? Perhaps
> > Travis
> > could test using system packages in addition to pip?
> 
> I have a partial patch in this direction - I suggest adding things
> like
> py{27,35}-{xenial,jessie,etc} that install the versions known to be
> available on those platforms.

Do be aware that those packages frequently carry backports from newer
versions and might be different to the version found in pip. Testing
with _actual_ system packages would be a far better indicator.

Also - I ran these tests last night and it took over an hour. That's a
bit long for anything non-automated, I think. Must find a better way.

Cheers,
Stephen
Daniel Axtens April 5, 2017, 9:04 p.m.
Stephen Finucane <stephen@that.guru> writes:

> On Wed, 2017-04-05 at 14:29 +1000, Daniel Axtens wrote:
>> Hi Stephen,
>> 
>> Thanks for doing all of these - I will test them soon.
>
> No problem. Do note that there's an apparent issue with DRF 3.4 and
> Django 1.10. It _should_ work, but it gives an odd warning. You can
> probably ignore that particular combination given the age gap between
> them.
>
>> > I'm not sure about this one: it's a _lot_ of extra testing that I'm
>> > not
>> > so sure people will run. I wonder if it's even worth it? Perhaps
>> > Travis
>> > could test using system packages in addition to pip?
>> 
>> I have a partial patch in this direction - I suggest adding things
>> like
>> py{27,35}-{xenial,jessie,etc} that install the versions known to be
>> available on those platforms.
>
> Do be aware that those packages frequently carry backports from newer
> versions and might be different to the version found in pip. Testing
> with _actual_ system packages would be a far better indicator.
>
> Also - I ran these tests last night and it took over an hour. That's a
> bit long for anything non-automated, I think. Must find a better way.

OK - I have been building docker files for production deployment*: they use
the system packages. I will rework those and send them.

Note that I haven't been able to find a system package for
drf-nested-routers. Perhaps we could 'vendor' that?

Regards,
Daniel

* see patchwork.dja.id.au
>
> Cheers,
> Stephen
Stephen Finucane April 5, 2017, 11:02 p.m.
On Thu, 2017-04-06 at 07:04 +1000, Daniel Axtens wrote:
> Stephen Finucane <stephen@that.guru> writes:
> 
> > On Wed, 2017-04-05 at 14:29 +1000, Daniel Axtens wrote:
> > > Hi Stephen,
> > > 
> > > Thanks for doing all of these - I will test them soon.
> > 
> > No problem. Do note that there's an apparent issue with DRF 3.4 and
> > Django 1.10. It _should_ work, but it gives an odd warning. You can
> > probably ignore that particular combination given the age gap
> > between
> > them.
> > 
> > > > I'm not sure about this one: it's a _lot_ of extra testing that
> > > > I'm
> > > > not
> > > > so sure people will run. I wonder if it's even worth it?
> > > > Perhaps
> > > > Travis
> > > > could test using system packages in addition to pip?
> > > 
> > > I have a partial patch in this direction - I suggest adding
> > > things
> > > like
> > > py{27,35}-{xenial,jessie,etc} that install the versions known to
> > > be
> > > available on those platforms.
> > 
> > Do be aware that those packages frequently carry backports from
> > newer
> > versions and might be different to the version found in pip.
> > Testing
> > with _actual_ system packages would be a far better indicator.
> > 
> > Also - I ran these tests last night and it took over an hour.
> > That's a
> > bit long for anything non-automated, I think. Must find a better
> > way.
> 
> OK - I have been building docker files for production deployment*:
> they use
> the system packages. I will rework those and send them.

Sounds like a plan. I'm not sure if this should be in the Patchwork
project or maintained separately though?

> Note that I haven't been able to find a system package for
> drf-nested-routers. Perhaps we could 'vendor' that?

This dependency isn't needed any more - what made you think it was?

Stephen

> 
> Regards,
> Daniel
> 
> * see patchwork.dja.id.au

PS: Very nice :)

> > 
> > Cheers,
> > Stephen
Daniel Axtens April 6, 2017, 1:47 a.m.
>> OK - I have been building docker files for production deployment*:
>> they use
>> the system packages. I will rework those and send them.
>
> Sounds like a plan. I'm not sure if this should be in the Patchwork
> project or maintained separately though?

We should probably keep it in Patchwork - it will help us make sure we
don't stray too far from compatibility with major distros. I'll try to
get it easy to use interactively and wired up in Travis CI.

>
>> Note that I haven't been able to find a system package for
>> drf-nested-routers. Perhaps we could 'vendor' that?
>
> This dependency isn't needed any more - what made you think it was?

That's an excellent question. I feel like I saw it in a requrements file
but I can't find it now. Excellent!

Regards,
Daniel
>
> Stephen
>
>> 
>> Regards,
>> Daniel
>> 
>> * see patchwork.dja.id.au
>
> PS: Very nice :)
>
>> > 
>> > Cheers,
>> > Stephen

Patch hide | download patch | download mbox

diff --git a/tox.ini b/tox.ini
index 8cf23f6..72ec5c9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,22 +1,27 @@ 
 [tox]
 minversion = 2.0
-envlist = pep8,py{27,34}-django{16,17,18,19,110},py35-django{18,19,110}
+envlist =
+    pep8
+    py{27,34}-django16-drf32
+    py{27,34}-django17-drf{32,33}
+    py{27,34,35}-django{18,19,110}-drf{34,35,36}
 skipsdist = True
 
 [testenv]
 deps =
     -r{toxinidir}/requirements-test.txt
     django16: django>=1.6,<1.7
-    django16: djangorestframework>=3.2,<3.3
-    django16: django-filter>=0.11,<0.12
     django17: django>=1.7,<1.8
-    django17: djangorestframework>=3.3,<3.4
-    django17: django-filter>=0.11,<0.12
     django18: django>=1.8,<1.9
     django19: django>=1.9,<1.10
     django110: django>=1.10,<1.11
-    django{18,19,110}: djangorestframework>=3.5,<3.6
-    django{18,19,110}: django-filter>=1.0,<1.1
+    drf32: djangorestframework>=3.2,<3.3
+    drf33: djangorestframework>=3.3,<3.4
+    drf34: djangorestframework>=3.4,<3.5
+    drf35: djangorestframework>=3.5,<3.6
+    drf36: djangorestframework>=3.6,<3.7
+    drf{32,33,34}: django-filter>=0.11,<0.12
+    drf{35,36}: django-filter>=1.0,<1.1
 setenv =
     DJANGO_SETTINGS_MODULE = patchwork.settings.dev
     PYTHONDONTWRITEBYTECODE = 1