On Nov 20, 2008, at 6:16 PM, bukzor wrote:

>
> The second crashes with:
>  File "/tools/aticad/1.0/external/python-2.4.1/lib/python2.4/site-
> packages/SQLAlchemy-0.5.0rc4-py2.4.egg/sqlalchemy/sql/expression.py",
> line 3515, in _copy_internals
>    self.parameters = self.parameters.copy()
> AttributeError: 'NoneType' object has no attribute 'copy'

insert.params() was not the intended usage of the params() feature.   
In r5313 I've added NotImplementedError when params() is called on all  
Insert/Update/Delete constructs, since this feature is intended for  
generative modification of select() statements and other clause  
fragments.

In this case you almost certainly mean to say insert.values(**params).

The feature can be implemented for I/U/D but would require test  
coverage, but also is concerning since the params() method modifies  
all clause elements and is much more expensive than just calling  
values().  I'd be concerned that people would inadvertently use it  
without realizing that they really want to be calling values().


>
> Should I use 0.4 instead? Is it more stable / less broken?

there is no difference in 0.4 with regards to this behavior (except  
that in 0.5, now its covered).  0.5 is overall much more stable/ 
performant than 0.4 and is very close to final release.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to