Show
Ignore:
Timestamp:
10/02/09 12:06:14 (3 years ago)
Author:
ged
Message:

Dropped support for python 2.3, SQLAlchemy 0.4 and deprecated stuff from Elixir
0.7

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • elixir/trunk/elixir/relationships.py

    r488 r490  
    303303| ``table_kwargs``   | A dictionary holding any other keyword argument you    | 
    304304|                    | might want to pass to the underlying Table object.     | 
    305 +--------------------+--------------------------------------------------------+| ``column_format``  | DEPRECATED. Specify an alternate format string for     | 
    306 |                    | naming the                                             | 
    307 |                    | columns in the mapping table.  The default value is    | 
    308 |                    | defined in ``elixir.options.M2MCOL_NAMEFORMAT``.  You  | 
    309 |                    | will be passed ``tablename``, ``key``, and ``entity``  | 
    310 |                    | as arguments to the format string.                     | 
    311305+--------------------+--------------------------------------------------------+ 
    312306 
     
    839833                 ondelete=None, onupdate=None, 
    840834                 table=None, schema=None, 
    841                  column_format=None, 
    842835                 filter=None, 
    843836                 table_kwargs=None, 
     
    858851        self.schema = schema 
    859852 
    860         if column_format: 
    861             warnings.warn("The 'column_format' argument on ManyToMany " 
    862                 "relationships is deprecated. Please use the 'local_colname' " 
    863                 "and/or 'remote_colname' arguments if you want custom " 
    864                 "column names for this table only, or modify " 
    865                 "options.M2MCOL_NAMEFORMAT if you want a custom format for " 
    866                 "all ManyToMany tables", DeprecationWarning, stacklevel=3) 
    867         self.column_format = column_format or options.M2MCOL_NAMEFORMAT 
     853        #TODO: this can probably be simplified/moved elsewhere since the 
     854        #argument disappeared 
     855        self.column_format = options.M2MCOL_NAMEFORMAT 
    868856        if not hasattr(self.column_format, '__call__'): 
    869857            # we need to store the format in a variable so that the 
     
    890878 
    891879        super(ManyToMany, self).__init__(of_kind, *args, **kwargs) 
    892  
    893     def get_table(self): 
    894         warnings.warn("The secondary_table attribute on ManyToMany objects is " 
    895                       "deprecated. You should rather use the table attribute.", 
    896                       DeprecationWarning, stacklevel=2) 
    897         return self.table 
    898     secondary_table = property(get_table) 
    899880 
    900881    def match_type_of(self, other):