jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/638414 )
Change subject: [IMPR] pywikibot.Site() parameters "interface" and
"url" must be keyworded
......................................................................
[IMPR] pywikibot.Site() parameters "interface" and "url" must be
keyworded
- For readability drop positional arguments for "interface", "url"
and deprecated "sysop"; they must be given as keyword arguments
Change-Id: Ie9f989cf92a5644e237bd3fa1c71da37011de966
---
M pywikibot/__init__.py
1 file changed, 2 insertions(+), 7 deletions(-)
Approvals:
Hazard-SJ: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index e9f40c7..008b223 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -58,7 +58,6 @@
from pywikibot.tools import (
classproperty,
deprecate_arg as _deprecate_arg,
- issue_deprecation_warning,
normalize_username,
MediaWikiVersion as _MediaWikiVersion,
ModuleDeprecationWrapper as _ModuleDeprecationWrapper,
@@ -1087,8 +1086,8 @@
@_deprecate_arg('sysop', None)
-def Site(code: Optional[str] = None, fam=None, user: Optional[str] = None,
- sysop=None, interface=None,
+def Site(code: Optional[str] = None, fam=None, user: Optional[str] = None, *,
+ interface=None,
url: Optional[str] = None) -> Union[APISite, DataSite, ClosedSite]:
"""A factory method to obtain a Site object.
@@ -1112,10 +1111,6 @@
"""
_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:
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/638414
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ie9f989cf92a5644e237bd3fa1c71da37011de966
Gerrit-Change-Number: 638414
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Hazard-SJ <hazardsjwiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged