Merge lp:~gz/lazr.restfulclient/python_2.4_compatibility into lp:lazr.restfulclient

Proposed by Martin Packman on 2010-05-20
Status: Merged
Approved by: Gavin Panella on 2010-11-04
Approved revision: 100
Merged at revision: 111
Proposed branch: lp:~gz/lazr.restfulclient/python_2.4_compatibility
Merge into: lp:lazr.restfulclient
Diff against target: 15 lines (+4/-1)
1 file modified
src/lazr/restfulclient/resource.py (+4/-1)
To merge this branch: bzr merge lp:~gz/lazr.restfulclient/python_2.4_compatibility
Reviewer Review Type Date Requested Status
Gavin Panella 2010-05-20 Approve on 2010-11-04
Review via email: mp+25717@code.launchpad.net

Description of the Change

Installed launchpadlib just now and launchpadlib.launchpad failed to import because lazr.restfulclient uses the new PEP-8 happy "email.message" spelling rather than the Python 2.4 compatible "email.Message" spelling.

Unrelated complaint: is the bootstrap.py symlink really necessary? Makes branching this project a pain.

To post a comment you must log in.
Gavin Panella (allenap) wrote :

Thanks for fixing this, +1.

> Unrelated complaint: is the bootstrap.py symlink really necessary?
> Makes branching this project a pain.

I assume you're using Windows? Out of interest, what happens?

Please file a bug about this, there's no reason why we shouldn't fix
it.

review: Approve
Leonard Richardson (leonardr) wrote :

I'm also +1 on this code, I've verified that the tests pass (in 2.6, I don't have 2.4 handy), and will land.

Martin Packman (gz) wrote :

Thanks! I filed bug 671135 on the symlink annoyance.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lazr/restfulclient/resource.py'
2--- src/lazr/restfulclient/resource.py 2010-04-29 13:21:39 +0000
3+++ src/lazr/restfulclient/resource.py 2010-05-20 19:30:45 +0000
4@@ -30,7 +30,10 @@
5
6
7 import cgi
8-from email.message import Message
9+try:
10+ from email.message import Message
11+except ImportError:
12+ from email.Message import Message
13 import simplejson
14 from StringIO import StringIO
15 import urllib

Subscribers

People subscribed via source and target branches