[pypy-dev] strange error in urlunparse
Max Lavrenov
max.lavrenov at gmail.com
Wed Oct 5 15:43:45 CEST 2011
Hello all.
I make some experiments with pypy in our twisted project and get strange
error in standard urlparse.urlunparse function
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)."""
scheme, netloc, url, params, query, fragment = data
if params:
url = "%s;%s" % (url, params)
return urlunsplit((scheme, netloc, url, query, fragment))
If i try using apache benchmark , after ~500 successfull responses i am
starting to get error on line "if params": (216 line in real urlparse.py
file) with message "local variable 'params' referenced before assignment".
How it's possible?
My pypy version is "Python 2.7.1 (7acf2b8fcafd, Sep 26 2011, 11:38:29) [PyPy
1.6.1-dev0 with GCC 4.6.1] on linux2"
Best regards,
Max Lavrenov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20111005/a1d3d798/attachment-0001.html>
More information about the pypy-dev
mailing list