[Pywikibot-commits] [Gerrit] pywikibot/core[master]: [doc] Prepare next release

2019-07-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/524741 )

Change subject: [doc] Prepare next release
..

[doc] Prepare next release

Change-Id: Iff4acf1949a7c5380f1d4c559383863312272c3f
---
M HISTORY.rst
M docs/conf.py
2 files changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/HISTORY.rst b/HISTORY.rst
index 95ff932..f6694f9 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,12 @@
 Current release
 ---

+* Bugfixes and improvements
+* Localisation updates
+
+3.0.20190722
+
+
 * Increase the throttling delay if maxlag >> retry-after (T210606)
 * deprecate test_family: Site('test', 'test'), use wikipedia_family: 
Site('test', 'wikipedia') instead (T228375, T228300)
 * Add "user_agent_description" option in config.py
diff --git a/docs/conf.py b/docs/conf.py
index cd50360..db93772 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -71,7 +71,7 @@
 # The short X.Y version.
 version = '3.0'
 # The full version, including alpha/beta/rc tags.
-release = '3.0.20190430'
+release = '3.0.20190722'

 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

--
To view, visit https://gerrit.wikimedia.org/r/524741
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iff4acf1949a7c5380f1d4c559383863312272c3f
Gerrit-Change-Number: 524741
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot (75)
___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikipedia-bugs] [Maniphest] [Updated] T189321: Support for Lexicographical data/WikibaseLexeme in Pywikibot

2019-07-22 Thread Maintenance_bot
Maintenance_bot removed a project: Patch-For-Review.

TASK DETAIL
  https://phabricator.wikimedia.org/T189321

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Maintenance_bot
Cc: Mike_Peel, Alicia_Fagerving_WMSE, Lokal_Profil, Njardarlogar, JAnD, jayvdb, 
Framawiki, Masti, Aklapper, pywikibot-bugs-list, matej_suchanek, darthmon_wmde, 
Viztor, DannyS712, Nandana, Wenyi, Mringgaard, Sario528, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, mys_721tx, 
Wikidata-bugs, aude, Ricordisamoa, Dalba, Darkdadaah, Alchimista, Mbch331, Rxy, 
Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, joker88john, 
CucyNoiD, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, 
Adrian1985, Cpaulf30, Af420, Darkminds3113, Bsandipan, Lordiis, Adik2382, 
Th3d3v1ls, Ramalepe, Liugev6, WSH1906, Lewizho99, Maathavan
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T189321: Support for Lexicographical data/WikibaseLexeme in Pywikibot

2019-07-22 Thread gerritbot
gerritbot added a comment.


  Change 522597 **merged** by jenkins-bot:
  [pywikibot/core@master] [FEAT] Introduce WikibaseEntity class
  
  https://gerrit.wikimedia.org/r/522597

TASK DETAIL
  https://phabricator.wikimedia.org/T189321

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Mike_Peel, Alicia_Fagerving_WMSE, Lokal_Profil, Njardarlogar, JAnD, jayvdb, 
Framawiki, Masti, Aklapper, pywikibot-bugs-list, matej_suchanek, Hook696, 
Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, darthmon_wmde, joker88john, 
Viztor, DannyS712, CucyNoiD, Nandana, NebulousIris, Wenyi, Mringgaard, 
Gaboe420, Versusxo, Majesticalreaper22, Sario528, Giuliamocci, Adrian1985, 
Cpaulf30, Lahi, Gq86, Af420, Darkminds3113, Bsandipan, Lordiis, 
GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Tbscho, 
MayS, LawExplorer, WSH1906, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, 
_jensen, rosalieper, Altostratus, Avicennasis, mys_721tx, Wikidata-bugs, aude, 
Ricordisamoa, Dalba, Darkdadaah, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikibot-commits] [Gerrit] pywikibot/core[master]: [FEAT] Introduce WikibaseEntity class

2019-07-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/522597 )

Change subject: [FEAT] Introduce WikibaseEntity class
..

[FEAT] Introduce WikibaseEntity class

This class should be base class for all classes
which hold some data on a Wikibase repository.
First step for supporting lexicographical data
and structured data on Commons.

For now, it doesn't hold any data and doesn't communicate
with API at all.

This patch also includes several refactorings, bugfixes
and code cleanup.

Bug: T189321
Change-Id: If9661a48fa899a5544fc403d0d7c0764e2bd9413
---
M pywikibot/page.py
1 file changed, 193 insertions(+), 117 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page.py b/pywikibot/page.py
index f93dbd9..48f6789 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3706,7 +3706,104 @@
 return self.isRegistered() and 'bot' not in self.groups()


-class WikibasePage(BasePage):
+class WikibaseEntity(object):
+
+"""
+The base interface for Wikibase entities.
+
+Each entity is identified by a data repository it belongs to
+and an identifier.
+"""
+
+def __init__(self, repo, id_=None):
+"""
+Initializer.
+
+@param repo: Entity repository.
+@type repo: DataSite
+@param id_: Entity identifier.
+@type id_: str or None, -1 and None mean non-existing
+"""
+self.repo = repo
+self.id = id_ if id_ is not None else '-1'
+if self.id != '-1' and not self.is_valid_id(self.id):
+raise pywikibot.InvalidTitle(
+"'%s' is not a valid %s page title"
+% (self.id, self.entity_type))
+
+def __repr__(self):
+if self.id != '-1':
+return 'pywikibot.page.{0}({1!r}, {2!r})'.format(
+self.__class__.__name__, self.repo, self.id)
+else:
+return 'pywikibot.page.{0}({1!r})'.format(
+self.__class__.__name__, self.repo)
+
+@classmethod
+def is_valid_id(cls, entity_id):
+"""
+Whether the string can be a valid id of the entity type.
+
+@param entity_id: The ID to test.
+@type entity_id: basestring
+
+@rtype: bool
+"""
+if not hasattr(cls, 'title_pattern'):
+return True
+
+# todo: use re.fullmatch when Python 3.4+ required
+return bool(re.match(cls.title_pattern + '$', entity_id))
+
+def _defined_by(self, singular=False):
+"""
+Internal function to provide the API parameters to identify the entity.
+
+An empty dict is returned if the entity has not been created yet.
+
+@param singular: Whether the parameter names should use the singular
+ form
+@type singular: bool
+@return: API parameters
+@rtype: dict
+"""
+params = {}
+if self.id != '-1':
+if singular:
+params['id'] = self.id
+else:
+params['ids'] = self.id
+return params
+
+def getID(self, numeric=False):
+"""
+Get the identifier of this entity.
+
+@param numeric: Strip the first letter and return an int
+@type numeric: bool
+"""
+if numeric:
+return int(self.id[1:]) if self.id != '-1' else -1
+else:
+return self.id
+
+def get_data_for_new_entity(self):
+"""
+Return data required for creation of a new entity.
+
+Override it if you need.
+
+@rtype: dict
+"""
+return {}
+
+def concept_uri(self):
+"""Return the full concept URI."""
+# todo: raise when self.id is -1
+return '{0}{1}'.format(self.repo.concept_base_uri, self.id)
+
+
+class WikibasePage(BasePage, WikibaseEntity):

 """
 The base page for the Wikibase extension.
@@ -3784,12 +3881,12 @@
 self._namespace = entity_type_ns
 kwargs['ns'] = self._namespace.id

-super(WikibasePage, self).__init__(site, title, **kwargs)
+BasePage.__init__(self, site, title, **kwargs)

 # If a title was not provided,
 # avoid checks which may cause an exception.
 if not title:
-self.repo = site
+WikibaseEntity.__init__(self, site)
 return

 if self._namespace:
@@ -3808,66 +3905,14 @@
 raise ValueError('%r: Namespace "%r" is not valid'
  % (self.site, ns))

-# .site forces a parse of the Link title to determine site
-self.repo = self.site
-# Link.__init__, called from Page.__init__, has cleaned the title
-# stripping whitespace and uppercasing the first letter according
-# to the namespace case=first-letter.
-self.id = self._link.title
- 

[Pywikipedia-bugs] [Maniphest] [Commented On] T220828: archivebot.py: don't reorder template parameters

2019-07-22 Thread Jeff_G
Jeff_G added a comment.


  In T220828#5352582 , @whym 
wrote:
  
  > Note to @Jeff_G:  you might still see the bug on Commons, but that's 
expected. It might take some time before I update ArchiverBot@Commons to 
reflect the bug fix. (Maybe next weekend.)
  
  Thanks.

TASK DETAIL
  https://phabricator.wikimedia.org/T220828

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, Jeff_G
Cc: Mpaa, Xqt, Dvorapa, pywikibot-bugs-list, Aklapper, whym, Jeff_G, 
MattLongCT, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Altostratus, Avicennasis, mys_721tx, 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] [Commented On] T227409: setup.py sdist gives different egg-info for pypi package

2019-07-22 Thread gerritbot
gerritbot added a comment.


  Change 524793 had a related patch set uploaded (by Xqt; owner: Xqt):
  [pywikibot/core@master] [setup] Combine setup requirements for different 
python versions
  
  https://gerrit.wikimedia.org/r/524793

TASK DETAIL
  https://phabricator.wikimedia.org/T227409

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Dalba, Aklapper, Xqt, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
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] T227409: setup.py sdist gives different egg-info for pypi package

2019-07-22 Thread gerritbot
gerritbot added a project: Patch-For-Review.

TASK DETAIL
  https://phabricator.wikimedia.org/T227409

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Dalba, Aklapper, Xqt, pywikibot-bugs-list, Hook696, Daryl-TTMG, 
RomaAmorRoma, 0010318400, E.S.A-Sheild, joker88john, Viztor, DannyS712, 
CucyNoiD, NebulousIris, Wenyi, Gaboe420, Versusxo, Majesticalreaper22, 
Giuliamocci, Adrian1985, Cpaulf30, Af420, Darkminds3113, Bsandipan, Lordiis, 
Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Tbscho, MayS, WSH1906, Lewizho99, 
Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Triaged] T227409: setup.py sdist gives different egg-info for pypi package

2019-07-22 Thread Xqt
Xqt triaged this task as "Normal" priority.

TASK DETAIL
  https://phabricator.wikimedia.org/T227409

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Dalba, Aklapper, Xqt, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikibot-commits] [Gerrit] pywikibot/i18n[master]: Localisation updates from https://translatewiki.net.

2019-07-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/524762 )

Change subject: Localisation updates from https://translatewiki.net.
..

Localisation updates from https://translatewiki.net.

Change-Id: Ib1dd681086626ce0381105448ae644bb00ab6be2
---
A archivebot/tg.json
A basic/tg.json
A blockpageschecker/tg.json
A capitalize_redirects/tg.json
A casechecker/tg.json
A catall/tg.json
A category/tg.json
M category_redirect/he.json
A thirdparty/tg.json
A welcome/tg.json
10 files changed, 83 insertions(+), 0 deletions(-)

Approvals:
  L10n-bot: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/archivebot/tg.json b/archivebot/tg.json
new file mode 100644
index 000..4c9518d
--- /dev/null
+++ b/archivebot/tg.json
@@ -0,0 +1,12 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "archivebot-archive-full": "(БОЙГОНӢ ПУР ШУД)",
+   "archivebot-archive-summary": "Бот: Бойгонишуда %(count)d 
{{PLURAL:%(count)d|мавзӯъ}} аз [[%(from)s]]",
+   "archivebot-archiveheader": "{{бойгонии баҳс}}",
+   "archivebot-older-than": "{{PLURAL:%(count)d|калонтар}} аз 
%(duration)s",
+   "archivebot-page-summary": "Бот: Бойгонишавии %(count)d 
{{PLURAL:%(count)d|мавзӯъ|мавзӯъҳо}} (%(why)s) барои %(archives)s"
+}
diff --git a/basic/tg.json b/basic/tg.json
new file mode 100644
index 000..925e2ae
--- /dev/null
+++ b/basic/tg.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "basic-changing": "Бот: Тағйир медиҳад..."
+}
diff --git a/blockpageschecker/tg.json b/blockpageschecker/tg.json
new file mode 100644
index 000..cf40d48
--- /dev/null
+++ b/blockpageschecker/tg.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "blockpageschecker-summary": "Бот: Шаблони куҳнашударо ҳазф мекунад"
+}
diff --git a/capitalize_redirects/tg.json b/capitalize_redirects/tg.json
new file mode 100644
index 000..ab99055
--- /dev/null
+++ b/capitalize_redirects/tg.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "capitalize_redirects-create-redirect": "Бот: Тағйири масир ба 
[[%(to)s]] эҷод мекунад."
+}
diff --git a/casechecker/tg.json b/casechecker/tg.json
new file mode 100644
index 000..b553078
--- /dev/null
+++ b/casechecker/tg.json
@@ -0,0 +1,11 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "casechecker-delete-reason": "Ин тағйири иасир барои нишондиҳӣ ба 
%(target)s истифода мешавад.",
+   "casechecker-delete-summary": "Бот: Тағйири масир дар унвонаш омехта 
ҳуруфҳои кирилӣ ва лотинӣ дорад",
+   "casechecker-rename": "Бот: тағйирдиҳии номи регистри омехта",
+   "casechecker-replacement-linklist": "%(source)s→%(target)s"
+}
diff --git a/catall/tg.json b/catall/tg.json
new file mode 100644
index 000..ef221e1
--- /dev/null
+++ b/catall/tg.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "catall-changing": "Бот: Тағйири гурӯҳҳо"
+}
diff --git a/category/tg.json b/category/tg.json
new file mode 100644
index 000..5bd8a6c
--- /dev/null
+++ b/category/tg.json
@@ -0,0 +1,9 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "category-adding": "Бот: Иловаи гурӯҳ 
[[:Category:%(newcat)s|%(newcat)s]]",
+   "category-also-in": "(ҳамчунин дар %(alsocat)s)"
+}
diff --git a/category_redirect/he.json b/category_redirect/he.json
index 861194e..80a9e77 100644
--- a/category_redirect/he.json
+++ b/category_redirect/he.json
@@ -20,6 +20,7 @@
"category_redirect-log-ignoring": "* מתעלם מ־%(oldcat)s",
"category_redirect-log-loop": "* לולאת הפנייה מהמיקום %(oldcat)s",
"category_redirect-log-moved": "* %(oldcat)s: %(found)d נמצאו, 
%(moved)d הועברו",
+   "category_redirect-log-move-error": "* %(oldcat)s: שגיאה 
ב־move_contents",
"category_redirect-log-not-loaded": "* לא ניתן לטעון %(oldcat)s; מתעלם",
"category_redirect-problem-redirects": "# %(oldcat)s מפנה ל־%(redpage)s"
 }
diff --git a/thirdparty/tg.json b/thirdparty/tg.json
new file mode 100644
index 000..b9d5d0a
--- /dev/null
+++ b/thirdparty/tg.json
@@ -0,0 +1,10 @@
+{
+   "@metadata": {
+   "authors": [
+   "ToJack"
+   ]
+   },
+   "thirdparty-drtrigonbot-sum_disc-notify-new": "Баҳси нав",
+   "thirdparty-drtrigonbot-sum_disc-notify-notify": "Огоҳӣ",
+   "thirdparty-drtrigonbot-sum_disc-summary-head": "бот"
+}
diff --git 

[Pywikipedia-bugs] [Maniphest] [Commented On] T228652: test_watchlist_revs of tests.site_tests.SiteWatchlistRevsTestCase fails some times

2019-07-22 Thread Xqt
Xqt added a comment.


  There is a more informative traceback found:
  
=== FAILURES 
===
___ TestUserWatchedPages.test_watched_pages 


self = 

def test_watched_pages(self):
"""Test the site.watched_pages() method."""
gen = self.site.watched_pages(total=5, force=False)
self.assertIsInstance(gen.request, api.CachedRequest)
>   for page in gen:

tests/site_tests.py:1566: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
pywikibot/data/api.py:2807: in __iter__
self.data = self.request.submit()
pywikibot/data/api.py:2234: in submit
self._data = super(CachedRequest, self).submit()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 

self = 
pywikibot.data.api.CachedRequest'/w/api.php?prop=info|imageinfo|categoryinfo=protection=t...tchlistraw=query===5=userinfo=blockinfo|hasmsg=5=json'>

def submit(self):
"""
Submit a query and parse the response.

@return: a dict containing data retrieved from api.php
@rtype: dict
"""
self._add_defaults()
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))

use_get, uri, body, headers = self._get_request_params(use_get,
   
paramstring)
rawdata, use_get = self._http_request(use_get, uri, body, 
headers,
  paramstring)
if rawdata is None:
continue

result = self._json_loads(rawdata)
if result is None:
continue

if self._userinfo_query(result):
continue

self._handle_warnings(result)

if 'error' not in result:
return result

error = result['error'].copy()
for key in result:
if key in ('error', 'warnings'):
continue
assert key not in error
assert isinstance(result[key], UnicodeType), \
'Unexpected %s: %r' % (key, result[key])
error[key] = result[key]

if '*' in result['error']:
# help text returned
result['error']['help'] = result['error'].pop('*')
code = result['error'].setdefault('code', 'Unknown')
info = result['error'].setdefault('info', None)

if not self._logged_in(code):
continue

if code == 'maxlag':
lag = lagpattern.search(info)
pywikibot.log('Pausing due to database lag: ' + info)
if lag:
lag = lag.group('lag')
self.site.throttle.lag(int(lag or 0))
continue

elif code == 'help' and self.action == 'help':
# The help module returns an error result with the complete
# API information. As this data was requested, return the
# data instead of raising an exception.
return {'help': {'mime': 'text/plain',
 'help': result['error']['help']}}

pywikibot.warning('API error %s: %s' % (code, info))

if self._internal_api_error(code, error, result):
continue

# Phab. tickets T48535, T64126, T68494, T68619
if code == 'failed-save' and \
   self.action == 'wbeditentity' and \
   self._is_wikibase_error_retryable(result['error']):
self.wait()
continue

# If readapidenied is returned try to login
if code == 'readapidenied' and self.site._loginstatus in (-3, 
-1):
self.site.login()
continue

if self._bad_token(code):
continue

if 'mwoauth-invalid-authorization' in code:
if 'Nonce already used' 

[Pywikipedia-bugs] [Maniphest] [Created] T228652: test_watchlist_revs of tests.site_tests.SiteWatchlistRevsTestCase fails some times

2019-07-22 Thread Xqt
Xqt created this task.
Xqt added a project: Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
Restricted Application added a project: Pywikibot.

TASK DESCRIPTION
  test_watchlist_revs of tests.site_tests.SiteWatchlistRevsTestCase fails some 
times due to pywikibot.data.api.APIError: notloggedin Exception
  
==
ERROR: test_watchlist_revs (tests.site_tests.SiteWatchlistRevsTestCase)
Test the site.watchlist_revs() method.
--
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot/tests/site_tests.py", line 
1834, in test_watchlist_revs
for rev in mysite.watchlist_revs(minor=False, total=5):
  File "/home/travis/build/wikimedia/pywikibot/pywikibot/data/api.py", line 
2807, in __iter__
self.data = self.request.submit()
  File "/home/travis/build/wikimedia/pywikibot/pywikibot/data/api.py", line 
2079, in submit
raise APIError(**result['error'])
pywikibot.data.api.APIError: notloggedin: Please log in to view or edit 
items on your watchlist. [help:See https://zh.wikisource.org/w/api.php for API 
usage. Subscribe to the mediawiki-api-announce mailing list at 
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce; for 
notice of API deprecations and breaking changes.]

--

TASK DETAIL
  https://phabricator.wikimedia.org/T228652

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 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] [Triaged] T228652: test_watchlist_revs of tests.site_tests.SiteWatchlistRevsTestCase fails some times

2019-07-22 Thread Xqt
Xqt triaged this task as "Normal" priority.

TASK DETAIL
  https://phabricator.wikimedia.org/T228652

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, 
Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


Re: [pywikibot] getInterwiki

2019-07-22 Thread info
One posioility is to extract interwiki links from a Page.text by using 
textlib.getLanguageLinks(); interwikidata.py uses that method. The other way is 
using Page.langlinks(), Page.iterlanglinks() or Site.pagelanglinks() which uses 
the API and they should still work.

Best
xqt

> masti mailto:mast...@gmail.com > hat am 22. Juli 2019 um 
> 10:55 geschrieben:
> 
> 
> It used to be a getInterwiki method before Wikidata era.
> What is the easiest way to get them instead of parsing sitelinks list of
> WD object?
> 
> masti
> 
> ___
> pywikibot mailing list
> pywikibot@lists.wikimedia.org mailto:pywikibot@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikibot
> 
___
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot


[pywikibot] New stable release "3.0.20190722"

2019-07-22 Thread info
Hi folks,


a new stable release "3.0.20190722" was deployed which is available at pypi (as 
side package without scripts) or from our repository with the tags 
"3.0.20190430" and "stable". There was a long time between this stable branch 
and the previous one. The main reason was the implementation of sitelink badges 
and the implementation of closed wiki access which needed some additional work 
to get all tests passing.

Please note that the last release is always tagged with the "stable" tag. For 
production systems you should always use this branch instead of master branch 
because master is under perpetual development (see T217908 at phabricator). 
PAWS is also based on the stable tagged release.

There are currently 96,697 lines of code.

The following changes where comming with this change:

Important changes which needs operator's attention:

* Deprecation warning: support for Python 2 will be dropped in 2020 (T213287). 
Please update your Python.

* deprecate test_family, use wikipedia_family: Site('test', 'wikipedia') 
instead (T228375, T228300). To have access to test wiki you should instantiate 
the site object by Site('test', 'wikipedia') instead of Site('test', 'test'). 
The old method can be used further but can be dropped.

* remove the unimplemented "proxy" variable in config.py. You should remove it 
from user-config.py too.

Other changes:

* Increase the throttling delay if maxlag >> retry-after (T210606)
* deprecate test_family: Site('test', 'test'), use wikipedia_family: 
Site('test', 'wikipedia') instead (T228375, T228300)
* Add "user_agent_description" option in config.py
* APISite.fromDBName works for all known dbnames (T225590, 225723, 226960)
* Make Family.langs property more robust (T226934)
* Remove strategy family
* Handle closed_wikis as read-only (T74674)
* TokenWallet: login automatically
* Add closed_wikis to Family.langs property (T225413)
* Redirect 'mo' site code to 'ro' and remove interwiki_replacement_overrides 
(T225417, T89451)
* Add support for badges on Wikibase item sitelinks (T128202)
* Remove login.showCaptchaWindow() method
* New parameter supplied in suggest_help function for missing dependencies
* Remove NonMWAPISite class
* Introduce Claim.copy and prevent adding already saved claims (T220131)
* Fix create_short_link method after MediaWiki changes (T223865)
* Validate proofreadpage.IndexPage contents before saving it
* Refactor Link and introduce BaseLink (T66457)
* Count skipped pages in BaseBot class
* 'actionthrottledtext' is a retryable wikibase error (T192912)
* Clear tokens on logout(T222508)
* botirc.IRCBot has been dropped
* Avoid using outdated browseragents (T222959)
* textlib: avoid infinite execution of regex (T222671)
* Add CSRF token in sitelogout() api call (T222508)
* Refactor WikibasePage.get and overriding methods and improve documentation
* Improve title patterns of WikibasePage extensions
* Add support for property creation (T160402)

For older changes refer HISTORY.rst.

Also some changes for scripts where made like:

* A lot of commoncat messages got twn support (219094)
* script_wui.py was dropped and moved to archive folder (T222759)
* default sign was added to welcome.py (T223044)
* Quit option was added to disambredir.py (T223048)
* Use additional twn messages with checkimages.py (T220178)
* redirect.py does no longer fail for RuntimeError retrieving missing redirects 
(T130911)
* Make transferbot.py continue when targetpage cannot be edited by bots or page 
does not exist (T223816)
* Make coordinate_import.py work on a set of Wikidata items (T220806)
* Implement -overwrite option in create_categories.py (T220305)
* Enable choosing protect level with check_protection_level in protect.py 
(T225448)
* Move categories without leaving a redirect which is the new default behaviour 
if suppressredirect right is available (T150093)
* Namespace identifier can be ommitted for -start option for checkimages.py 
(T217824)

Thanks all contributors for this code changes and all reviewers for their 
importand code checking and submitting it to the repository. Also thanks for 
all bug reporters and other persons who gave their valueable comments on phab 
tasks.

Best

xqt___
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot


[Pywikipedia-bugs] [Maniphest] [Closed] T228583: KeyError: 'count' on archivebot.py via PAWS

2019-07-22 Thread Xqt
Xqt closed this task as "Resolved".
Xqt added a comment.


  new "stable" release tag in rPWBC3ab5fafd28f6f8ea2e147edfc37610a0a5d9c8e9 


TASK DETAIL
  https://phabricator.wikimedia.org/T228583

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, Liuxinyu970226, pywikibot-bugs-list, Dvorapa, Xqt, MarcoAurelio, 
MattLongCT, Viztor, DannyS712, Wenyi, R96340, Chicocvenancio, Allthingsgo, 
Tbscho, MayS, Framawiki, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, 
Jane023, yuvipanda, Capt_Swing, jayvdb, zhuyifei1999, Dalba, Masti, Alchimista, 
Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikibot-commits] [Gerrit] pywikibot/core[master]: [doc] Update HISTORY.rst

2019-07-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/524727 )

Change subject: [doc] Update HISTORY.rst
..

[doc] Update HISTORY.rst

Change-Id: I3bc5f65ce1ad6bda8e45530ad4707d06ffa19479
---
M HISTORY.rst
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/HISTORY.rst b/HISTORY.rst
index 13afef8..95ff932 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,11 @@
 Current release
 ---

+* Increase the throttling delay if maxlag >> retry-after (T210606)
+* deprecate test_family: Site('test', 'test'), use wikipedia_family: 
Site('test', 'wikipedia') instead (T228375, T228300)
+* Add "user_agent_description" option in config.py
+* APISite.fromDBName works for all known dbnames (T225590, 225723, 226960)
+* remove the unimplemented "proxy" variable in config.py
 * Make Family.langs property more robust (T226934)
 * Remove strategy family
 * Handle closed_wikis as read-only (T74674)

--
To view, visit https://gerrit.wikimedia.org/r/524727
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3bc5f65ce1ad6bda8e45530ad4707d06ffa19479
Gerrit-Change-Number: 524727
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot (75)
___
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits


[Pywikibot-commits] [Gerrit] pywikibot/core[master]: [L10N] Update languages_by_size

2019-07-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/524728 )

Change subject: [L10N] Update languages_by_size
..

[L10N] Update languages_by_size

Change-Id: Ic5873b7cec942c65c884c8385fdc84a868622696
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikiversity_family.py
M pywikibot/families/wiktionary_family.py
6 files changed, 34 insertions(+), 34 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index 8445d91..ed7e3e6 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -35,10 +35,10 @@
 languages_by_size = [
 'en', 'hu', 'de', 'fr', 'pt', 'ja', 'it', 'nl', 'es', 'pl', 'he', 'th',
 'id', 'fi', 'sq', 'az', 'fa', 'zh', 'ca', 'ru', 'vi', 'da', 'ko', 'sv',
-'gl', 'sr', 'cs', 'hr', 'ba', 'no', 'ar', 'tr', 'sa', 'ta', 'uk', 'eo',
-'sk', 'is', 'ro', 'hi', 'si', 'bn', 'mk', 'bg', 'ka', 'lt', 'ms', 'tt',
+'gl', 'sr', 'cs', 'hr', 'ba', 'ar', 'no', 'tr', 'sa', 'ta', 'uk', 'eo',
+'sk', 'is', 'hi', 'ro', 'si', 'bn', 'mk', 'bg', 'ka', 'ms', 'lt', 'tt',
 'el', 'li', 'ur', 'sl', 'km', 'tl', 'et', 'kk', 'be', 'ia', 'ml', 'oc',
-'ne', 'hy', 'eu', 'pa', 'tg', 'la', 'cv', 'fy', 'ku', 'bs', 'cy', 'af',
+'hy', 'eu', 'ne', 'pa', 'tg', 'la', 'cv', 'fy', 'ku', 'bs', 'cy', 'af',
 'te', 'mr', 'mg', 'ky',
 ]

diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index b79bfb9..e2a9f3d 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -32,33 +32,33 @@
 languages_by_size = [
 'en', 'ceb', 'sv', 'de', 'fr', 'nl', 'ru', 'it', 'es', 'pl', 'war',
 'vi', 'ja', 'zh', 'pt', 'uk', 'ar', 'fa', 'sr', 'ca', 'no', 'id', 'fi',
-'ko', 'hu', 'sh', 'cs', 'ro', 'eu', 'tr', 'ms', 'eo', 'bg', 'hy', 'da',
+'ko', 'hu', 'sh', 'cs', 'ro', 'eu', 'tr', 'ms', 'eo', 'hy', 'bg', 'da',
 'he', 'sk', 'zh-min-nan', 'kk', 'min', 'ce', 'hr', 'et', 'lt', 'be',
-'sl', 'el', 'gl', 'azb', 'nn', 'az', 'ur', 'simple', 'th', 'hi', 'uz',
+'el', 'sl', 'gl', 'azb', 'nn', 'az', 'ur', 'simple', 'th', 'hi', 'uz',
 'la', 'ka', 'vo', 'ta', 'cy', 'mk', 'ast', 'tg', 'lv', 'mg', 'tt',
 'oc', 'af', 'bs', 'ky', 'sq', 'tl', 'zh-yue', 'new', 'te', 'bn',
-'be-tarask', 'br', 'pms', 'ml', 'lb', 'jv', 'ht', 'sco', 'mr', 'sw',
-'ga', 'nds', 'su', 'ba', 'pnb', 'is', 'my', 'fy', 'cv', 'lmo', 'an',
-'ne', 'yo', 'pa', 'gu', 'io', 'bar', 'scn', 'ku', 'als', 'bpy', 'kn',
-'ckb', 'ia', 'qu', 'arz', 'wuu', 'mn', 'bat-smg', 'si', 'or', 'wa',
-'gd', 'am', 'yi', 'cdo', 'nap', 'bug', 'hsb', 'mai', 'map-bms', 'fo',
-'mzn', 'xmf', 'ilo', 'li', 'vec', 'eml', 'sah', 'os', 'sd', 'sa',
-'diq', 'mrj', 'ps', 'mhr', 'hif', 'zh-classical', 'roa-tara', 'bcl',
-'ace', 'frr', 'hak', 'pam', 'szl', 'nso', 'nv', 'km', 'se', 'hyw',
-'mi', 'rue', 'nah', 'bh', 'vls', 'nds-nl', 'crh', 'gan', 'sc', 'vep',
-'bo', 'myv', 'glk', 'co', 'as', 'tk', 'so', 'fiu-vro', 'kv', 'csb',
-'lrc', 'shn', 'gv', 'udm', 'zea', 'ay', 'sn', 'ie', 'pcd', 'nrm', 'ug',
-'stq', 'lez', 'kw', 'lad', 'ab', 'mwl', 'gom', 'gn', 'haw', 'ha',
-'kab', 'rm', 'lij', 'lfn', 'koi', 'lo', 'mt', 'fur', 'frp', 'dsb',
-'ln', 'ang', 'ext', 'olo', 'dty', 'cbk-zam', 'dv', 'ksh', 'gag', 'pi',
-'pag', 'pfl', 'bjn', 'av', 'bxr', 'xal', 'gor', 'krc', 'za', 'pap',
+'be-tarask', 'br', 'pms', 'ml', 'lb', 'jv', 'ht', 'sco', 'mr', 'nds',
+'sw', 'ga', 'su', 'ba', 'pnb', 'is', 'my', 'fy', 'cv', 'lmo', 'an',
+'ne', 'yo', 'pa', 'gu', 'io', 'bar', 'ku', 'als', 'scn', 'bpy', 'kn',
+'ckb', 'ia', 'qu', 'wuu', 'arz', 'mn', 'bat-smg', 'si', 'wa', 'or',
+'gd', 'yi', 'am', 'cdo', 'nap', 'bug', 'hsb', 'mai', 'map-bms', 'fo',
+'mzn', 'xmf', 'ilo', 'li', 'vec', 'eml', 'sah', 'sd', 'os', 'sa',
+'diq', 'ps', 'mrj', 'mhr', 'hif', 'zh-classical', 'roa-tara', 'bcl',
+'frr', 'ace', 'hak', 'pam', 'szl', 'nv', 'nso', 'km', 'se', 'hyw',
+'rue', 'mi', 'nah', 'vls', 'bh', 'nds-nl', 'crh', 'gan', 'vep', 'sc',
+'bo', 'as', 'myv', 'glk', 'co', 'tk', 'so', 'fiu-vro', 'lrc', 'kv',
+'csb', 'shn', 'gv', 'udm', 'sn', 'zea', 'ay', 'ie', 'pcd', 'nrm', 'ug',
+'ab', 'stq', 'lez', 'kw', 'lad', 'kab', 'mwl', 'gom', 'ha', 'gn',
+'haw', 'rm', 'lij', 'lfn', 'koi', 'lo', 'mt', 'frp', 'fur', 'dsb',
+'ln', 'ang', 'ext', 'dty', 'olo', 'cbk-zam', 'dv', 'ksh', 'gag', 'bjn',
+'pi', 'pag', 'pfl', 'av', 'bxr', 'xal', 'gor', 

[Pywikipedia-bugs] [Maniphest] [Commented On] T220828: archivebot.py: don't reorder template parameters

2019-07-22 Thread whym
whym added a comment.


  Note to @Jeff_G:  you might still see the bug on Commons, but that's 
expected. It might take some time before I update ArchiverBot@Commons to 
reflect the bug fix. (Maybe next weekend.)

TASK DETAIL
  https://phabricator.wikimedia.org/T220828

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, whym
Cc: Mpaa, Xqt, Dvorapa, pywikibot-bugs-list, Aklapper, whym, Jeff_G, 
MattLongCT, Viztor, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[pywikibot] getInterwiki

2019-07-22 Thread masti

It used to be a getInterwiki method before Wikidata era.
What is the easiest way to get them instead of parsing sitelinks list of 
WD object?


masti

___
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot