jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/569286 )
Change subject: [IMPR] Issue DeprecationWarning for sysop in Site()
......................................................................
[IMPR] Issue DeprecationWarning for sysop in Site()
Issue DeprecationWarning for sysop in Site()
Change-Id: I79fcfb475ea67ff9913d63a20536c3e5bc087b86
---
M pywikibot/__init__.py
M tests/utils.py
2 files changed, 6 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index cbb6ff3..c8a66dc 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -62,6 +62,7 @@
classproperty,
deprecated as __deprecated,
deprecate_arg as _deprecate_arg,
+ issue_deprecation_warning,
normalize_username,
MediaWikiVersion as _MediaWikiVersion,
redirect_func,
@@ -1222,6 +1223,10 @@
"""
_logger = 'wiki'
+ if sysop is not None:
+ issue_deprecation_warning('positional argument of "sysop"',
depth=3,
+ warning_class=DeprecationWarning,
+ since='20190907')
if url:
# Either code and fam or only url
if code or fam:
diff --git a/tests/utils.py b/tests/utils.py
index 56e5f09..f9118da 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -601,7 +601,7 @@
@type command: list of unicode
"""
if PY2 or PYTHON_VERSION < (3, 5, 0):
- command.insert(1, '-W ignore::FutureWarning:pywikibot:127')
+ command.insert(1, '-W ignore::FutureWarning:pywikibot:128')
if cryptography_version and cryptography_version < [1, 3, 4]:
command.insert(1, '-W ignore:Old version of cryptography:Warning')
# Any environment variables added on Windows must be of type
--
To view, visit
https://gerrit.wikimedia.org/r/569286
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: I79fcfb475ea67ff9913d63a20536c3e5bc087b86
Gerrit-Change-Number: 569286
Gerrit-PatchSet: 6
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)