Changeset 70

Show
Ignore:
Timestamp:
02/22/07 09:30:26 (6 years ago)
Author:
ged
Message:

Applied patch from Robin Munn to make the code python 2.3 compatible

Location:
elixir/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • elixir/trunk/CHANGES

    r65 r70  
    110.1.1 
     2- Applied patch from Robin Munn to make the code python 2.3 compatible 
    23- Per a suggestion on the mailing list, look at the calling stack frame to 
    34  ensure that we apply statements to the proper class.  We now attach the 
  • elixir/trunk/elixir/__init__.py

    r64 r70  
    2525from elixir.fields                  import * 
    2626from elixir.relationships           import * 
     27 
     28try: 
     29    set 
     30except NameError: 
     31    from sets import Set as set 
    2732 
    2833__all__ = ['Entity', 'Field', 'has_field', 'with_fields',  
  • elixir/trunk/elixir/entity.py

    r66 r70  
    88from elixir.fields                  import Field 
    99from elixir.options                 import options_defaults 
     10 
     11try: 
     12    set 
     13except NameError: 
     14    from sets import Set as set 
    1015 
    1116import sys 
     
    263268        return res 
    264269 
    265     @classmethod 
    266270    def setup_relationships(cls): 
    267271        for relationship in list(EntityDescriptor.uninitialized_rels): 
    268272            if relationship.setup(): 
    269273                EntityDescriptor.uninitialized_rels.remove(relationship) 
     274    setup_relationships = classmethod(setup_relationships) 
    270275 
    271276 
  • elixir/trunk/elixir/fields.py

    r64 r70  
    8080        self.kwargs = kwargs 
    8181     
    82     @property 
    8382    def column(self): 
    8483        ''' 
     
    9089                                  *self.args, **self.kwargs) 
    9190        return self._column 
     91    column = property(column) 
    9292 
    9393 
  • elixir/trunk/elixir/relationships.py

    r67 r70  
    235235        return True 
    236236     
    237     @property 
    238237    def target(self): 
    239238        if not self._target: 
     
    264263         
    265264        return self._target 
    266      
    267     @property 
     265    target = property(target) 
     266     
    268267    def inverse(self): 
    269268        if not self._inverse: 
     
    288287         
    289288        return self._inverse 
     289    inverse = property(inverse) 
    290290     
    291291    def match_type_of(self, other): 
  • elixir/trunk/elixir/statements.py

    r64 r70  
    2424        statements.append((self, args, kwargs)) 
    2525         
    26     @classmethod 
    2726    def process(cls, entity): 
    2827        ''' 
     
    3332        for statement, args, kwargs in getattr(entity, STATEMENTS): 
    3433            statement.target(entity, *args, **kwargs) 
     34    process = classmethod(process)