[Sqlalchemy-commits] [1024] sqlalchemy/tags/rel_0_1_1: fixed recursive getattr condition
Brought to you by:
zzzeek
From: <co...@sq...> - 2006-02-23 23:40:27
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } #msg dt { float: left; width: 6em; font-weight: bold; } #msg dt:after { content:':';} #msg dl, #msg dt, #msg ul, #msg li { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: bold} #msg dl a:link { color:#fc3; } #msg dl a:active { color:#ff0; } #msg dl a:visited { color:#cc6; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; } #msg ul, pre { overflow: auto; } #patch { width: 100%; } #patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;} #patch .propset h4, #patch .binary h4 {margin:0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;} #patch .propset .diff, #patch .binary .diff {padding:10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[1024] sqlalchemy/tags/rel_0_1_1: fixed recursive getattr condition</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1024</dd> <dt>Author</dt> <dd>zzzeek</dd> <dt>Date</dt> <dd>2006-02-23 17:40:13 -0600 (Thu, 23 Feb 2006)</dd> </dl> <h3>Log Message</h3> <pre>fixed recursive getattr condition</pre> <h3>Modified Paths</h3> <ul> <li><a href="#sqlalchemytagsrel_0_1_1CHANGES">sqlalchemy/tags/rel_0_1_1/CHANGES</a></li> <li><a href="#sqlalchemytagsrel_0_1_1libsqlalchemyschemapy">sqlalchemy/tags/rel_0_1_1/lib/sqlalchemy/schema.py</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="sqlalchemytagsrel_0_1_1CHANGES"></a> <div class="modfile"><h4>Modified: sqlalchemy/tags/rel_0_1_1/CHANGES (1023 => 1024)</h4> <pre class="diff"><span> <span class="info">--- sqlalchemy/tags/rel_0_1_1/CHANGES 2006-02-23 02:48:01 UTC (rev 1023) +++ sqlalchemy/tags/rel_0_1_1/CHANGES 2006-02-23 23:40:13 UTC (rev 1024) </span><span class="lines">@@ -1,3 +1,6 @@ </span><ins>+0.1.2 +- fixed a recursive call in schema that was somehow running 994 times then returning +normally. broke nothing, slowed down everything. thanks to jpellerin for finding this. </ins><span class="cx"> 0.1.1 </span><span class="cx"> - small fix to Function class so that expressions with a func.foo() use the type of the </span><span class="cx"> Function object (i.e. the left side) as the type of the boolean expression, not the </span></span></pre></div> <a id="sqlalchemytagsrel_0_1_1libsqlalchemyschemapy"></a> <div class="modfile"><h4>Modified: sqlalchemy/tags/rel_0_1_1/lib/sqlalchemy/schema.py (1023 => 1024)</h4> <pre class="diff"><span> <span class="info">--- sqlalchemy/tags/rel_0_1_1/lib/sqlalchemy/schema.py 2006-02-23 02:48:01 UTC (rev 1023) +++ sqlalchemy/tags/rel_0_1_1/lib/sqlalchemy/schema.py 2006-02-23 23:40:13 UTC (rev 1024) </span><span class="lines">@@ -49,7 +49,7 @@ </span><span class="cx"> def __getattr__(self, key): </span><span class="cx"> """proxies method calls to an underlying implementation object for methods not found </span><span class="cx"> locally""" </span><del>- if not hasattr(self, '_impl'): </del><ins>+ if not self.__dict__.has_key('_impl'): </ins><span class="cx"> raise AttributeError(key) </span><span class="cx"> return getattr(self._impl, key) </span><span class="cx"> </span><span class="lines">@@ -305,7 +305,7 @@ </span><span class="cx"> else: </span><span class="cx"> fk = self.foreign_key.copy() </span><span class="cx"> return Column(self.name, self.type, fk, self.default, key = self.key, primary_key = self.primary_key, nullable = self.nullable, hidden = self.hidden) </span><del>- </del><ins>+ </ins><span class="cx"> def _make_proxy(self, selectable, name = None): </span><span class="cx"> """creates a copy of this Column, initialized the way this Column is""" </span><span class="cx"> if self.foreign_key is None: </span></span></pre> </div> </div> </body> </html> |