jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/568504 )

Change subject: [bugfix] remove sysop assignment in Site interfaces
......................................................................

[bugfix] remove sysop assignment in Site interfaces

Bug: T243906
Bug: T71283
Change-Id: Ief5e4b904e1789484027c127d868104b8146b4d8
---
M pywikibot/__init__.py
M tests/family_tests.py
M tests/site_detect_tests.py
M tests/utils.py
4 files changed, 5 insertions(+), 7 deletions(-)

Approvals:
  Dvorapa: Looks good to me, but someone else must approve
  Mpaa: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 5e33a21..cbb6ff3 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -1263,7 +1263,7 @@
     user = normalize_username(user)
     key = '%s:%s:%s:%s' % (interface.__name__, fam, code, user)
     if key not in _sites or not isinstance(_sites[key], interface):
-        _sites[key] = interface(code=code, fam=fam, user=user, sysop=None)
+        _sites[key] = interface(code=code, fam=fam, user=user)
         debug("Instantiated %s object '%s'"
               % (interface.__name__, _sites[key]), _logger)

diff --git a/tests/family_tests.py b/tests/family_tests.py
index d33c2a8..8c321a1 100644
--- a/tests/family_tests.py
+++ b/tests/family_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Tests for the family module."""
 #
-# (C) Pywikibot team, 2014-2019
+# (C) Pywikibot team, 2014-2020
 #
 # Distributed under the terms of the MIT license.
 #
@@ -178,7 +178,7 @@
         self.assertEqual(kwargs, {})
         self.assertEqual(code, self.current_code)
         self.assertEqual(fam, self.current_family)
-        site = DrySite(code, fam, None, None)
+        site = DrySite(code, fam, None)
         site._siteinfo._cache['general'] = ({'articlepath': self.article_path},
                                             True)
         return site
diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py
index a2fddc2..d1a1c04 100644
--- a/tests/site_detect_tests.py
+++ b/tests/site_detect_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Test for site detection."""
 #
-# (C) Pywikibot team, 2014-2019
+# (C) Pywikibot team, 2014-2020
 #
 # Distributed under the terms of the MIT license.
 #
@@ -339,8 +339,6 @@
         self.assertEqual(code, fam.code)
         self.assertEqual(fam.domain, self.NETLOC)
         self.assertEqual(user, self.USERNAME)
-        if not args and 'sysop' not in kwargs:
-            kwargs['sysop'] = None
         site = DrySite(code, fam, user, *args, **kwargs)
         site._siteinfo._cache.update(
             (key, (value, True))
diff --git a/tests/utils.py b/tests/utils.py
index f2536bc..56e5f09 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -365,7 +365,7 @@

     _loginstatus = pywikibot.site.LoginStatus.NOT_ATTEMPTED

-    def __init__(self, code, fam, user, sysop):
+    def __init__(self, code, fam, user):
         """Initializer."""
         super(DrySite, self).__init__(code, fam, user)
         self._userinfo = pywikibot.tools.EMPTY_DEFAULT

--
To view, visit https://gerrit.wikimedia.org/r/568504
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: Ief5e4b904e1789484027c127d868104b8146b4d8
Gerrit-Change-Number: 568504
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dvorapa <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to