Changeset 90:da95e79bb74e

Show
Ignore:
Timestamp:
12/18/06 12:09:20 (2 years ago)
Author:
warner@lothar.com
branch:
default
Message:

[foolscap @ update NEWS for 0.0.6]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ChangeLog

    r89 r90  
    112006-12-18  Brian Warner  <warner@lothar.com> 
     2 
     3        * NEWS: update for 0.0.6 
    24 
    35        * foolscap/negotiate.py (Negotiation): Send less data. When 
  • NEWS

    r57 r90  
    1 User visible changes in Foolscap (aka newpb/pb2). 
     1User visible changes in Foolscap (aka newpb/pb2).           -*- outline -*- 
     2 
     3* Release 0.0.6 (18 Dec 2006) 
     4 
     5** INCOMPATIBLE PROTOCOL CHANGES 
     6 
     7Version 0.0.6 will not interoperate with versions 0.0.5 or earlier, because 
     8of changes to the negotiation process and the method-calling portion of the 
     9main wire protocol. (you were warned :-). There are still more incompatible 
     10changes to come in future versions as the feature set and protocol 
     11stabilizes. Make sure you can upgrade both ends of the wire until a protocol 
     12freeze has been declared. 
     13 
     14*** Negotiation versions now specify a range, instead of a single number 
     15 
     16The two ends of a connection will agree to use the highest mutually-supported 
     17version. This approach should make it much easier to maintain backwards 
     18compatibility in the future. 
     19 
     20*** Negotiation now includes an initial VOCAB table 
     21 
     22One of the outputs of connection negotiation is the initial table of VOCAB 
     23tokens to use for abbreviating commonly-used strings into short tokens 
     24(usually just 2 bytes). Both ends have the ability to modify this table at any 
     25time, but by setting the initial table during negotiation we same some 
     26protocol traffic. VOCAB-izing common strings (like 'list' and 'dict') have 
     27the potential to compress wire traffic by maybe 50%. 
     28 
     29*** remote methods now accept both positional and keyword arguments 
     30 
     31Previously you had to use a RemoteInterface specification to be able to pass 
     32positional arguments into callRemote(). (the RemoteInterface schema was used 
     33to convert the positional arguments into keyword arguments before sending 
     34them over the wire). In 0.0.6 you can pass both posargs and kwargs over the 
     35wire, and the remote end will pass them directly to the target method. When 
     36schemas are in effect, the arguments you send will be mapped to the method's 
     37named parameters in the same left-to-right way that python does it. This 
     38should make it easier to port oldpb code to use Foolscap, since you don't 
     39have to rewrite everything to use kwargs exclusively. 
     40 
     41** Schemas now allow =None and =RIFoo 
     42 
     43You can use 'None' in a method schema to indicate that the argument or return 
     44value must be None. This is useful for methods that always return None. You 
     45can also require that the argument be a RemoteReference that provides a 
     46particular RemoteInterface. For example: 
     47 
     48class RIUser(RemoteInterface): 
     49    def get_age(): 
     50        return int 
     51    def delete(): 
     52        return None 
     53 
     54class RIUserDatabase(RemoteInterface): 
     55    def get_user(username=str): 
     56        return RIUser 
     57 
     58Note that these remote interface specifications are parsed at import time, so 
     59any names they refer to must be defined before they get used (hence placing 
     60RIUserDatabase before RIUser would fail). Hopefully we'll figure out a way to 
     61fix this in the future. 
     62 
     63** Violations are now annotated better, might keep more stack-trace information 
     64 
     65** Copyable improvements 
     66 
     67The Copyable documentation has been split out to docs/copyable.xhtml and 
     68somewhat expanded. 
     69 
     70The new preferred Copyable usage is to have a class-level attribute named 
     71"typeToCopy" which holds the unique string. This must match the class-level 
     72"copytype" attribute of the corresponding RemoteCopy class. Copyable 
     73subclasses (or ICopyable adapters) may still implement getTypeToCopy(), but 
     74the default just returns self.typeToCopy . Most significantly, we no longer 
     75automatically use the fully-qualified classname: instead we *require* that 
     76the class definition include "typeToCopy". Feel free to use any stable and 
     77globally-unique string here, like a URI in a namespace that you control, or 
     78the fully-qualified package/module/classname of the Copyable subclass. 
     79 
     80The RemoteCopy subclass must set the 'copytype' attribute, as it is used for 
     81auto-registration. These can set copytype=None to inhibit auto-registration. 
     82 
    283 
    384* Release 0.0.5 (04 Nov 2006)