API talk:Client code/Evaluations/Pywikibot
Gzip and user-agent
@Fhocutt: 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.
- @John Vandenberg: 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)
There is an issue about user-agent User:Fhocutt. Usernames are in utf-8 but user-agent only supports ISO/IEC 8859-1 so even a č in user would returns error for every call (not considering non Latin user-names like درفش کاویانی or לערי ריינהארט). I thought about transliteration but I think it's returning False information. maybe we can rule that people need to have ISO 8859 compatible user name to run a botLadsgroup (talk) 17:33, 10 July 2014 (UTC)
- Good call, User:Ladsgroup. The important thing is that there be some means of contacting the bot-runner, so requiring an ISO 8859 compatible email address for users with non-Latin usernames is another possible solution. --Fhocutt (talk) 17:47, 10 July 2014 (UTC)