Re: PROBLEM with comments.py in current SVN
will <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Trunk is NOT STABLE. I've been making a lot of changes and fixing bugs
as I've added tests to the test suite (I've got 205 with 52% coverage on
my local machine from changes I made today).
I would avoid trunk until it's more stable.
/will
Guntsche Michael wrote:
> Good morning list and especially Ryan,
>
> I recently took the plunge to update my little outdated installation
> to the current trunk version for testing.
> I started by updating the plug-ins from the version in SVN. After
> upgrading comments.py my site stopped working (it hung during load).
> No error messages, nothing. Since the old comments.py worked I had a
> look at what changed. Stepping through the changes I noticed the
> following.
> Every occurence of "has_key" had been replaced by "in". This isn't a
> big deal. Well not for all the dicts in there BUT entry seems to give
> problems.
>
> I am running on python 2.3 (version the host provides to me). Doing a
>
> if 'num_comments' in entry:
>
> just hangs while
>
> if entry.has_key('num_comments')
>
> works.
> In and has_key are implemented differently. If there is no
> __contains__ in the class in iterates over every entry and I guess it
> gets stuck somewhere.
> Just changing every occurence of "in" back to "has_key" for the entry
> case gives me a working system again, but I am wondering if this is a
> general problem or one with my setup.
>
> Can someone cross-check this with his setup, before I commit the change?
>
> Kind regards,
> Michael
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/