New submission from truppo <None>:
When using getPage and wanting to pass extra arguments to HTTPClientFactory, positional arguments cannot be used even though "*args" is specified in the getPage signature and the docstring suggests it would accept any extra args that HTTPClientFactory accepts.
{{{
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.web.client import getPage, HTTPClientFactory
>>> url = "http://www.foo.bar"
>>> data = {"foo":"bar"}
>>> HTTPClientFactory(url, "POST", data)
<HTTPClientFactory: http://www.foo.bar>
>>> getPage(url, None, "POST", data)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python26\lib\site-packages\twisted\web\client.py", line 473, in getPage
*args, **kwargs).deferred
TypeError: _makeGetterFactory() got multiple values for keyword argument 'contextFactory'
>>> HTTPClientFactory(url, method="POST", postdata=data)
<HTTPClientFactory: http://www.foo.bar>
>>> getPage(url, None, method="POST", postdata=data)
<Deferred at 0x2a2fe40>
>>>
}}}
----------
Type : defect
Component: web
Keywords :
Priority : low
Nosy :
----------
http://twistedmatrix.com/trac/ticket/3962
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.