[Pywikipedia-bugs] [Maniphest] [Commented On] T152068: GCI: Document unit test decorators

2016-12-09 Thread Dargasea
Dargasea added a comment. In T152068#2861484, @gerritbot wrote: Change 326245 had a related patch set uploaded (by Dargasia): PS 1 includes mock.patch, tests.aspects.require_modules, unittest.skipIf and unittest.skipUnless. These are decorators actually provided by testing-related packages. The

[Pywikipedia-bugs] [Maniphest] [Commented On] T152068: GCI: Document unit test decorators

2016-12-07 Thread Dargasea
Dargasea added a comment. @jayvdb No, I've got stuff IRL so I abandoned it at the GCI side, so that I can take my time. Definitely still working on it.TASK DETAILhttps://phabricator.wikimedia.org/T152068EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferenc

[Pywikipedia-bugs] [Maniphest] [Edited] T152435: super setUp()s and tearDown()s in unit test cases

2016-12-05 Thread Dargasea
Dargasea edited the task description. (Show Details) EDIT DETAILSCurrently saome test casesses in the tests folder, like `tests.http_tests.TestGetAuthenticationConfig`, inherit from `tests.aspects.TestCase`, but do not super the parent's setUp and tearDown.TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Changed Subscribers] T152435: super setUp()s and tearDown()s in unit test cases

2016-12-05 Thread Dargasea
Dargasea added a subscriber: jayvdb.Dargasea added a comment. @jayvdb created by your request :) . You can import this into GCI when you get the chance.TASK DETAILhttps://phabricator.wikimedia.org/T152435EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To

[Pywikipedia-bugs] [Maniphest] [Closed] T152075: Automatic use of fake user agent for bot-unfriendly sites

2016-12-05 Thread Dargasea
Dargasea closed this task as "Resolved". TASK DETAILhttps://phabricator.wikimedia.org/T152075EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: gerritbot, jayvdb, Aklapper, TerraCodes, pywikibot-bugs-list, Dargasea, Ramalepe, Liugev6, M

[Pywikipedia-bugs] [Maniphest] [Unblock] T113596: reflinks.py work with old user agent

2016-12-05 Thread Dargasea
Dargasea closed subtask T152075: Automatic use of fake user agent for bot-unfriendly sites as "Resolved". TASK DETAILhttps://phabricator.wikimedia.org/T113596EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MtDu, DargaseaCc: TerraCodes, gerri

[Pywikipedia-bugs] [Maniphest] [Claimed] T152068: GCI: Document unit test decorators

2016-12-05 Thread Dargasea
Dargasea claimed this task. TASK DETAILhttps://phabricator.wikimedia.org/T152068EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: Dargasea, Aklapper, pywikibot-bugs-list, jayvdb, SacredWKnight, D3r1ck01, Jay8g

[Pywikipedia-bugs] [Maniphest] [Triaged] T152435: super setUp()s and tearDown()s in unit test cases

2016-12-05 Thread Dargasea
Dargasea triaged this task as "Low" priority. TASK DETAILhttps://phabricator.wikimedia.org/T152435EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: Aklapper, TerraCodes, pywikibot-bugs-list, Dargasea, JakeTh

[Pywikipedia-bugs] [Maniphest] [Created] T152435: super setUp()s and tearDown()s in unit test cases

2016-12-05 Thread Dargasea
Dargasea created this task.Dargasea added projects: Pywikibot-tests, Easy.Herald added subscribers: pywikibot-bugs-list, TerraCodes, Aklapper. TASK DESCRIPTIONCurrently same test cases, like tests.http_tests.TestGetAuthenticationConfig, inherit from tests.aspects.TestCase, but do not super the

[Pywikipedia-bugs] [Maniphest] [Updated] T152365: Use comms.http.fetch() for LinkChecker in weblinkchecker

2016-12-04 Thread Dargasea
Dargasea added a comment. T113140 was the previous effort to use requests.TASK DETAILhttps://phabricator.wikimedia.org/T152365EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: Aklapper, pywikibot-bugs-list, Dargasea, Magul, MayS, Mdupont, JJMC89

[Pywikipedia-bugs] [Maniphest] [Created] T152365: Use comms.http.fetch() for LinkChecker in weblinkchecker

2016-12-04 Thread Dargasea
Dargasea created this task.Dargasea added a project: Pywikibot-core.Herald added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTIONCurrently pywikibot.comms.http.fetch() provides the ability to make HTTP requests (using pywikibot.comms.threadedhttp module), and its use_fake_user_agent

[Pywikipedia-bugs] [Maniphest] [Updated] T152075: Automatic use of fake user agent for bot-unfriendly sites

2016-12-03 Thread Dargasea
Dargasea added a comment. Update: Maintain a list of problematic sites in the configuration file This has been worked on, but: automatic use of fallback logic I am debating if this should be implemented. Currently I'm thinking of HTTP status codes, but I thought if a server returns some

[Pywikipedia-bugs] [Maniphest] [Claimed] T152075: Automatic use of fake user agent for bot-unfriendly sites

2016-12-01 Thread Dargasea
Dargasea claimed this task.Dargasea added a comment. Thanks!TASK DETAILhttps://phabricator.wikimedia.org/T152075EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: jayvdb, Aklapper, TerraCodes, pywikibot-bugs-list, Dargasea, Magul, MayS, Mdupont

[Pywikipedia-bugs] [Maniphest] [Commented On] T152075: Automatic use of fake user agent for bot-unfriendly sites

2016-12-01 Thread Dargasea
Dargasea added a comment. In T152075#2837739, @jayvdb wrote: i.e. we would add a use_fake_user_agent parameter to methods in http.comms, which is False by default, True forces a fake user-agent, and None means automatic use of fallback logic (use fake if in the config list, otherwise try with

[Pywikipedia-bugs] [Maniphest] [Retitled] T152075: Automatic use of fake user agent for bot-unfriendly sites

2016-12-01 Thread Dargasea
Dargasea changed the title from "Extraneous config toggle for fake user agent " to "Automatic use of fake user agent for bot-unfriendly sites". TASK DETAILhttps://phabricator.wikimedia.org/T152075EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailprefer

[Pywikipedia-bugs] [Maniphest] [Updated] T152075: Extraneous config toggle for fake user agent

2016-12-01 Thread Dargasea
Dargasea added a parent task: T113596: reflinks.py work with old user agent. TASK DETAILhttps://phabricator.wikimedia.org/T152075EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: jayvdb, Aklapper, TerraCodes, pywikibot-bugs-list, Dargasea, Magul

[Pywikipedia-bugs] [Maniphest] [Updated] T113596: reflinks.py work with old user agent

2016-12-01 Thread Dargasea
Dargasea added a subtask: T152075: Extraneous config toggle for fake user agent . TASK DETAILhttps://phabricator.wikimedia.org/T113596EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MtDu, DargaseaCc: TerraCodes, gerritbot, MtDu, Nemo_bis, 8ohit.dua, jayvdb

[Pywikipedia-bugs] [Maniphest] [Commented On] T152075: Extraneous config toggle for fake user agent

2016-12-01 Thread Dargasea
Dargasea added a comment. This task needs a little analysis to determine why the default is None None behaves the same way as True (if set a value, UA becomes that value. if False, default UA returned). The default is Introduced since the patch was submitted and unchanged since then. Potential

[Pywikipedia-bugs] [Maniphest] [Triaged] T152075: Extraneous config toggle for fake user agent

2016-12-01 Thread Dargasea
Dargasea triaged this task as "Low" priority. TASK DETAILhttps://phabricator.wikimedia.org/T152075EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DargaseaCc: Aklapper, TerraCodes, pywikibot-bugs-list, Dargasea, Magul, MayS, Mdupont, JJMC89, Muha

[Pywikipedia-bugs] [Maniphest] [Updated] T124005: Create tests for fake user agent

2016-11-30 Thread Dargasea
Dargasea added a comment. If T152075 completes, we should remove config.fake_user_agent = None from the test case.TASK DETAILhttps://phabricator.wikimedia.org/T124005EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jayvdb, DargaseaCc: Dargasea, TerraCodes

[Pywikipedia-bugs] [Maniphest] [Created] T152075: Extraneous config toggle for fake user agent

2016-11-30 Thread Dargasea
Dargasea created this task.Dargasea added projects: Easy, Pywikibot-core.Herald added subscribers: TerraCodes, Aklapper. TASK DESCRIPTIONCurrent logic: if config.fake_user_agent is None or config.fake_user_agent is True: The value of config.fake_user_agent should either be True, False or an user

[Pywikipedia-bugs] [Maniphest] [Assigned] T124005: Create tests for fake user agent

2016-11-30 Thread Dargasea
Dargasea assigned this task to jayvdb.Dargasea added a comment. Patch 324633 has been submitted on Geritt, which should resolve this. John: could you please code check?TASK DETAILhttps://phabricator.wikimedia.org/T124005EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel