Merge lp:~brian.curtin/ubuntu-sso-client/py3-metaclass into lp:ubuntu-sso-client
Proposed by
Brian Curtin
on 2012-08-09
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Alejandro J. Cura on 2012-08-16 | ||||
| Approved revision: | 992 | ||||
| Merged at revision: | 992 | ||||
| Proposed branch: | lp:~brian.curtin/ubuntu-sso-client/py3-metaclass | ||||
| Merge into: | lp:ubuntu-sso-client | ||||
| Diff against target: |
46 lines (+11/-5) 2 files modified
ubuntu_sso/utils/ipc.py (+8/-2) ubuntu_sso/utils/tests/test_ipc.py (+3/-3) |
||||
| To merge this branch: | bzr merge lp:~brian.curtin/ubuntu-sso-client/py3-metaclass | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Eric Casteleijn (community) | Approve on 2012-08-16 | ||
| Alejandro J. Cura (community) | 2012-08-09 | Approve on 2012-08-16 | |
|
Review via email:
|
|||
Commit Message
- Switch to Python 2 and 3 safe usage of a metaclass for IPC
Description of the Change
The IPC code makes use of a metaclass, and due to Python 3's changes to metaclasses, we need a version-safe way to continue using it. The easiest way is by using a base class that was created by calling the metaclass directly, which we get from a trivial function.
This is the same as what six.with_metaclass does.
To post a comment you must log in.
| Alejandro J. Cura (alecu) wrote : | # |
Sorry, I didn't notice that lint gave this error:
ubuntu_
508: [W0232, RemoteMetaTestC
review:
Needs Fixing
lp:~brian.curtin/ubuntu-sso-client/py3-metaclass
updated
on 2012-08-14
- 992. By Brian Curtin on 2012-08-14
-
Get rid of a warning about __init__ not existing
review:
Approve

Nice branch!
Since the new "meta_base" function seems like it might be useful elsewhere, should it be moved to a more common module?
Or perhaps it makes sense that we should start depending on six, since it's being used for the protobuf port to python 3, and it may help us with other porting.
Anyway, I think we should discuss separately from this branch.