jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/652585 )
Change subject: [cleanup] deprecate sysop parameter with FutureWarning
......................................................................
[cleanup] deprecate sysop parameter with FutureWarning
Change-Id: Ie9a3f46cfab8cac4f84187df871c46e49d3484a6
---
M pywikibot/site/__init__.py
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index 6dd0947..127e828 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -260,7 +260,7 @@
auth_token = get_authentication(self.base_url(''))
return auth_token is not None and len(auth_token) == 4
- @deprecated_args(sysop=None)
+ @deprecated_args(sysop=True)
def login(self, sysop=None, autocreate=False):
"""
Log the user in if not already logged in.
@@ -273,6 +273,11 @@
by the site.
@see: U{https://www.mediawiki.org/wiki/API:Login}
"""
+ if sysop is not None:
+ issue_deprecation_warning("'sysop' parameter",
+ warning_class=FutureWarning,
+ since='20201230')
+
# TODO: this should include an assert that loginstatus
# is not already IN_PROGRESS, however the
# login status may be left 'IN_PROGRESS' because
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/652585
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: Ie9a3f46cfab8cac4f84187df871c46e49d3484a6
Gerrit-Change-Number: 652585
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/652552 )
Change subject: [tests] set flake8-colors color option to 'always'
......................................................................
[tests] set flake8-colors color option to 'always'
flake8-colors 0.1.7 introduced a new behaviour and disabled colors
except color formatting is invoked interactively. With 0.1.9 a new
parameter 'color' was introduced which can be set
Bug: T270938
Change-Id: If6c420fa3e9c555b3cd6745fb9420bbba0be29c9
---
M setup.py
M tox.ini
2 files changed, 3 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/setup.py b/setup.py
index 76cd8ba..00ec8d2 100644
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,7 @@
'pydocstyle>=4.0.0',
'hacking',
'flake8-coding',
- 'flake8-colors',
+ 'flake8-colors>=0.1.9',
'flake8-comprehensions>=3.1.4;python_version>="3.8"',
'flake8-comprehensions>=2.2.0',
'flake8-docstrings>=1.3.1',
diff --git a/tox.ini b/tox.ini
index 07db505..908ddb8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -103,7 +103,9 @@
accept-encodings = utf-8
require-code = true
classmethod-decorators = classmethod,classproperty
+
# flake8-color format string
+color = always
format = ${blue}%(path)s${reset}: ${bold}line %(row)d:${reset}%(col)d: ${red_bold}%(code)s${reset} %(text)s
# The following are to be fixed
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/652552
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: If6c420fa3e9c555b3cd6745fb9420bbba0be29c9
Gerrit-Change-Number: 652552
Gerrit-PatchSet: 11
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/644188 )
Change subject: [doc] Announce support of MediaWiki < 1.23 is to be dropped
......................................................................
[doc] Announce support of MediaWiki < 1.23 is to be dropped
Bug: T268979
Change-Id: I019ff7c3d5fa3a5a1285ea19a6aaf3164e0e6cfb
---
M pywikibot/site/__init__.py
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index 28e6d8e..1a73ac8 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -1470,6 +1470,14 @@
pywikibot.error(msg)
raise
+ if MediaWikiVersion(version) < '1.23':
+ warn('\n'
+ + fill('Support of MediaWiki {version} will be dropped. '
+ 'It is recommended to use MediaWiki 1.23 or above. '
+ 'You may use every Pywikibot 5.X for older MediaWiki '
+ 'versions. See T268979 for further information.'
+ .format(version=version)), FutureWarning)
+
if MediaWikiVersion(version) < '1.19':
raise RuntimeError(
'Pywikibot "{}" does not support MediaWiki "{}".\n'
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/644188
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: I019ff7c3d5fa3a5a1285ea19a6aaf3164e0e6cfb
Gerrit-Change-Number: 644188
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged