16.04's python-django-tastypie doesn't work with 16.04's django

Bug #1733013 reported by Brian Murray on 2017-11-17
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-tastypie (Debian)
Fix Released
Unknown
django-tastypie (Ubuntu)
Undecided
Unassigned
Xenial
High
Brian Murray

Bug Description

[Impact]
tastypie is unusable with the version of django in Ubuntu 16.04 as it was not updated to support django 1.8.

[Test Case]
1) Install python-django-tastypie and django on Ubuntu 16.04
2) Try to start a django application
3) Observe the following traceback

Using python-django-tastypie from Ubuntu 16.04 results in the following traceback:

[...]
  File "/usr/lib/python2.7/dist-packages/tastypie/resources.py", line 1740, in <module>
    class BaseModelResource(Resource):
  File "/usr/lib/python2.7/dist-packages/tastypie/resources.py", line 2210, in BaseModelResource
    @transaction.commit_on_success()
AttributeError: 'module' object has no attribute 'commit_on_success'

with the version of django-tastypie in -proposed you'll observe no such traceback.

[Regression Potential]
Given that it is not possible to use tastypie, this will be an improvement over the current situation.

This has been fixed in Zesty with django-tastypie version 0.13.3-1. It's probably be best to backport this to 16.04 rather than trying to cherry pick all the django 1.8 changes.

Changed in django-tastypie (Ubuntu):
status: New → Fix Released
Changed in django-tastypie (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
tags: added: xenial
Changed in django-tastypie (Debian):
status: Unknown → Fix Released
Changed in django-tastypie (Ubuntu Xenial):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
description: updated

Hello Brian, or anyone else affected,

Accepted django-tastypie into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/django-tastypie/0.13.3-1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in django-tastypie (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Brian Murray (brian-murray) wrote :

I was able to verify this on xenial.

ubuntu@juju-0ee92f-stg-error-tracker-5:~$ wget 127.0.0.1:8080
--2017-12-06 23:55:29-- http://127.0.0.1:8080/
Connecting to 127.0.0.1:8080... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-12-06 23:55:29 ERROR 500: Internal Server Error.

ubuntu@juju-0ee92f-stg-error-tracker-5:~$ apt-cache policy python-django-tastypie
python-django-tastypie:
  Installed: 0.12.0-1build1
  Candidate: 0.13.3-1~16.04.1
  Version table:
     0.13.3-1~16.04.1 500
        500 http://ppa.launchpad.net/daisy-pluckers/daisy-seeds/ubuntu xenial/main amd64 Packages
 *** 0.12.0-1build1 500
        500 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
ubuntu@juju-0ee92f-stg-error-tracker-5:~$ apt-cache policy python-django-tastypie
python-django-tastypie:
  Installed: 0.13.3-1~16.04.1
  Candidate: 0.13.3-1~16.04.1
  Version table:
 *** 0.13.3-1~16.04.1 500
        500 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.13.3-1~16.04.1 500
        500 http://ppa.launchpad.net/daisy-pluckers/daisy-seeds/ubuntu xenial/main amd64 Packages
     0.12.0-1build1 500
        500 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
ubuntu@juju-0ee92f-stg-error-tracker-5:~$ sudo service gunicorn restart
ubuntu@juju-0ee92f-stg-error-tracker-5:~$ wget 127.0.0.1:8080
--2017-12-06 23:57:23-- http://127.0.0.1:8080/
Connecting to 127.0.0.1:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html [ <=> ] 11.40K --.-KB/s in 0s

2017-12-06 23:57:27 (47.8 MB/s) - ‘index.html’ saved [11670]

The 500 error with the version of the package was associated with the following OOPS.

S-5af7bc03693708a4369385ee55754abb OOPS-69a1381f31c69a3d89fcdef9a6cdf4b1
ubuntu@juju-0ee92f-stg-error-tracker-5:~$ cat /srv/errors.staging.ubuntu.com/staging/oops-local/2017-12-06/OOPS-5af7bc03693708a4369385ee55754abb
req_vars~HTTP_ACCEPT*/*HTTP_USER_AGENTWget/1.17.1 (linux-gnu)HTTP_CONNECTION
                                                                            Keep-AliveSERVER_NAM0.0.0.0SCRIPT_NAMEwsgi.url_schemehttpREQUEST_METHODGETHTTP_HOST127.0.0.1:8080PATH_INFO/SERVER_PORT8080SERVER_PROTOCOL HTTP/1.1QUERY_STRINGwsgi.version01HTTP_ACCEPT_ENCODING identityreportererrorsurlhttp://127.0.0.1:8080/hostname juju-0ee92f-stg-error-tracker-5value5'module' object has no attribute 'commit_on_success' time�A.`typeAttributeErrorid&OOPS-5af7bc03693708a4369385ee55754abbtb_textp

tags: added: verification-done-xenial
removed: verification-needed-xenial
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.