Re: getting openid comments to work

Ryan Barrett <pyblosxom-6sb6M7qyT/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
thanks, peter! i'm actually out on vacation until monday 5/5, but i'll be glad 
to take a look at these when i get back.

if any other committers reading are familiar with the pyblosxom openid code, 
assuming these look good, feel free to apply them. you'll want to test against 
the 1.4 branch. trunk too if the openid plugins are 2.0 compatible, i just 
don't know if they are yet.

On Tue, 22 Apr 2008, Peter Meerwald wrote:

> Hello,
>
>> Can you send us patches?  That'd make it a lot easier to get these things 
>> done.  Otherwise you're at the mercy of finding free time.
>
> attached are patches against the individual files
>
> comments-patch.txt applies against comments.py from trunk
>
> session-lock-patch.txt applies against
> http://www.c-area.ch/code/pyblosxom/plugins/session.py
>
> openid-complete-patch.txt applies against
> http://snarfed.org/space/comments_openid.py
>
>>> I set up pyblosxom with the openid_server and openid_comment plugin and 
>>> ran into a couple of issues:
>>> 
>>> 1. if an OpenID request is handled, cmtExpr() in comments.py breaks 
>>> because entry['absolute_path'] and entry['fn'] both return None and the 
>>> code subsequently fails when using the None values;
>>> so I added a check to just return in case None is returned
>>> 
>>> 2. the locking code in session.py is broken, ie. _lock() and _unlock(); if 
>>> the file to lock does not (yet) exist, an exception is thrown; I suggest 
>>> to use exception handlers within these methods
>>> 
>>> 3. comments_openid.py only passed one parameter to consumer.complete() in 
>>> complete_openid_auth(), however, newer python-openid libraries require a 
>>> second parameter; this can be easily fixed with the following line
>>> 
>>> # Ask the OpenID library to check the server's response
>>> response = consumer.complete(query, return_to)
>
> regards, p.
>
>

-Ryan

--
http://snarfed.org/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.