[pypy-dev] strange error in urlunparse

Max Lavrenov max.lavrenov at gmail.com
Wed Oct 5 17:03:35 CEST 2011


I could try writing small application for reproduce this error.  It happens
in twisted function twisted.web.client.getPage
Or may be i shoud try another version of pypy or twisted ( i use trunk
version of twisted ) ?

On Wed, Oct 5, 2011 at 18:57, Max Lavrenov <max.lavrenov at gmail.com> wrote:

> Hello Amaury
> Thanks for response.
>
> No, i got same error with this line
> python --jit threshold=-1  /home/e-max/.virtualenvs/pypy/bin/twistd -n
> dalight
>
> But If i change urlunparse function and try printing date variable before,
> all starts work correctly.
>
> def urlunparse(data):
>     """Put a parsed URL back together again.  This may result in a
>     slightly different, but equivalent URL, if the URL that was parsed
>     originally had redundant delimiters, e.g. a ? with an empty query
>     (the draft states that these are equivalent)."""
>     print data
>
>     scheme, netloc, url, params, query, fragment = data
>     if params:
>         url = "%s;%s" % (url, params)
>     return urlunsplit((scheme, netloc, url, query, fragment))
>
>
> On Wed, Oct 5, 2011 at 18:30, Amaury Forgeot d'Arc <amauryfa at gmail.com>wrote:
>
>> 2011/10/5 Max Lavrenov <max.lavrenov at gmail.com>:
>> > after ~500 successfull responses i am starting to get error on line "if
>> > params"
>>
>> Looks like a JIT error to me, which has a default threshold of 1000
>> iterations.
>> Can you try again with
>>    pypy --jit threshold=-1
>> to completely disable the JIT?
>>
>> --
>> Amaury Forgeot d'Arc
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20111005/93824d0f/attachment-0001.html>


More information about the pypy-dev mailing list