Patchwork doesn't run on Xenial with system packages
Stephen Finucane
stephen at that.guru
Wed Apr 5 07:32:26 AEST 2017
On Tue, 2017-04-04 at 21:45 +1000, Daniel Axtens wrote:
> Daniel Axtens <dja at axtens.net> writes:
I could have sworn I sent a reply to this a few hours ago, but here we
go again.
> > Hi,
> >
> > If I try to run patchwork with system versions of packages on
> > Xenial, I
> > run in to problems.
> >
> > Specifically, when I run with ENABLE_REST_API=True, I see the
> > following
> > error:
> >
> > ImportError: Could not import
> > 'django_filters.rest_framework.DjangoFilterBackend' for API setting
> > 'DEFAULT_FILTER_BACKENDS'. ImportError: No module named
> > rest_framework.
> >
> > I suspect this is due to the version of DRF - apt search shows:
> >
> > python-djangorestframework/xenial 3.3.2-2 all
> >
> > requirements-prod.txt lists the required version as 3.5 to 3.6.
If you're installing using system packages, you shouldn't be looking at
requirements.txt - that's for pip-based installation. However, there
are issues which need to be resolved.
> Sorry, I should have said: I think this is an interaction between DRF
> and django-filter: django-filter is 0.11:
>
> python-django-filter/xenial 0.11.0-2 all
>
> and requirements-prod.txt has 1.0-1.1
>
> I was pointed towards the filters/DRF interaction by:
> http://stackoverflow.com/a/41477856/463510
Correct. I had previously tried to fix this but got bogged down in
django-rest-framework and django-filter issues. I think I have these
resolved now.
> I'm still digging in to this but I wanted to flag it in case anyone
> had
> any bright ideas.
I do! :) Fixes should be on the list shortly.
> We still need to fix this for the reasons in my original email. I
> also
> can't find a system package for drf-nested-router, which will also be
> an
> issue for deployment on sites that want to use system packages for
> stability and security update reasons.
drf-nested-router isn't required any more. Where have you seen this
dependency?
> Regards,
> Daniel
>
> > This is something we really need to fix: ozlabs.org runs Debian,
> > and if
> > it doesn't run on Xenial it's not likely to run on Debian. And we
> > really, really want ozlabs.org to be able to support the REST API.
Completely agree.
> > Can we relax the drf requirement?
As above, you can ignore 'requirements.txt' for installation from
packages. I have updated the README, however, to reflect the variety of
packages we support.
Cheers,
Stephen
PS: We _really_ need to drop Django 1.6, 1.7 support :(
More information about the Patchwork
mailing list