Sorry for not checking in the first place. From the looks of this 0.7 code and specifically from the comment, it seems you've already changed this:
@classmethod def from_scalar_attribute(cls, attribute, state, current): original = state.committed_state.get(attribute.key, _NO_HISTORY) if original is _NO_HISTORY: if current is NO_VALUE: return cls((), (), ()) else: return cls((), [current], ()) # dont let ClauseElement expressions here trip things up elif attribute.is_equal(current, original) is True: return cls((), [current], ()) else: # current convention on native scalars is to not # include information # about missing previous value in "deleted", but # we do include None, which helps in some primary # key situations if id(original) in _NO_STATE_SYMBOLS: deleted = () else: deleted = [original] if current is NO_VALUE: return cls((), (), deleted) else: return cls([current], (), deleted) On Sep 23, 1:12 pm, Michael Bayer <mike...@zzzcomputing.com> wrote: > I can look later today, but what does 0.7 do? > > Sent from my iPhone > > On Sep 23, 2011, at 11:17 AM, Kent <jkentbo...@gmail.com> wrote: > > > > > > > > > I see the code specifically treats going from None as deleted = (): > > 1417 else: > > 1418 -> if original is not None: > > 1419 deleted = [original] > > 1420 else: > > 1421 deleted = () > > 1422 return cls([current], (), deleted) > > > So I guess the question is why and is that inconsistent with going to > > None? > > > On Sep 23, 10:39 am, Kent <jkentbo...@gmail.com> wrote: > >> I have two scalar columns in this example. (This is SQLAlchemy-0.6.4) > > >> ========= To NULL ============== > >> print l.percentofsale1 > >> 100 > > >> l.percentofsale1=None > > >> attributes.get_history(l,'percentofsale1') > >> ([None], (), [Decimal('100')]) > > >> ========= From NULL ============== > >> print l.discount > >> None > > >> l.discount=Decimal(100) > > >> attributes.get_history(l,'discount') > >> ([Decimal('100')], (), ()) > > >> I expected to be able to see the history moving from None to > >> Decimal('100') like this: > >> ([Decimal('100')], (), [None]) > > >> Which would seem consistent with moving To NULL. Why is the > >> history.deleted () instead of [None]? > > >> Thanks, > >> Kent > > > -- > > You received this message because you are subscribed to the Google Groups > > "sqlalchemy" group. > > To post to this group, send email to sqlalchemy@googlegroups.com. > > To unsubscribe from this group, send email to > > sqlalchemy+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.