[Pywikipedia-bugs] [Maniphest] [Triaged] T180313: test_valid_lagpattern is failing on wsbeta

2017-11-12 Thread Dalba
Dalba triaged this task as "Normal" priority.
TASK DETAILhttps://phabricator.wikimedia.org/T180313EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DalbaCc: gerritbot, Aklapper, pywikibot-bugs-list, Dalba, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T180313: test_valid_lagpattern is failing on wsbeta

2017-11-12 Thread gerritbot
gerritbot added a project: Patch-For-Review.
TASK DETAILhttps://phabricator.wikimedia.org/T180313EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Dalba, gerritbotCc: gerritbot, Aklapper, pywikibot-bugs-list, Dalba, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T180313: test_valid_lagpattern is failing on wsbeta

2017-11-12 Thread Dalba
Dalba created this task.Dalba added projects: Pywikibot-core, Pywikibot-tests.Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTIONhttps://travis-ci.org/wikimedia/pywikibot-core/jobs/300874983#L1871

_ TestLagpattern.test_valid_lagpattern _

self = 

def test_valid_lagpattern(self):

"""Test whether api.lagpattern is valid."""

mysite = self.get_site()

if mysite.siteinfo['dbrepllag'][0]['lag'] == -1:

raise unittest.SkipTest(

'{0} is not running on a replicated database cluster.'

.format(mysite)

)

mythrottle = DummyThrottle(mysite)

mysite._throttle = mythrottle

params = {'action': 'query',

  'titles': self.get_mainpage().title(),

  'maxlag': -1}

req = api.Request(site=mysite, parameters=params)

try:

req.submit()

except SystemExit:

pass  # expected exception from DummyThrottle instance

except api.APIError as e:

pywikibot.warning(

'Wrong api.lagpattern regex, cannot retrieve lag value')

>   raise e

tests/api_tests.py:1066: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tests/api_tests.py:1060: in test_valid_lagpattern

req.submit()

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = pywikibot.data.api.Request'/w/api.php?meta=userinfo=Main+Page=-1="">>

def submit(self):

"""

Submit a query and parse the response.



@return: a dict containing data retrieved from api.php

@rtype: dict

"""

self._add_defaults()

if (not config.enable_GET_without_SSL and

self.site.protocol() != 'https' or

self.site.is_oauth_token_available()):  # work around T108182

use_get = False

elif self.use_get is None:

if self.action == 'query':

# for queries check the query module

modules = set()

for mod_type_name in ('list', 'prop', 'generator'):

modules.update(self._params.get(mod_type_name, []))

else:

modules = set([self.action])

if modules:

self.site._paraminfo.fetch(modules)

use_get = all('mustbeposted' not in self.site._paraminfo[mod]

  for mod in modules)

else:

# If modules is empty, just 'meta' was given, which doesn't

# require POSTs, and is required for ParamInfo

use_get = True

else:

use_get = self.use_get

while True:

paramstring = self._http_param_string()

simulate = self._simulate(self.action)

if simulate:

return simulate

if self.throttle:

self.site.throttle(write=self.write)

else:

pywikibot.log(

"Submitting unthrottled action '{0}'.".format(self.action))

uri = self.site.scriptpath() + "/api.php"

try:

if self.mime:

(headers, body) = Request._build_mime_request(

self._encoded_items(), self.mime_params)

use_get = False  # MIME requests require HTTP POST

else:

headers = {'Content-Type': 'application/x-www-form-urlencoded'}

if (not self.site.maximum_GET_length() or

self.site.maximum_GET_length() < len(paramstring)):

use_get = False

if use_get:

uri = '{0}?{1}'.format(uri, paramstring)

body = None

else:

body = paramstring



pywikibot.debug('API request to {0} (uses get: {1}):\n'

'Headers: {2!r}\nURI: {3!r}\n'

'Body: {4!r}'.format(self.site, use_get,

 headers, uri, body),

_logger)



rawdata = http.request(

site=self.site, uri=uri, method='GET' if use_get else 'POST',

body=body, headers=headers)

except Server504Error:

pywikibot.log(u"Caught HTTP 504 error; retrying")

self.wait()

continue

except Server414Error:

if use_get:

pywikibot.log('Caught HTTP 414 error; retrying')

use_get = False

self.wait()


[Pywikipedia-bugs] [Maniphest] [Closed] T129059: version.py result is wrongly OUTDATED

2017-11-12 Thread Dalba
Dalba closed this task as "Resolved".Dalba assigned this task to Legoktm.
TASK DETAILhttps://phabricator.wikimedia.org/T129059EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Legoktm, DalbaCc: Dalba, TerraCodes, Dvorapa, Aklapper, pywikibot-bugs-list, Xqt, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Luke081515, jayvdb, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T129059: version.py result is wrongly OUTDATED

2017-11-12 Thread Dalba
Dalba added a comment.

In T129059#3753557, @Dvorapa wrote:
This should be fixed by this recent change (and for me it is), is this still a bug?


I'm still getting OUTDATED status:

Pywikibot: [ssh] pywikibot-core.git (1f41375, g8748, 2017/11/12, 15:21:28, OUTDATED)TASK DETAILhttps://phabricator.wikimedia.org/T129059EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DalbaCc: Dalba, TerraCodes, Dvorapa, Aklapper, pywikibot-bugs-list, Xqt, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Luke081515, jayvdb, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T129059: version.py result is wrongly OUTDATED

2017-11-12 Thread Dvorapa
Dvorapa added a project: TestMe.Dvorapa added a comment.Herald added a subscriber: TerraCodes.
This should be fixed by this change, is this still a bug?TASK DETAILhttps://phabricator.wikimedia.org/T129059EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DvorapaCc: TerraCodes, Dvorapa, Aklapper, pywikibot-bugs-list, Xqt, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Luke081515, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T180309: reflinks.py changes existing ref names and do not observe ref groups in templates

2017-11-12 Thread Masti
Masti created this task.Masti added a project: Pywikibot-Other-scripts.Herald added subscribers: pywikibot-bugs-list, Aklapper.Herald added a project: Internet-Archive.
TASK DESCRIPTIONas reflinks.py by default runs renerence deduplication it breaks existing ref groups if templates are used .
in the example below it changes existing group name from  to autogenerated  
in the result it breaks the connection to ref groups introduced by templates  {{r|CIAAW}}{{u|CIAAW}}
{{r}} is connected to grouped References - english equivalent {{r})
{{u}} is connected to grouped Notes

$ python pwb.py reflinks.py -page:Azot -lang:pl
Retrieving 1 pages from wikipedia:pl.
PDF file.
Bad link : http://web.archive.org/web/20140226213530/http://cybra.lodz.pl/Content/291/ChePol+X+12.pdf in [[Azot]]

Azot <<<

@@ -178 +178 @@


* {{IUPAC-SAW2013}}


+ * {{IUPAC-SAW2013}}

Script should not change the name of the reference if it finds one. 
Or to introduce a new switch -nodedup to disalow deduplication.

More complex is to observe all reference group introducing templates but that would be to time consuming to implementTASK DETAILhttps://phabricator.wikimedia.org/T180309EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MastiCc: Aklapper, pywikibot-bugs-list, Masti, Jay8g___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T180308: reflinks.py [SSL: CERTIFICATE_VERIFY_FAILED]

2017-11-12 Thread Masti
Masti edited projects, added Pywikibot-Other-scripts; removed Internet-Archive.Herald added a subscriber: pywikibot-bugs-list.
TASK DETAILhttps://phabricator.wikimedia.org/T180308EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MastiCc: pywikibot-bugs-list, Masti, Aklapper___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T102315: pywikibot support for https-only

2017-11-12 Thread gerritbot
gerritbot added a comment.
Change 390872 had a related patch set uploaded (by Dalba; owner: Dalba):
[pywikibot/core@master] Use http scheme for Wikidata entity URIs

https://gerrit.wikimedia.org/r/390872TASK DETAILhttps://phabricator.wikimedia.org/T102315EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Framawiki, gerritbotCc: Lokal_Profil, Framawiki, gerritbot, Xqt, Andrew, StudiesWorld, Ricordisamoa, XZise, BBlack, Nemo_bis, Tony_Tan_98, Aklapper, jayvdb, pywikibot-bugs-list, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T102315: pywikibot support for https-only

2017-11-12 Thread Lokal_Profil
Lokal_Profil added a comment.
I'm not sure those last wikidata links should have been changed, per T153563. See note in https://gerrit.wikimedia.org/r/390872TASK DETAILhttps://phabricator.wikimedia.org/T102315EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Framawiki, Lokal_ProfilCc: Lokal_Profil, Framawiki, gerritbot, Xqt, Andrew, StudiesWorld, Ricordisamoa, XZise, BBlack, Nemo_bis, Tony_Tan_98, Aklapper, jayvdb, pywikibot-bugs-list, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T179232: TestFactoryGeneratorWikibase.test_searchitem_language is failing

2017-11-12 Thread Dalba
Dalba added a comment.
Failed again. AFAK search result are non-deterministic, we probably should rewrite the test to not rely on the order of search results.TASK DETAILhttps://phabricator.wikimedia.org/T179232EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: DalbaCc: Xqt, gerritbot, Aklapper, pywikibot-bugs-list, Dalba, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T180289: CategoryAddBot removes not affected categories when not in english

2017-11-12 Thread gerritbot
gerritbot added a comment.
Change 390777 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] keeping categories from non-english sites

https://gerrit.wikimedia.org/r/390777TASK DETAILhttps://phabricator.wikimedia.org/T180289EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Chicocvenancio, gerritbotCc: gerritbot, Aklapper, Chicocvenancio, pywikibot-bugs-list, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Lewizho99, Maathavan___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Closed] T180289: CategoryAddBot removes not affected categories when not in english

2017-11-12 Thread Xqt
Xqt triaged this task as "Normal" priority.Xqt closed this task as "Resolved".
TASK DETAILhttps://phabricator.wikimedia.org/T180289EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Chicocvenancio, XqtCc: gerritbot, Aklapper, Chicocvenancio, pywikibot-bugs-list, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Lewizho99, Maathavan___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs