jenkins-bot submitted this change.
[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(-)
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 change 638414. To unsubscribe, or for help writing mail filters, visit settings.