Merge lp:~pitti/aptdaemon/pygobject-fixes into lp:aptdaemon
Proposed by
Martin Pitt
Status: | Merged |
---|---|
Merged at revision: | 871 |
Proposed branch: | lp:~pitti/aptdaemon/pygobject-fixes |
Merge into: | lp:aptdaemon |
Diff against target: |
68 lines (+13/-26) 2 files modified
aptdaemon/client.py (+11/-26) tests/test_client.py (+2/-0) |
To merge this branch: | bzr merge lp:~pitti/aptdaemon/pygobject-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Approve | ||
Martin Pitt (community) | Needs Resubmitting | ||
Review via email: mp+134942@code.launchpad.net |
Description of the change
This makes aptdaemon work with both PyGObject 3.7.2 as well as older versions (tested 3.4.2). See bug 1080736 for details.
To post a comment you must log in.
AFAICT this is not exactly what we want. The __call__ override in the metaclass is called everytime that a new AptTransaction() is created and it will return the transaction from the cache if its there already. This will
only work for metaclasses AFAICT.
With the branch this appears to be no longer working, i.e. the following testcase illustrates it: test_client. py' client. py 2012-08-28 10:50:54 +0000 client. py 2012-11-22 15:42:12 +0000
self. assertEqual( deferred. result. value.code,
aptdaemon. enums.ERROR_ DEP_RESOLUTION_ FAILED)
$ bzr diff
=== modified file 'tests/
--- tests/test_
+++ tests/test_
@@ -110,6 +110,11 @@
+ def test_tid(self): client. AptTransaction( tid, None) client. AptTransaction( tid, None) l(trans, trans2)
+ tid = "/meep"
+ trans = aptdaemon.
+ trans2 = aptdaemon.
+ self.assertEqua
if __name__ == "__main__":
This will work in trunk but fail in this branch. The test should probably be added to the branch just to ensure the behavior stays consistent.