patchwork:pyup-pin-django-3.0.5

Last commit made on 2020-04-15
Get this branch:
git clone -b pyup-pin-django-3.0.5 https://git.launchpad.net/patchwork

Branch merges

Branch information

Name:
pyup-pin-django-3.0.5
Repository:
lp:patchwork

Recent commits

4d94bd2... by pyup-bot <email address hidden> on 2020-04-15

Pin django to latest version 3.0.5

f67b795... by pyup-bot <email address hidden> on 2020-04-15

Pin django to latest version 3.0.5

d08b6c7... by Daniel Axtens on 2020-04-14

api: allow filtering patches and covers by msgid

In the process of fixing the previous bug, I realised that:

 a) /api/patches/msgid is a perfectly reasonable thing to attempt
 b) We have no way of finding a patch by message id in the API

We can't actualy make /api/patches/msgid work because it may not
be unique, but we can add a filter.

I'm shoehorning this into stable/2.2, even though it's technically
an API change: it's minor, not incompatible and in hindsight a
glaring hole.

Cc: Michael Ellerman <email address hidden>
Tested-by: Jeremy Kerr <email address hidden>
Reviewed-by: Andrew Donnellan <email address hidden>
Reviewed-by: Stephen Finucane <email address hidden>
Signed-off-by: Daniel Axtens <email address hidden>

08c5856... by Daniel Axtens on 2020-04-14

api: do not fetch every patch in a patch detail view 404

mpe and jk and sfr found that the OzLabs server was melting due
to some queries downloading every patch.

Turns out if you 404 the patch detail view in the API, d-r-f attempts
to render a listbox with every single patch to fill in the 'related'
field. The bundle API also has a similar field.

Replace the multiple selection box with a text field. You can still
(AIUI) populate the relevant patch IDs manually.

This is the recommended approach per
https://www.django-rest-framework.org/topics/browsable-api/#handling-choicefield-with-large-numbers-of-items

Reported-by: Jeremy Kerr <email address hidden>
Reported-by: Michael Ellerman <email address hidden>
Reported-by: Stephen Rothwell <email address hidden>
Tested-by: Jeremy Kerr <email address hidden>
Server-no-longer-on-fire-by: Jeremy Kerr <email address hidden>
Reviewed-by: Stephen Finucane <email address hidden>
Signed-off-by: Daniel Axtens <email address hidden>

4eaf300... by Stephen Finucane <email address hidden> on 2020-04-10

pre-commit: Use Python 3 for everything

This lets us use e.g. f-strings. We also bump the version of the default
pre-commit lib and migrate to the upstream flake8 plugin, since the old
one is now deprecated.

Signed-off-by: Stephen Finucane <email address hidden>

cbc0486... by Jeremy Kerr on 2020-04-14

lib/sql: Update grant script for recent schema changes

This change fixes a few omissions in the grant scripts:

- patchrelation is missing from both mysql and postgres scripts; it's
  only needed for web user access.

- event is missing from the web grants on postgres, and the mail grants
  on mysql.

Tested on postgres only.

Fixes: 27c2acf56c ("models, templates: Add patch relations")
Fixes: 34e3c9c493 ("sql: Update 'grant-all.mysql' script with missing tables")
Fixes: 234bc7c316 ("lib/sql: fix permissions for v2.0.0 on postgres")
Signed-off-by: Jeremy Kerr <email address hidden>
Signed-off-by: Daniel Axtens <email address hidden>

e15fc9f... by Stephen Finucane <email address hidden> on 2020-04-09

Additional Python 2.7 cleanups

Signed-off-by: Stephen Finucane <email address hidden>

f71f5ee... by Stephen Finucane <email address hidden> on 2020-04-09

tox: Remove quotes around posargs

This was preventing us from doing e.g.:

  tox -e py36-django30 -- patchwork -v 2

Signed-off-by: Stephen Finucane <email address hidden>

a2b0850... by Stephen Finucane <email address hidden> on 2020-04-09

tests: Close XML-RPC client when done

This resolves the following irritating warnings that were popping up on
Python 3.7 and 3.8 and were silenced on 3.6:

  /usr/lib/python3.7/unittest/suite.py:107: ResourceWarning: unclosed <socket.socket ...>

Note that we need to use a subclass because the 'ServerProxy' class,
rather annoyingly, does not expose a 'close()' method. Instead, you're
expected to use a context manager, which isn't useful from the context
of a 'setUp' call. We could call '__enter__' and '__exit__' manually but
this seems cleaner. Also note that 'Server' was an alias of
'ServerProxy' [1], and we're taking the opportunity to switch here.

[1] https://docs.python.org/3/library/xmlrpc.client.html#xmlrpc.client.ServerProxy

Signed-off-by: Stephen Finucane <email address hidden>

abfd2df... by Stephen Finucane <email address hidden> on 2020-04-08

Remove __future__ imports

All of these are defaults in Python 3 [1].

[1] https://docs.python.org/3.6/library/__future__.html

Signed-off-by: Stephen Finucane <email address hidden>