Changeset 427

Show
Ignore:
Timestamp:
12/05/08 15:56:41 (4 years ago)
Author:
ged
Message:

- Deprecated act_as_list extension in favor of SQLAlchemy's orderinglist

extension (closes #53).

- fix typo in warning

Location:
elixir/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • elixir/trunk/CHANGES

    r426 r427  
    4343  attached to their class. It makes it possible to access them or refer to them 
    4444  after the class is defined (but before setup). 
     45- Deprecated act_as_list extension in favor of SQLAlchemy's orderinglist 
     46  extension (closes #53). 
    4547 
    4648Bug fixes: 
  • elixir/trunk/elixir/ext/list.py

    r418 r427  
    11''' 
     2This extension is DEPRECATED. Please use the orderinglist SQLAlchemy 
     3extension instead. 
     4For details: 
     5http://www.sqlalchemy.org/docs/04/plugins.html#plugins_orderinglist 
     6http://www.sqlalchemy.org/docs/04/sqlalchemy_ext_orderinglist.html 
     7 
     8For an Elixir example: 
     9http://elixir.ematia.de/trac/browser/elixir/trunk/tests/test_o2m.py#L167 
     10 
    211An ordered-list plugin for Elixir to help you make an entity be able to be 
    312managed in a list-like way. Much inspiration comes from the Ruby on Rails 
     
    8392from elixir.events import before_insert, before_delete 
    8493from sqlalchemy import Column, Integer, select, func, literal, and_ 
     94import warnings 
    8595 
    8696__all__ = ['acts_as_list'] 
     
    99109 
    100110    def __init__(self, entity, qualifier=None, column_name='position'): 
     111        warnings.warn("The act_as_list extension is deprecated. Please use " 
     112                      "SQLAlchemy's orderinglist extension instead", 
     113                      DeprecationWarning, stacklevel=6) 
    101114        self.entity = entity 
    102115        self.qualifier_method = qualifier 
  • elixir/trunk/elixir/relationships.py

    r426 r427  
    860860 
    861861    def get_table(self): 
    862         warnings.warn("The secondary_table attribute on ManyToMany objects is" 
     862        warnings.warn("The secondary_table attribute on ManyToMany objects is " 
    863863                      "deprecated", DeprecationWarning, stacklevel=2) 
    864864        return self.table