jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] proofreadpage_tests: Use correct class
......................................................................
[FIX] proofreadpage_tests: Use correct class
The `TestIndexPageMappings` test added in 6db08c93 did call the wrong super
class which skipped the test for bs4.
Change-Id: I4c07096003f7dbf0adcbfc944702aaf5ed9e0f0a
---
M tests/proofreadpage_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py
index bf682a2..6bf2181 100644
--- a/tests/proofreadpage_tests.py
+++ b/tests/proofreadpage_tests.py
@@ -323,7 +323,7 @@
@classmethod
def setUpClass(cls):
"""Prepare get_page dataset for tests."""
- super(IndexPageTestCase, cls).setUpClass()
+ super(TestIndexPageMappings, cls).setUpClass()
for key, site_def in cls.sites.items():
site = cls.get_site(name=key)
base_title = site_def['page']
--
To view, visit https://gerrit.wikimedia.org/r/238351
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4c07096003f7dbf0adcbfc944702aaf5ed9e0f0a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Add whitespace in docstrings
......................................................................
Add whitespace in docstrings
Fixes Sphinx errors:
- exceptions module
- pagegenerators module
- RcListenerThread
- ContextManagerWrapper
- MediaWikiVersion
Bug: T112491
Change-Id: I0b05d923dd5cde11bc6296ce85d3e1b832c9fe0e
---
M pywikibot/comms/rcstream.py
M pywikibot/exceptions.py
M pywikibot/pagegenerators.py
M pywikibot/tools/__init__.py
4 files changed, 28 insertions(+), 6 deletions(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/comms/rcstream.py b/pywikibot/comms/rcstream.py
index 438823a..68ebded 100644
--- a/pywikibot/comms/rcstream.py
+++ b/pywikibot/comms/rcstream.py
@@ -27,7 +27,7 @@
class RcListenerThread(threading.Thread):
"""
- Low-level RC Listener Thread, which reads the RC stream and pushes them to it's internal queue.
+ Low-level RC Listener Thread, pushing RC stream events into a queue.
@param wikihost: the hostname of the wiki we want to get changes for. This
is passed to rcstream using a 'subscribe' command. Pass
@@ -45,6 +45,7 @@
to a single site and pushes those entries into a queue.
Usage:
+
>>> t = RcListenerThread('en.wikipedia.org', 'stream.wikimedia.org')
>>> t.start()
>>> change = t.queue.get()
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index a8a8beb..4422660 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -3,6 +3,7 @@
Exception and warning classes used throughout the framework.
Error: Base class, all exceptions should the subclass of this class.
+
- NoUsername: Username is not in user-config.py, or it is invalid.
- UserBlocked: Username or IP has been blocked
- AutoblockUser: requested action on a virtual autoblock user not valid
@@ -16,10 +17,12 @@
- UnknownExtension: Extension is not defined for this site
SiteDefinitionError: Site loading problem
+
- UnknownSite: Site does not exist in Family
- UnknownFamily: Family is not registered
PageRelatedError: any exception which is caused by an operation on a Page.
+
- NoPage: Page does not exist
- IsRedirectPage: Page is a redirect page
- IsNotRedirectPage: Page is not a redirect page
@@ -31,6 +34,7 @@
PageSaveRelatedError: page exceptions within the save operation on a Page
(alias: PageNotSaved).
+
- SpamfilterError: MediaWiki spam filter detected a blacklisted URL
- OtherPageSaveError: misc. other save related exception.
- LockedPage: Page is locked
@@ -43,23 +47,27 @@
- NoCreateError: parameter nocreate not allow page creation
ServerError: a problem with the server.
+
- FatalServerError: A fatal/non-recoverable server error
WikiBaseError: any issue specific to Wikibase.
+
- CoordinateGlobeUnknownException: globe is not implemented yet.
- EntityTypeUnknownException: entity type is not available on the site.
DeprecationWarning: old functionality replaced by new functionality
PendingDeprecationWarning: problematic code which has not yet been
- fully deprecated, possibly because a replacement is not available
+fully deprecated, possibly because a replacement is not available
RuntimeWarning: problems developers should have fixed, and users need to
- be aware of its status.
+be aware of its status.
+
- tools._NotImplementedWarning: do not use
- NotImplementedWarning: functionality not implemented
UserWarning: warnings targetted at users
+
- config2._ConfigurationDeprecationWarning: user configuration file problems
- login._PasswordFileWarning: password file problems
- ArgumentDeprecationWarning: command line argument problems
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 8e42bf5..fa772e0 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -100,27 +100,36 @@
-logevents Work on articles that were on a specified Special:Log.
The value may be a comma separated list of three values:
+
logevent,username,total
+
To use the default value, use an empty string.
You have options for every type of logs given by the
log event parameter which could be one of the following:
+
block, protect, rights, delete, upload, move, import,
patrol, merge, suppress, review, stable, gblblock,
renameuser, globalauth, gblrights, abusefilter, newusers
+
It uses the default number of pages 10.
+
Examples:
+
-logevents:move gives pages from move log (usually redirects)
-logevents:delete,,20 gives 20 pages from deletion log
-logevents:protect,Usr gives pages from protect by user Usr
-logevents:patrol,Usr,20 gives 20 patroled pages by user Usr
+
In some cases it must be written as -logevents:"patrol,Usr,20"
-namespaces Filter the page generator to only yield pages in the
-namespace specified namespaces. Separate multiple namespace
-ns numbers or names with commas.
Examples:
+
-ns:0,2,4
-ns:Help,MediaWiki
+
If used with -newpages, -namepace/ns must be provided
before -newpages.
If used with -recentchanges, efficiency is improved if
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index af11913..20779d8 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -386,6 +386,7 @@
Two versions are equal if their normal version and dev version are equal. A
version is greater if the normal version or dev version is greater. For
example:
+
1.24 < 1.24.1 < 1.25wmf1 < 1.25alpha < 1.25beta1 < 1.25beta2
< 1.25-rc-1 < 1.25-rc.2 < 1.25
@@ -854,9 +855,12 @@
used as a context manager in with-statements. In such statements the value
set via 'as' is directly the wrapped object. For example:
- wrapped = ContextManagerWrapper(an_object)
- with wrapped as another_object:
- assert(another_object is an_object)
+ >>> class Wrapper(object):
+ ... def close(self): pass
+ >>> an_object = Wrapper()
+ >>> wrapped = ContextManagerWrapper(an_object)
+ >>> with wrapped as another_object:
+ ... assert another_object is an_object
It does not subclass the object though, so isinstance checks will fail
outside a with-statement.
--
To view, visit https://gerrit.wikimedia.org/r/238086
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0b05d923dd5cde11bc6296ce85d3e1b832c9fe0e
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] open_compressed: Update comment
......................................................................
[FIX] open_compressed: Update comment
When `open_compressed` was introduced in ef438c4a it was based on the XML
reader and contained a comment about uncompressed XML files. But the new
function does work on any content now so reflect that in the comment.
Change-Id: Iba602165d7050d9ee89064a1b992a4b93c3acabd
---
M pywikibot/tools/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index af11913..5776222 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -955,7 +955,7 @@
else:
return process.stdout
else:
- # assume it's an uncompressed XML file
+ # assume it's an uncompressed file
return open(filename, 'rb')
--
To view, visit https://gerrit.wikimedia.org/r/238329
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iba602165d7050d9ee89064a1b992a4b93c3acabd
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>