Merge lp:~stefanor/wadllib/datetime-924240 into lp:wadllib
| Status: | Merged |
|---|---|
| Approved by: | Richard Harding on 2012-03-22 |
| Approved revision: | 28 |
| Merged at revision: | 28 |
| Proposed branch: | lp:~stefanor/wadllib/datetime-924240 |
| Merge into: | lp:wadllib |
| Diff against target: |
19 lines (+2/-7) 1 file modified
src/wadllib/application.py (+2/-7) |
| To merge this branch: | bzr merge lp:~stefanor/wadllib/datetime-924240 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-03-22 | Approve on 2012-03-22 | |
| Richard Harding | code* | 2012-03-12 | Approve on 2012-03-22 |
|
Review via email:
|
|||
Description of the Change
I don't understand the purpose of the roundtrippnig through ET in _from_string. More to the point, it claims to track namespaces, but clearly doesn't correctly, causing LP: #924240.
My not understanding, is entirely possibly due to me not knowing this code at all, but the change fixes the issue for me, and the tests still pass under python 2 & 3.
| Richard Harding (rharding) wrote : | # |
I've been unable to break this, but this change, regardless doesn't break any wadllib tests and makes the code simpler so approving.
| j.c.sackett (jcsackett) wrote : | # |
I don't see anything wrong with this change. Please do provide the data requested by Rick so he can get tests in, thanks.
| Stefano Rivera (stefanor) wrote : | # |
We discussed it on IRC. I didn't have any particular test data, was just looking at datetimes with launchpadlib. But I'll have a look and see if I can prepare a test.
| Richard Harding (rharding) wrote : | # |
That's ok Stefano, we chatted in irc and I think the test would require some integration between not just the wadllib, but the api library as well. We ok on this change.
| j.c.sackett (jcsackett) wrote : | # |
> We discussed it on IRC. I didn't have any particular test data, was just
> looking at datetimes with launchpadlib. But I'll have a look and see if I can
> prepare a test.
Ah, thanks for the update. As Rick said, nevermind on the test, then. :-)
| Stefano Rivera (stefanor) wrote : | # |
phew :P

So I'm working on getting a test case for this and so I understand how this stuff works. I've got the start of a test case, but it passes with both the old code and your update.
So I'm wondering if maybe the test data in the wadllib isn't up to date. The JSON file that houses the tested data has date strings in the format
"date_created": "2005-06- 06T08:59: 51.561685+ 00:00"
And I wonder if that's not true for what you're getting.
Can you please get a copy of the json you're testing against so I can try to create a test that breaks as you're seeing it to make sure this doesn't become an issue in the future.
This is a paste of the test I've started to try to fire up: /pastebin. canonical. com/62637/
https:/