datetime interpretation changed

Bug #924240 reported by Michael Nelson on 2012-01-31
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
wadllib
High
Unassigned
python-wadllib (Ubuntu)
High
Unassigned
Precise
High
Unassigned

Bug Description

Sorry I haven't looked further, but we started seeing the following error recently, which seems to be related to the recent release of wadllib (note, the error is misleading, as it has skipped the expected date comparison, see further paste below):

{{{
[localhost] run: virtualenv/bin/python django_project/manage.py test softwarecenteragent.SubscriptionSetAPIFixtureTestCase
Creating test database for alias 'default'...
F
======================================================================
FAIL: test_getForMe_with_fixture_data (softwarecenteragent.tests.test_api.SubscriptionSetAPIFixtureTestCase)
An example fixture can be used for the devserver.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/michael/isd/sca/current_work/src/softwarecenteragent/tests/test_api.py", line 232, in test_getForMe_with_fixture_data
    eg_subscriptions_json, api_subscriptions)
  File "/home/michael/isd/sca/current_work/src/softwarecenteragent/tests/helpers.py", line 226, in assertJSONEquivalent
    self.assertEqual(val, api_val)
AssertionError: '2010-07-02 15:25:28' != u'2010-07-02T15:25:28'

----------------------------------------------------------------------
Ran 1 test in 0.402s

FAILED (failures=1)
Destroying test database for alias 'default'...

Fatal error: local() encountered an error (return code 1) while executing 'virtualenv/bin/python django_project/manage.py test softwarecenteragent.SubscriptionSetAPIFixtureTestCase'

Aborting.
michael@server-1186:~/isd/sca/current_work$ virtualenv/bin/pip freeze | grep wadllib
wadllib==1.3.0
michael@server-1186:~/isd/sca/current_work$ virtualenv/bin/pip install wadllib==1.1.4
Downloading/unpacking wadllib==1.1.4
  Downloading wadllib-1.1.4.tar.gz (53Kb): 53Kb downloaded
  Running setup.py egg_info for package wadllib
Requirement already satisfied (use --upgrade to upgrade): distribute in ./virtualenv/lib/python2.6/site-packages (from wadllib==1.1.4)
Requirement already satisfied (use --upgrade to upgrade): elementtree in ./virtualenv/lib/python2.6/site-packages (from wadllib==1.1.4)
Requirement already satisfied (use --upgrade to upgrade): lazr.uri in ./virtualenv/lib/python2.6/site-packages (from wadllib==1.1.4)
Requirement already satisfied (use --upgrade to upgrade): simplejson in ./virtualenv/lib/python2.6/site-packages (from wadllib==1.1.4)
Installing collected packages: wadllib
  Found existing installation: wadllib 1.3.0
    Uninstalling wadllib:
      Successfully uninstalled wadllib
  Running setup.py install for wadllib
Successfully installed wadllib
Cleaning up...
michael@server-1186:~/isd/sca/current_work$ fab test:softwarecenteragent.SubscriptionSetAPIFixtureTestCase
[localhost] run: virtualenv/bin/python django_project/manage.py test softwarecenteragent.SubscriptionSetAPIFixtureTestCase
Creating test database for alias 'default'...
.
----------------------------------------------------------------------
Ran 1 test in 0.483s

OK
}}}

Note: the test is itself expecting to find a datetime object in the api value - see line 21: (yes, we should be using python fixtures)
http://paste.ubuntu.com/823703/

Related branches

Aaron Bentley (abentley) on 2012-01-31
Changed in wadllib:
status: New → Triaged
importance: Undecided → High
James Westby (james-w) on 2012-02-08
Changed in python-wadllib (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
milestone: none → ubuntu-12.04-beta-1
James Westby (james-w) on 2012-02-21
Changed in python-wadllib (Ubuntu):
milestone: ubuntu-12.04-beta-1 → none
Changed in python-wadllib (Ubuntu Precise):
importance: Critical → High
Brad Figg (brad-figg) wrote :

Since the new version of this library broke a number of things and since it appears this is not going to get fixed anytime soon, why don't "we" just revert the changes and upload a new version for Precise?

On Wed, Mar 7, 2012 at 5:50 AM, Brad Figg <email address hidden> wrote:
> Since the new version of this library broke a number of things and since
> it appears this is not going to get fixed anytime soon, why don't "we"
> just revert the changes and upload a new version for Precise?

Has it been determined that this library is the root cause, and its
not a python2.7 fallout?

Brad Figg (brad-figg) wrote :

@robert,

According to comments to bug #929068, reverting to a previous version of this library "solved" the problem. Does that mean that this is the root cause. Seems likely, though without digging into the issue and finding the exact cause I wouldn't know.

Richard Harding (rharding) wrote :

Brad, Michael, I want to add this test into the wadllib set and wondered if you can paste or upload the test json and structure you guys were using for this?

tags: added: rls-mgr-p-tracking
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-wadllib - 1.3.0-2

---------------
python-wadllib (1.3.0-2) unstable; urgency=low

  * Rebuild against python3-defaults 3.2.3~rc1-2, to generate correct
    ${python3:Depends}.
  * Patch no-et-roundtrip: Avoid round-trip through ET that loses namespaces.
    (LP: #924240)
  * Bump Standards-Version to 3.9.3, no changes needed.

 -- Stefano Rivera <email address hidden> Thu, 22 Mar 2012 16:48:48 +0200

Changed in python-wadllib (Ubuntu Precise):
status: Triaged → Fix Released
Michael Nelson (michael.nelson) wrote :

On Tue, Mar 20, 2012 at 3:57 PM, Richard Harding
<email address hidden> wrote:
> Brad, Michael, I want to add this test into the wadllib set and wondered
> if you can paste or upload the test json and structure you guys were
> using for this?

Hi Richard - sorry for the delay (been sick). The json fixture that is
being used in the test results shown in the description above is:
https://pastebin.canonical.com/63223/

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers