| 1 | | Releases of pb2 |
|---|
| | 1 | User visible changes in pb2/newpb/Foolscap. |
|---|
| | 2 | |
|---|
| | 3 | * Release 0.0.3 (05 Oct 2006) |
|---|
| | 4 | |
|---|
| | 5 | ** API Changes |
|---|
| | 6 | |
|---|
| | 7 | The primary entry point for Foolscap is now the "Tub": |
|---|
| | 8 | |
|---|
| | 9 | import foolscap |
|---|
| | 10 | t = foolscap.Tub() |
|---|
| | 11 | d = t.getReference(pburl) |
|---|
| | 12 | d.addCallback(self.gotReference) |
|---|
| | 13 | ... |
|---|
| | 14 | |
|---|
| | 15 | The old "PBService" name is gone, use "Tub" instead. There are now separate |
|---|
| | 16 | classes for "Tub" and "UnauthenticatedTub", rather than using an "encrypted=" |
|---|
| | 17 | argument. Tubs always use encryption if available: the difference between the |
|---|
| | 18 | two classes is whether this Tub should use a public key for its identity or |
|---|
| | 19 | not. Note that you always need encryption to connect to an authenticated Tub. |
|---|
| | 20 | So install pyopenssl, really. |
|---|
| | 21 | |
|---|
| | 22 | ** eventual send operators |
|---|
| | 23 | |
|---|
| | 24 | Foolscap now provides 'eventually' and 'fireEventually', to implement the |
|---|
| | 25 | "eventual send" operator advocated by Mark Miller's "Concurrency Among |
|---|
| | 26 | Strangers" paper (http://www.erights.org/talks/promises/index.html). |
|---|
| | 27 | eventually(cb, *args, **kwargs) runs the given call in a later reactor turn. |
|---|
| | 28 | fireEventually(value=None) returns a Deferred that will be fired (with |
|---|
| | 29 | 'value') in a later turn. These behave a lot like reactor.callLater(0,..), |
|---|
| | 30 | except that Twisted doesn't actually promise that a pair of callLater(0)s |
|---|
| | 31 | will be fired in the right order (they usually do under unix, but they |
|---|
| | 32 | frequently don't under windows). Foolscap's eventually() *does* make this |
|---|
| | 33 | guarantee. In addition, there is a flushEventualQueue() that is useful for |
|---|
| | 34 | unit tests, it returns a Deferred that will only fire when the entire queue |
|---|
| | 35 | is empty. As long as your code only uses eventually() (and not callLater(0)), |
|---|
| | 36 | putting the following in your trial test cases should keep everything nice |
|---|
| | 37 | and clean: |
|---|
| | 38 | |
|---|
| | 39 | def tearDown(self): |
|---|
| | 40 | return foolscap.flushEventualQueue() |
|---|
| | 41 | |
|---|
| | 42 | ** Promises |
|---|
| | 43 | |
|---|
| | 44 | An initial implementation of Promises is in foolscap.promise for |
|---|
| | 45 | experimentation. Only "Near" Promises are implemented to far (promises which |
|---|
| | 46 | resolve to a local object). Eventually Foolscap will offer "Far" Promises as |
|---|
| | 47 | well, and you will be able to invoke remote method calls through Promises as |
|---|
| | 48 | well as RemoteReferences. See foolscap/test/test_promise.py for some hints. |
|---|
| | 49 | |
|---|
| | 50 | ** Bug Fixes |
|---|
| | 51 | |
|---|
| | 52 | Messages containing "Gifts" (third-party references) are now delivered in the |
|---|
| | 53 | correct order. In previous versions, the presence of these references could |
|---|
| | 54 | delay delivery of the containing message, causing methods to be executed out |
|---|
| | 55 | of order. |
|---|
| | 56 | |
|---|
| | 57 | The VOCAB-manipulating code used to have nasty race conditions, which should |
|---|
| | 58 | be all fixed now. This would be more important if we actually used the |
|---|
| | 59 | VOCAB-manipulating code yet, but we don't. |
|---|
| | 60 | |
|---|
| | 61 | Lots of internal reorganization (put all slicers in a subpackage), not really |
|---|
| | 62 | user-visible. |
|---|
| | 63 | |
|---|
| | 64 | Updated to work with recent Twisted HEAD, specifically changes to sslverify. |
|---|
| | 65 | This release of Foolscap ought to work with the upcoming Twisted-2.5 . |
|---|
| | 66 | |
|---|
| | 67 | ** Incompatible protocol changes |
|---|
| | 68 | |
|---|
| | 69 | There are now separate add-vocab and set-vocab sequences, which add a single |
|---|
| | 70 | new VOCAB token and replace the entire table, respectively. These replace the |
|---|
| | 71 | previous 'vocab' sequence which behaved like set-vocab does now. This would |
|---|
| | 72 | be an incompatible protocol change, except that previous versions never sent |
|---|
| | 73 | the vocab sequence anyways. This version doesn't send either vocab-changing |
|---|
| | 74 | sequence either, but when we finally do start using it, it'll be ready. |
|---|
| | 75 | |
|---|
| | 76 | * Release 0.0.2 (14 Sep 2006) |
|---|
| | 77 | |
|---|
| | 78 | Renamed to "Foolscap", extracted from underneat the Twisted packaged, |
|---|
| | 79 | consolidated API to allow a simple 'import foolscap'. No new features or bug |
|---|
| | 80 | fixes relative to pb2-0.0.1 . |
|---|
| | 81 | |
|---|