On 31 January 2012 12:34, Dr. Trigon <dr.trigon@surfeu.ch> wrote:
While reading the 'rewrite' realisation of 'getUrl' and also
'pywikibot.comms.http.request' I came along the comment "Queue a
request to be submitted to Site." IN 'pywikibot.comms.http.request'...
So to me it seems this is the site's 'getUrl' method instead of a
generic one as it should be... ;) and as it needs info from the
site object it will be hard to separate the two.

Heh, you're right. However, that .request method is probably easier to split (as it's smaller and simpler): lines 100-119 should just be split off into a seperate function. 
 
But in fact I just want to conider the 'trunk' part. I would like
to propose to split the site's 'getUrl' into a generic one (e.g.
in 'pywikibot.comms.http.request' analogue to 'rewrite') and the
usual one in site object (which then uses the genric one).
That way we have both; the genric one (I desperately need) and the
site's one, that - as Merlijn mentioned

That would be great. I'd suggest to use the structure - and if possible the code - from the rewrite, making the API for both branches as similar as possible.

Best,
Merlijn