API talk:Client code/Evaluations/Pywikibot

Gzip and user-agent
Hello, As I know httplib2 automatically (without demanding explicitly implying in codes) compresses to gzip one example, and another thing is user-agent of pywikibot is completely okay the code. Why do you think there is a problem about them? Ladsgroup (talk) 11:13, 6 July 2014 (UTC)
 * Thanks for the comment, Ladsgroup. I wasn't aware that httplib2 automatically handled gzip; I've changed that point in the evaluation. Re: the user agent, https://meta.wikimedia.org/wiki/User-agent_policy requires not just identifying the bot but also providing some way of contacting the person who is running it. Unless I am missing something, pywikibot does the first but not the second.
 * Thank you User:Fhocutt. So you are saying that we need to add username in the user-agent? Ladsgroup (talk) 23:50, 6 July 2014 (UTC)
 * That's probably easiest and works as long as the user is logged in (so, works fine for pywikibot). --Fhocutt (talk) 09:13, 7 July 2014 (UTC)

On the gzip front, I have put up a patch which verifies that gzip is occurring behind the scenes in httplib2. John Vandenberg (talk) 00:45, 9 July 2014 (UTC)
 * I'm not familiar with the unittest module, but after looking at the code for a moment, I think in line 30 of that patch you want self.assertIsInstance and not self.assertTrue. (I don't have a Gerrit account or else I'd say something there. Jcgoble3 (talk) 01:08, 9 July 2014 (UTC)
 * Much appreciated Jcgoble3; new version uploaded. (Signing up for a gerrit is quite easy, and it would be golden to have more reviewers helping bring the gold up to packaging quality). John Vandenberg (talk) 01:47, 9 July 2014 (UTC)