Hello PywikibotCommitWatcher,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/234734
to review the following change.
Change subject: WIP: Replacing old Bugzilla tickets with Phab. ......................................................................
WIP: Replacing old Bugzilla tickets with Phab.
A request was made to modify pywiki files with old references to bugzilla tickets to phabricator ones. In the cases where the ticket was linked via URL, I've not performed any change as those links still work as a redirect. In those cases where the ticket was simply a number reference, I updated it adding 2,000 to the ticket number and adding a 'T' before the number, so it's clear it's a Phabricator task. I tag this as work in progress because the files have changed since the ticket was opened and I don't know whether further files will need amendment.
Bug: T94683 Change-Id: Ib775bfdbc96311ccb09ad9a1ee77b9970c09fd43 --- M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M pywikibot/textlib.py M scripts/blockpageschecker.py M scripts/reflinks.py M scripts/unusedfiles.py M tests/archivebot_tests.py M tests/script_tests.py M tests/site_tests.py 13 files changed, 27 insertions(+), 27 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/234734/1
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index c85f851..dd7f555 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1782,7 +1782,7 @@ def _is_wikibase_error_retryable(self, error): ERR_MSG = u'edit-already-exists' messages = error.pop("messages", None) - # bug 66619, after gerrit 124323 breaking change we have a + # bug 66619 (T68619), after gerrit 124323 breaking change we have a # list of messages if isinstance(messages, list): for item in messages: @@ -1861,7 +1861,7 @@ if '*' in warning: text = warning['*'] elif 'html' in warning: - # Bugzilla 49978 + # Phabricator T51978 text = warning['html']['*'] else: pywikibot.warning( @@ -2051,9 +2051,9 @@ del error['code'] # is added via class_name e = APIMWException(class_name, **error)
- retry = class_name in ['DBConnectionError', # bug 62974 - 'DBQueryError', # bug 58158 - 'ReadOnlyError' # bug 59227 + retry = class_name in ['DBConnectionError', # T64974 + 'DBQueryError', # T60158 + 'ReadOnlyError' # T61227 ]
pywikibot.error("Detected MediaWiki API exception %s%s" @@ -2078,8 +2078,8 @@
raise e
- # bugs 46535, 62126, 64494, 66619 - # maybe removed when it 46535 is solved + # Phab. tickets T48535, T64126, T68494, T68619 + # maybe removed when T48535 is solved if code == "failed-save" and \ self.action == 'wbeditentity' and \ self._is_wikibase_error_retryable(result["error"]): @@ -2651,7 +2651,7 @@ # self.resultkey in data in last request.submit() new_limit = min(self.query_limit, self.limit - count) else: - # only "(query-)continue" returned. See Bug 72209. + # only "(query-)continue" returned. See Bug T74209. # increase new_limit to advance faster until new # useful data are found again. new_limit = min(new_limit * 2, self.query_limit) diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index a8a8beb..1e79596 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -290,7 +290,7 @@ """ Page is a redirect to another site.
- This is considered invalid in Pywikibot. See Bug 73184. + This is considered invalid in Pywikibot. See Bug T75184.
"""
diff --git a/pywikibot/login.py b/pywikibot/login.py index ac37803..26a07db 100644 --- a/pywikibot/login.py +++ b/pywikibot/login.py @@ -283,7 +283,7 @@ elif e.code == 'Illegal': raise NoUsername(u"Username '%s' is invalid on %s" % (self.username, self.site)) - # TODO: investigate other unhandled API codes (bug 73539) + # TODO: investigate other unhandled API codes (bug 75539) if retry: self.password = None return self.login(retry=True) diff --git a/pywikibot/page.py b/pywikibot/page.py index 890796a..eb8eb9d 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -540,7 +540,7 @@ @return: dict """ if not hasattr(self, '_pageprops') or force: - self._pageprops = {} # page may not have pageprops (see bug 54868) + self._pageprops = {} # page may not have pageprops (see bug T56868) self.site.loadpageprops(self) return self._pageprops
@@ -1402,7 +1402,7 @@ @return: a generator that yields Category objects.
""" - # FIXME: bug 73561: withSortKey is ignored by Site.pagecategories + # FIXME: bug T75561: withSortKey is ignored by Site.pagecategories if withSortKey: raise NotImplementedError('withSortKey is not implemented')
@@ -3314,7 +3314,7 @@ self.labels = {} if 'labels' in self._content: for lang in self._content['labels']: - if 'removed' not in self._content['labels'][lang]: # Bug 54767 + if 'removed' not in self._content['labels'][lang]: # Bug T56767 self.labels[lang] = self._content['labels'][lang]['value']
# descriptions diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 3afe643..3ed516f 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -684,7 +684,7 @@ u'How many images do you want to load?') gen = NewimagesPageGenerator(total=int(limit), site=self.site) elif arg.startswith('-newpages'): - # partial workaround for bug 67249 + # partial workaround for bug T69249 # to use -namespace/ns with -newpages, -ns must be given # before -newpages # otherwise default namespace is 0 diff --git a/pywikibot/site.py b/pywikibot/site.py index 3f3fe9f..098ec65 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2727,7 +2727,7 @@ def page_isredirect(self, page): """Return True if and only if page is a redirect.""" if not hasattr(page, "_isredir"): - page._isredir = False # bug 54684 + page._isredir = False # bug T56684 self.loadpageinfo(page) return page._isredir
@@ -5297,7 +5297,7 @@ comment=comment, text=text, filekey=_file_key) elif source_filename: - # TODO: Dummy value to allow also Unicode names, see bug 73661 + # TODO: Dummy value to allow also Unicode names, see bug T75661 mime_filename = 'FAKE-NAME' # upload local file # make sure file actually exists diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index bd7adbd..4bd66b6 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -300,7 +300,7 @@ # We cannot just insert the new string, as it may contain regex # group references such as \2 or \g<name>. # On the other hand, this approach does not work because it - # can't handle lookahead or lookbehind (see bug #1731008): + # can't handle lookahead or lookbehind (see bug #1731008)(bug not found): # # replacement = old.sub(new, text[match.start():match.end()]) # text = text[:match.start()] + replacement + text[match.end():] @@ -1726,7 +1726,7 @@
if m: marker = self.findmarker(txt) - # month and day format might be identical (e.g. see bug 69315), + # month and day format might be identical (e.g. see bug T71315), # avoid to wipe out day, after month is matched. # replace all matches but the last two # (i.e. allow to search for dd. mm.) diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index c4ca412..f00a2ea 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -297,7 +297,7 @@ continue # FIXME: This check does not work : # PreloadingGenerator cannot set correctly page.editRestriction - # (see bug 55322) + # (see bug T57322) # if not page.canBeEdited(): # pywikibot.output("%s is sysop-protected : this account can't edit " # "it! Skipping..." % pagename) diff --git a/scripts/reflinks.py b/scripts/reflinks.py index 6b3978f..a0c4ed0 100755 --- a/scripts/reflinks.py +++ b/scripts/reflinks.py @@ -710,7 +710,7 @@ if 'utf-8' not in enc: enc.append('utf-8') try: - u = linkedpagetext.decode(enc[0]) # Bug 67410 + u = linkedpagetext.decode(enc[0]) # Bug T69410 except (UnicodeDecodeError, LookupError) as e: pywikibot.output(u'%s : Decoding error - %s' % (ref.link, e)) continue diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 30140aa..26f62dd 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -68,7 +68,7 @@ generator = pagegenerators.PreloadingGenerator(generator) for image in generator: if not image.exists(): - pywikibot.output(u"File '%s' does not exist (see bug 69133)." + pywikibot.output(u"File '%s' does not exist (see bug T71133)." % image.title()) continue # Use fileUrl() and fileIsShared() to confirm it is local media diff --git a/tests/archivebot_tests.py b/tests/archivebot_tests.py index 819faf1..1e99b1e 100644 --- a/tests/archivebot_tests.py +++ b/tests/archivebot_tests.py @@ -43,7 +43,7 @@ def test_archivebot(self, code=None): """Test archivebot for one site.""" site = self.get_site(code) - if code != 'de': # bug 67663 + if code != 'de': # bug T69663 page = pywikibot.Page(site, 'user talk:xqt') else: page = pywikibot.Page(site, 'user talk:ladsgroup') diff --git a/tests/script_tests.py b/tests/script_tests.py index 3fd9596..0b4f43d 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -126,7 +126,7 @@ # and not backtraces starting deep in the pywikibot package. no_args_expected_results = { # TODO: until done here, remember to set editor = None in user_config.py - 'editarticle': 'Nothing changed', # This masks related bug 68645 but that + 'editarticle': 'Nothing changed', # This masks related bug T70645 but that # bug is more broadly about config # rather than editarticle. 'freebasemappingupload': 'Cannot find ', @@ -139,7 +139,7 @@ 'replace': 'Press Enter to use this automatic message', 'script_wui': 'Pre-loading all relevant page contents', 'shell': ('>>> ', 'Welcome to the'), - 'transferbot': 'Target site not different from source site', # Bug 68662 + 'transferbot': 'Target site not different from source site', # Bug T70662 'unusedfiles': ('Working on', None), 'watchlist': 'Retrieving watchlist',
diff --git a/tests/site_tests.py b/tests/site_tests.py index 5b23525..12c9a17 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -605,7 +605,7 @@ for cat in mysite.allcategories(total=5, prefix="Def"): self.assertIsInstance(cat, pywikibot.Category) self.assertTrue(cat.title(withNamespace=False).startswith("Def")) - # Bug # 15985 - reverse and start combined; fixed in v 1.14 + # Bug # T17985 - reverse and start combined; fixed in v 1.14 for cat in mysite.allcategories(total=5, start="Hij", reverse=True): self.assertIsInstance(cat, pywikibot.Category) self.assertLessEqual(cat.title(withNamespace=False), "Hij") @@ -664,7 +664,7 @@ self.assertIsInstance(impage, pywikibot.FilePage) self.assertTrue(mysite.page_exists(impage)) self.assertGreaterEqual(impage.title(withNamespace=False), "Ba") - # Bug # 15985 - reverse and start combined; fixed in v 1.14 + # Bug # T17985 - reverse and start combined; fixed in v 1.14 for impage in mysite.allimages(start="Da", reverse=True, total=5): self.assertIsInstance(impage, pywikibot.FilePage) self.assertTrue(mysite.page_exists(impage)) @@ -922,7 +922,7 @@ self.assertIsInstance(using, pywikibot.Page) if using.isRedirectPage(): print('{0} is a redirect, although just non-redirects were ' - 'searched. See also bug 73120'.format(using)) + 'searched. See also bug T75120'.format(using)) self.assertFalse(using.isRedirectPage())
John Vandenberg has posted comments on this change.
Change subject: WIP: Replacing old Bugzilla tickets with Phab. ......................................................................
Patch Set 1:
(5 comments)
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/data/api.py File pywikibot/data/api.py:
Line 2082: # maybe removed when T48535 is solved remove this second line; T48535 is mentioned on the line above, T48535 is solved, but the problem in Wikibase was fixed in that task.
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/login.py File pywikibot/login.py:
Line 286: # TODO: investigate other unhandled API codes (bug 75539) need to add 'T'
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/textlib.py File pywikibot/textlib.py:
Line 303: # can't handle lookahead or lookbehind (see bug #1731008)(bug not found): this is a SF.net bug number; see https://www.mediawiki.org/wiki/Manual:Pywikibot/History
https://gerrit.wikimedia.org/r/#/c/234734/1/tests/script_tests.py File tests/script_tests.py:
Line 129: 'editarticle': 'Nothing changed', # This masks related bug T70645 but that T70645 is fixed; need to determine if this comment is still useful.
Line 142: 'transferbot': 'Target site not different from source site', # Bug T70662 T70662 is fixed; need to determine if this comment is still useful.
XZise has posted comments on this change.
Change subject: WIP: Replacing old Bugzilla tickets with Phab. ......................................................................
Patch Set 1:
(4 comments)
https://gerrit.wikimedia.org/r/#/c/234734/1//COMMIT_MSG Commit Message:
Line 14: number, so it's clear it's a Phabricator task. I tag this as work in In the end only the last patch set will get committed. And that shouldn't be WIP and thus contain this note. If you want to add additional information for the reviewers post it as a comment. But after the merge this last sentence is unnecessary.
Also both John and I mentioned on the bug how we got the results:
git grep -i bugzilla git grep -iE 'bug *[1-9]'
You could probably improve the second one with something like:
git grep -iE "bug\W*[1-9]"
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/data/api.py File pywikibot/data/api.py:
Line 1785: # bug 66619 (T68619), after gerrit 124323 breaking change we have a Why do you keep “bug 66619”? Also “gerrit 124323” is not a good identifier. Maybe “after 1ca9cee3 (Wikibase)”.
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/exceptions.py File pywikibot/exceptions.py:
Line 293: This is considered invalid in Pywikibot. See Bug T75184. lowercase bug?
https://gerrit.wikimedia.org/r/#/c/234734/1/tests/site_tests.py File tests/site_tests.py:
Line 608: # Bug # T17985 - reverse and start combined; fixed in v 1.14 I guess the second # was used as “number” which does seem odd (and afaik any other instances use “bug T…”).
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/234734
to look at the new patch set (#2).
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Replacing references from Bugzilla to Phabricator
A request was made to modify pywiki files with old references to bugzilla tickets to phabricator ones. In the cases where the ticket was linked via URL, I've not performed any change as those links still work as a redirect. In those cases where the ticket was simply a number reference, I updated it adding 2,000 to the ticket number and adding a 'T' before the number, so it's clear it's a Phabricator task.
Bug: T94683 Change-Id: Ib775bfdbc96311ccb09ad9a1ee77b9970c09fd43 --- M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M pywikibot/textlib.py M scripts/blockpageschecker.py M scripts/reflinks.py M scripts/unusedfiles.py M tests/archivebot_tests.py M tests/script_tests.py M tests/site_tests.py 13 files changed, 27 insertions(+), 27 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/234734/2
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 2: Verified+1
Basic test build succeeded.
- noop https://integration.wikimedia.org/ci/job/noop/None/console : SUCCESS
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/234734
to look at the new patch set (#3).
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Replacing references from Bugzilla to Phabricator
A request was made to modify pywiki files with old references to bugzilla tickets to phabricator ones. In the cases where the ticket was linked via URL, I've not performed any change as those links still work as a redirect. In those cases where the ticket was simply a number reference, I updated it adding 2,000 to the ticket number and adding a 'T' before the number, so it's clear it's a Phabricator task.
Bug: T94683 Change-Id: Ib775bfdbc96311ccb09ad9a1ee77b9970c09fd43 --- M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M pywikibot/textlib.py M scripts/blockpageschecker.py M scripts/reflinks.py M scripts/unusedfiles.py M tests/archivebot_tests.py M tests/script_tests.py M tests/site_tests.py 13 files changed, 27 insertions(+), 27 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/234734/3
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 3: Verified+1
Basic test build succeeded.
- noop https://integration.wikimedia.org/ci/job/noop/None/console : SUCCESS
MarcoAurelio has abandoned this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Abandoned
John Vandenberg has restored this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Restored
I'll polish this up
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/234734
to look at the new patch set (#4).
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Replacing references from Bugzilla to Phabricator
A request was made to modify pywiki files with old references to bugzilla tickets to phabricator ones. In the cases where the ticket was linked via URL, I've not performed any change as those links still work as a redirect. In those cases where the ticket was simply a number reference, I updated it adding 2,000 to the ticket number and adding a 'T' before the number, so it's clear it's a Phabricator task.
Bug: T94683 Change-Id: Ib775bfdbc96311ccb09ad9a1ee77b9970c09fd43 --- M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M pywikibot/textlib.py M scripts/blockpageschecker.py M scripts/reflinks.py M scripts/unusedfiles.py M tests/archivebot_tests.py M tests/script_tests.py M tests/site_tests.py 13 files changed, 26 insertions(+), 26 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/234734/4
John Vandenberg has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 4:
PS4 is rebase only
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 4: Verified+2
Main test build succeeded.
- tox-jessie https://integration.wikimedia.org/ci/job/tox-jessie/3398/console : SUCCESS in 1m 02s - pywikibot-core-tox-nose https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose/9169/consol... : SUCCESS in 2m 00s - pywikibot-core-tox-nose34-jessie https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose34-jessie/10... : SUCCESS in 1m 10s - tox-doc-jessie https://integration.wikimedia.org/ci/job/tox-doc-jessie/1049/console : SUCCESS in 2m 19s
Xqt has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 4:
(1 comment)
https://gerrit.wikimedia.org/r/#/c/234734/4/pywikibot/textlib.py File pywikibot/textlib.py:
Line 311: # can't handle lookahead or lookbehind (see bug #1731008)(bug not found): This bug was renumbered at sf. It could be found at [1]. The bug has been (partially ?) fixed in r3614 [2]. The old bug tracker was found in an old mail archive [3]
[1] http://sourceforge.net/p/pywikipediabot/bugs/415/ [2] https://www.mediawiki.org/wiki/Special:Code/pywikipedia/3614 [3] http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/4510
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/234734
to look at the new patch set (#5).
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Replacing references from Bugzilla to Phabricator
Also replace an old sf.net bug ID with a new Phabricator ID. Remove mention of two closed bugs in script_tests.
Bug: T94683 Change-Id: Ib775bfdbc96311ccb09ad9a1ee77b9970c09fd43 --- M pwb.py M pywikibot/cosmetic_changes.py M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/logentries.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M pywikibot/textlib.py M scripts/blockpageschecker.py M scripts/reflinks.py M scripts/unusedfiles.py M tests/archivebot_tests.py M tests/script_tests.py M tests/site_tests.py 16 files changed, 31 insertions(+), 36 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/34/234734/5
John Vandenberg has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 1:
(8 comments)
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/data/api.py File pywikibot/data/api.py:
Line 1785: # bug 66619 (T68619), after gerrit 124323 breaking change we have a
Why do you keep “bug 66619”? Also “gerrit 124323” is not a good identifier.
Done
Line 2082: # maybe removed when T48535 is solved
remove this second line; T48535 is mentioned on the line above, T48535 is s
Done
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/exceptions.py File pywikibot/exceptions.py:
Line 293: This is considered invalid in Pywikibot. See Bug T75184.
lowercase bug?
Done
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/login.py File pywikibot/login.py:
Line 286: # TODO: investigate other unhandled API codes (bug 75539)
need to add 'T'
Done
https://gerrit.wikimedia.org/r/#/c/234734/1/pywikibot/textlib.py File pywikibot/textlib.py:
Line 303: # can't handle lookahead or lookbehind (see bug #1731008)(bug not found):
this is a SF.net bug number; see https://www.mediawiki.org/wiki/Manual:Pywi
Created T123185 for this
https://gerrit.wikimedia.org/r/#/c/234734/1/tests/script_tests.py File tests/script_tests.py:
Line 129: 'editarticle': 'Nothing changed', # This masks related bug T70645 but that
T70645 is fixed; need to determine if this comment is still useful.
No longer needed IMO; removed.
Line 142: 'transferbot': 'Target site not different from source site', # Bug T70662
T70662 is fixed; need to determine if this comment is still useful.
No longer needed IMO; removed.
https://gerrit.wikimedia.org/r/#/c/234734/1/tests/site_tests.py File tests/site_tests.py:
Line 608: # Bug # T17985 - reverse and start combined; fixed in v 1.14
I guess the second # was used as “number” which does seem odd (and afaik an
Done
John Vandenberg has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 4:
(1 comment)
https://gerrit.wikimedia.org/r/#/c/234734/4/pywikibot/textlib.py File pywikibot/textlib.py:
Line 311: # can't handle lookahead or lookbehind (see bug #1731008)(bug not found):
This bug was renumbered at sf. It could be found at [1]. The bug has been (
ya; this was just a rebase; see comments on earlier PS
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 5: Verified+2
Main test build succeeded.
- tox-jessie https://integration.wikimedia.org/ci/job/tox-jessie/3401/console : SUCCESS in 1m 02s - pywikibot-core-tox-nose https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose/9172/consol... : SUCCESS in 1m 41s - pywikibot-core-tox-nose34-jessie https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose34-jessie/10... : SUCCESS in 1m 51s - tox-doc-jessie https://integration.wikimedia.org/ci/job/tox-doc-jessie/1052/console : SUCCESS in 2m 15s
Xqt has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 5: Code-Review+2
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 5: -Verified
Starting gate-and-submit jobs. https://integration.wikimedia.org/zuul/
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 5: Verified+2
Gate pipeline build succeeded.
- tox-jessie https://integration.wikimedia.org/ci/job/tox-jessie/3405/console : SUCCESS in 1m 50s - pywikibot-core-tox-nose https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose/9176/consol... : SUCCESS in 1m 41s - pywikibot-core-tox-nose34-jessie https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose34-jessie/10... : SUCCESS in 1m 11s - tox-doc-jessie https://integration.wikimedia.org/ci/job/tox-doc-jessie/1056/console : SUCCESS in 1m 38s
jenkins-bot has submitted this change and it was merged.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Replacing references from Bugzilla to Phabricator
Also replace an old sf.net bug ID with a new Phabricator ID. Remove mention of two closed bugs in script_tests.
Bug: T94683 Change-Id: Ib775bfdbc96311ccb09ad9a1ee77b9970c09fd43 --- M pwb.py M pywikibot/cosmetic_changes.py M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/logentries.py M pywikibot/login.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M pywikibot/textlib.py M scripts/blockpageschecker.py M scripts/reflinks.py M scripts/unusedfiles.py M tests/archivebot_tests.py M tests/script_tests.py M tests/site_tests.py 16 files changed, 31 insertions(+), 36 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py index 81ecb85..fdd6fd4 100755 --- a/pwb.py +++ b/pwb.py @@ -178,7 +178,7 @@ try: # If successful, user-config.py already exists in one of the candidate # directories. See config2.py for details on search order. - # Use env var to communicate to config2.py pwb.py location (bug 72918). + # Use env var to communicate to config2.py pwb.py location (bug T74918). _pwb_dir = os.path.split(__file__)[0] if sys.platform == 'win32' and sys.version_info[0] < 3: _pwb_dir = str(_pwb_dir) diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py index f466b89..7fa1f07 100755 --- a/pywikibot/cosmetic_changes.py +++ b/pywikibot/cosmetic_changes.py @@ -430,7 +430,7 @@ assert u'Kép' in namespaces namespaces.remove(u'Kép') elif self.site.code == 'pt': - # bug 55242 should be implemented + # TODO: bug T57242 continue # lowerspaced and underscored namespaces for i in range(len(namespaces)): @@ -615,7 +615,7 @@ def resolveHtmlEntities(self, text): ignore = [ 38, # Ampersand (&) - 39, # Single quotation mark (") - Bugzilla 24093 + 39, # Single quotation mark (") - bug T26093 60, # Less than (<) 62, # Great than (>) 91, # Opening square bracket ([) diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 8723021..c6f2f0c 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1789,7 +1789,7 @@ def _is_wikibase_error_retryable(self, error): ERR_MSG = u'edit-already-exists' messages = error.pop("messages", None) - # bug 66619, after gerrit 124323 breaking change we have a + # bug T68619; after Wikibase breaking change 1ca9cee change we have a # list of messages if isinstance(messages, list): for item in messages: @@ -1868,7 +1868,7 @@ if '*' in warning: text = warning['*'] elif 'html' in warning: - # Bugzilla 49978 + # bug T51978 text = warning['html']['*'] else: pywikibot.warning( @@ -2089,9 +2089,9 @@ del error['code'] # is added via class_name e = APIMWException(class_name, **error)
- retry = class_name in ['DBConnectionError', # bug 62974 - 'DBQueryError', # bug 58158 - 'ReadOnlyError' # bug 59227 + retry = class_name in ['DBConnectionError', # T64974 + 'DBQueryError', # T60158 + 'ReadOnlyError' # T61227 ]
pywikibot.error("Detected MediaWiki API exception %s%s" @@ -2116,8 +2116,7 @@
raise e
- # bugs 46535, 62126, 64494, 66619 - # maybe removed when it 46535 is solved + # Phab. tickets T48535, T64126, T68494, T68619 if code == "failed-save" and \ self.action == 'wbeditentity' and \ self._is_wikibase_error_retryable(result["error"]): @@ -2692,7 +2691,7 @@ # self.resultkey in data in last request.submit() new_limit = min(self.query_limit, self.limit - count) else: - # only "(query-)continue" returned. See Bug 72209. + # only "(query-)continue" returned. See Bug T74209. # increase new_limit to advance faster until new # useful data are found again. new_limit = min(new_limit * 2, self.query_limit) diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index f3624de..8c50c21 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -301,7 +301,7 @@ """ Page is a redirect to another site.
- This is considered invalid in Pywikibot. See Bug 73184. + This is considered invalid in Pywikibot. See bug T75184.
"""
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 5d013e5..a12715d 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -144,7 +144,7 @@ """Constructor.""" super(BlockEntry, self).__init__(apidata, site) # When an autoblock is removed, the "title" field is not a page title - # ( https://bugzilla.wikimedia.org/show_bug.cgi?id=17781 ) + # See bug T19781 pos = self.data['title'].find('#') self.isAutoblockRemoval = pos > 0 if self.isAutoblockRemoval: diff --git a/pywikibot/login.py b/pywikibot/login.py index b82512a..36e29e8 100644 --- a/pywikibot/login.py +++ b/pywikibot/login.py @@ -283,7 +283,7 @@ elif e.code == 'Illegal': raise NoUsername(u"Username '%s' is invalid on %s" % (self.username, self.site)) - # TODO: investigate other unhandled API codes (bug 73539) + # TODO: investigate other unhandled API codes (bug T75539) if retry: self.password = None return self.login(retry=True) diff --git a/pywikibot/page.py b/pywikibot/page.py index ac4c426..a532664 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -572,7 +572,7 @@ @return: dict """ if not hasattr(self, '_pageprops') or force: - self._pageprops = {} # page may not have pageprops (see bug 54868) + self._pageprops = {} # page may not have pageprops (see bug T56868) self.site.loadpageprops(self) return self._pageprops
@@ -1448,7 +1448,7 @@ @return: a generator that yields Category objects.
""" - # FIXME: bug 73561: withSortKey is ignored by Site.pagecategories + # FIXME: bug T75561: withSortKey is ignored by Site.pagecategories if withSortKey: raise NotImplementedError('withSortKey is not implemented')
@@ -3364,7 +3364,7 @@ self.labels = {} if 'labels' in self._content: for lang in self._content['labels']: - if 'removed' not in self._content['labels'][lang]: # Bug 54767 + if 'removed' not in self._content['labels'][lang]: # Bug T56767 self.labels[lang] = self._content['labels'][lang]['value']
# descriptions diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 860ea58..7ccf929 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -771,7 +771,7 @@ u'How many images do you want to load?') gen = NewimagesPageGenerator(total=int(limit), site=self.site) elif arg.startswith('-newpages'): - # partial workaround for bug 67249 + # partial workaround for bug T69249 # to use -namespace/ns with -newpages, -ns must be given # before -newpages # otherwise default namespace is 0 diff --git a/pywikibot/site.py b/pywikibot/site.py index 810ab10..f35174a 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2984,7 +2984,7 @@ def page_isredirect(self, page): """Return True if and only if page is a redirect.""" if not hasattr(page, "_isredir"): - page._isredir = False # bug 54684 + page._isredir = False # bug T56684 self.loadpageinfo(page) return page._isredir
@@ -3368,10 +3368,10 @@ namespaces=namespaces, step=step, total=total, g_content=content, **blargs) if followRedirects: - # bug: see https://bugzilla.wikimedia.org/show_bug.cgi?id=7304 # links identified by MediaWiki as redirects may not really be, # so we have to check each "redirect" page and see if it # really redirects to this page + # see fixed MediaWiki bug T9304 redirgen = self._generator(api.PageGenerator, type_arg="backlinks", gbltitle=bltitle, @@ -5753,7 +5753,7 @@ comment=comment, text=text, filekey=_file_key) elif source_filename: - # TODO: Dummy value to allow also Unicode names, see bug 73661 + # TODO: Dummy value to allow also Unicode names, see bug T75661 mime_filename = 'FAKE-NAME' # upload local file throttle = True @@ -6904,9 +6904,7 @@ data = req.submit()
# the IDs returned from the API can be upper or lowercase, depending - # on the version. See for more information: - # https://bugzilla.wikimedia.org/show_bug.cgi?id=53894 - # https://lists.wikimedia.org/pipermail/wikidata-tech/2013-September/000296.ht... + # on the version. See bug T55894 for more information. try: dtype = data['entities'][prop.getID()]['datatype'] except KeyError: diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 8e73b56..d00fc37 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -308,7 +308,7 @@ # We cannot just insert the new string, as it may contain regex # group references such as \2 or \g<name>. # On the other hand, this approach does not work because it - # can't handle lookahead or lookbehind (see bug #1731008): + # can't handle lookahead or lookbehind (see bug T123185): # # replacement = old.sub(new, text[match.start():match.end()]) # text = text[:match.start()] + replacement + text[match.end():] @@ -1777,7 +1777,7 @@
if m: marker = findmarker(txt) - # month and day format might be identical (e.g. see bug 69315), + # month and day format might be identical (e.g. see bug T71315), # avoid to wipe out day, after month is matched. # replace all matches but the last two # (i.e. allow to search for dd. mm.) diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index 73262ba..8c4f51a 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -300,7 +300,7 @@ continue # FIXME: This check does not work : # PreloadingGenerator cannot set correctly page.editRestriction - # (see bug 55322) + # (see bug T57322) # if not page.canBeEdited(): # pywikibot.output("%s is sysop-protected : this account can't edit " # "it! Skipping..." % pagename) diff --git a/scripts/reflinks.py b/scripts/reflinks.py index df99205..27a3702 100755 --- a/scripts/reflinks.py +++ b/scripts/reflinks.py @@ -682,7 +682,7 @@ if 'utf-8' not in enc: enc.append('utf-8') try: - u = linkedpagetext.decode(enc[0]) # Bug 67410 + u = linkedpagetext.decode(enc[0]) # Bug T69410 except (UnicodeDecodeError, LookupError) as e: pywikibot.output(u'%s : Decoding error - %s' % (ref.link, e)) continue diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 47c13da..3024a2a 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -58,7 +58,7 @@ generator = pagegenerators.PreloadingGenerator(generator) for image in generator: if not image.exists(): - pywikibot.output(u"File '%s' does not exist (see bug 69133)." + pywikibot.output("File '%s' does not exist (see bug T71133)." % image.title()) continue # Use fileUrl() and fileIsShared() to confirm it is local media diff --git a/tests/archivebot_tests.py b/tests/archivebot_tests.py index 910cf9f..7f30fbd 100644 --- a/tests/archivebot_tests.py +++ b/tests/archivebot_tests.py @@ -44,7 +44,7 @@ def test_archivebot(self, code=None): """Test archivebot for one site.""" site = self.get_site(code) - if code != 'de': # bug 67663 + if code != 'de': # bug T69663 page = pywikibot.Page(site, 'user talk:xqt') else: page = pywikibot.Page(site, 'user talk:ladsgroup') diff --git a/tests/script_tests.py b/tests/script_tests.py index 090ebc1..68d394d 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -139,9 +139,7 @@ # and not backtraces starting deep in the pywikibot package. no_args_expected_results = { # TODO: until done here, remember to set editor = None in user_config.py - 'editarticle': 'Nothing changed', # This masks related bug 68645 but that - # bug is more broadly about config - # rather than editarticle. + 'editarticle': 'Nothing changed', 'freebasemappingupload': 'Cannot find ', 'harvest_template': 'ERROR: Please specify', 'imageuncat': 'WARNING: This script is primarily written for Wikimedia Commons', @@ -154,7 +152,7 @@ 'replace': 'Press Enter to use this automatic message', 'script_wui': 'Pre-loading all relevant page contents', 'shell': ('>>> ', 'Welcome to the'), - 'transferbot': 'Target site not different from source site', # Bug 68662 + 'transferbot': 'Target site not different from source site', 'unusedfiles': ('Working on', None), 'watchlist': 'Retrieving watchlist',
diff --git a/tests/site_tests.py b/tests/site_tests.py index c3acec3..848b260 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -652,7 +652,7 @@ for cat in mysite.allcategories(total=5, prefix="Def"): self.assertIsInstance(cat, pywikibot.Category) self.assertTrue(cat.title(withNamespace=False).startswith("Def")) - # Bug # 15985 - reverse and start combined; fixed in v 1.14 + # Bug T17985 - reverse and start combined; fixed in v 1.14 for cat in mysite.allcategories(total=5, start="Hij", reverse=True): self.assertIsInstance(cat, pywikibot.Category) self.assertLessEqual(cat.title(withNamespace=False), "Hij") @@ -711,7 +711,7 @@ self.assertIsInstance(impage, pywikibot.FilePage) self.assertTrue(mysite.page_exists(impage)) self.assertGreaterEqual(impage.title(withNamespace=False), "Ba") - # Bug # 15985 - reverse and start combined; fixed in v 1.14 + # Bug T17985 - reverse and start combined; fixed in v 1.14 for impage in mysite.allimages(start="Da", reverse=True, total=5): self.assertIsInstance(impage, pywikibot.FilePage) self.assertTrue(mysite.page_exists(impage))
jenkins-bot has posted comments on this change.
Change subject: Replacing references from Bugzilla to Phabricator ......................................................................
Patch Set 5:
Post-merge build succeeded.
- pywikibot-core-tox-doc-publish https://integration.wikimedia.org/ci/job/pywikibot-core-tox-doc-publish/865/... : SUCCESS in 1m 33s
pywikibot-commits@lists.wikimedia.org