Re: [Sqlalchemy-tickets] [sqlalchemy] #2943: @validates on inherited subclasses
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2014-02-07 17:55:37
|
#2943: @validates on inherited subclasses
---------------------------+-------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.9.3
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
---------------------------+-------------------------------
Comment (by zzzeek):
as I'm concerned about relying on B@validates doing nothing silently in
existing applications, possibly the safest approach now is:
1. if @validates is placed on B, emit a warning that it does nothing (or
even just throw an error, hmmm)
2. add new argument "override=True" to @validates, so that B->@validates
actually runs.
3. if they want A.@validates to still run, they haev to call super(B,
self).validates()
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2943#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|