jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/598694 )
Change subject: [IMPR] cc: enable replacements for more then two entries
......................................................................
[IMPR] cc: enable replacements for more then two entries
cosmetic_changes.py:
enable replacements for more then two entries in digits dict.
See also T220099
Change-Id: I8548b868d0f1cced9ab146258c70a8d849d19df5
---
M pywikibot/cosmetic_changes.py
1 file changed, 8 insertions(+), 6 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 37c3542..2f5666e 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -948,13 +948,15 @@
# FIXME: use textlib.NON_LATIN_DIGITS
# valid digits
digits = {
- 'ckb': '٠١٢٣٤٥٦٧٨٩',
- 'fa': '۰۱۲۳۴۵۶۷۸۹',
+ 'ckb': ('٠١٢٣٤٥٦٧٨٩', 'fa'),
+ 'fa': ('۰۱۲۳۴۵۶۷۸۹', 'ckb'),
}
- faChrs = 'ءاآأإئؤبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهیةيك' + digits['fa']
- new = digits.pop(self.site.code)
- # This only works if there are only two items in digits dict
- old = digits[list(digits.keys())[0]]
+ faChrs = 'ءاآأإئؤبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهیةيك' + digits['fa'][0]
+
+ # For replacing old digits by new one
+ new, old_key = digits[self.site.code]
+ old = digits[old_key][0]
+
# not to let bot edits in latin content
exceptions.append(re.compile('[^%(fa)s] *?\"*? *?, *?[^%(fa)s]'
% {'fa': faChrs}))
--
To view, visit https://gerrit.wikimedia.org/r/598694
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: I8548b868d0f1cced9ab146258c70a8d849d19df5
Gerrit-Change-Number: 598694
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Huji <huji.huji(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/594106 )
Change subject: [doc] The next tagged release is the last supporting Python 2
......................................................................
[doc] The next tagged release is the last supporting Python 2
Dropping python 2.7 process was startet in January 2019.
Deprecation warning for both versons is shown after May 2019.
The next release is announced for July 2020 which is the last
supporting Python 2 and Python 3.4
Bug: T213287
Change-Id: Iaad78f5e5ae3b0f007c03a8a7dee898018470de2
---
M ROADMAP.rst
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index ed87e3b..2ab166d 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,7 +1,7 @@
Current release
~~~~~~~~~~~~~~~
-* (currently empty)
+ **Note: This is the last release supporting Python 2 and Python 3.4**
Future releases
~~~~~~~~~~~~~~~
--
To view, visit https://gerrit.wikimedia.org/r/594106
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: Iaad78f5e5ae3b0f007c03a8a7dee898018470de2
Gerrit-Change-Number: 594106
Gerrit-PatchSet: 6
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/282524 )
Change subject: [bugfix] fix getversion_svn for Python 3.6+
......................................................................
[bugfix] fix getversion_svn for Python 3.6+
- fix getversion_svn for Python 3.6+ which has a different
value for struct_time.n_fields attribute; use len() instead.
- pathlib is mandatory for pywikibot. It is no longer necessary
to have a fallback to os.
- remove getversion_svn deprecation warning
getversion_svn_setuptools uses svn_utils from setuptools
or setuptools_svn. Both aren't included neither in Python 3
nor in Python 2. It is not usefull to recommend installing
an external library to just get the version.
getversion_svn is still working and needed as a fallback
if external packages aren't installed. Do no longer show a
deprecation warning which is not appropriate.
Bug: T253617
Bug: T132292
Change-Id: I66ae3f6a4ba5a7be343ec10c6f8e9671894763f5
---
M pywikibot/version.py
1 file changed, 6 insertions(+), 16 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/version.py b/pywikibot/version.py
index 696d72e..3806e06 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Module to determine the pywikibot version (tag, revision and date)."""
#
-# (C) Pywikibot team, 2007-2019
+# (C) Pywikibot team, 2007-2020
#
# Distributed under the terms of the MIT license.
#
@@ -34,10 +34,8 @@
try:
import pathlib
except ImportError:
- try:
- import pathlib2 as pathlib
- except ImportError as e:
- pathlib = e
+ import pathlib2 as pathlib # Python 2
+
import pywikibot
@@ -148,7 +146,6 @@
return cache
-@deprecated('getversion_svn_setuptools', since='20150405')
def svn_rev_info(path):
"""Fetch information about the current revision of an Subversion checkout.
@@ -254,7 +251,6 @@
return (tag, rev, date, hsh)
-@deprecated('getversion_svn_setuptools', since='20150405')
def getversion_svn(path=None):
"""Get version info for a Subversion checkout.
@@ -274,7 +270,7 @@
# date.tm_isdst is -1 means unknown state
# compare its contents except daylight saving time status
else:
- for i in range(date.n_fields - 1):
+ for i in range(len(date) - 1):
assert date[i] == date2[i], 'Date of version is not consistent'
rev = 's%s' % rev
@@ -570,16 +566,10 @@
# Remove any pywikibot sub-modules which were loaded as a package.
# e.g. 'wikipedia_family.py' is loaded as 'wikipedia'
_program_dir = _get_program_dir()
- if isinstance(pathlib, Exception):
- dir_parts = _program_dir.split(os.sep)
- else:
- dir_parts = pathlib.Path(_program_dir).parts
+ dir_parts = pathlib.Path(_program_dir).parts
length = len(dir_parts)
for path, name in paths.items():
- if isinstance(pathlib, Exception):
- lib_parts = os.path.normpath(path).split(os.sep)
- else:
- lib_parts = pathlib.Path(path).parts
+ lib_parts = pathlib.Path(path).parts
if dir_parts != lib_parts[:length]:
continue
if lib_parts[length] != '.tox':
--
To view, visit https://gerrit.wikimedia.org/r/282524
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: I66ae3f6a4ba5a7be343ec10c6f8e9671894763f5
Gerrit-Change-Number: 282524
Gerrit-PatchSet: 5
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/604697 )
Change subject: [doc] Prepare next release
......................................................................
[doc] Prepare next release
Change-Id: Ica658410235a9707f3755787b17fa999483bff73
---
M HISTORY.rst
M ROADMAP.rst
M docs/conf.py
3 files changed, 15 insertions(+), 9 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index dc66a9c..c06fb54 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,19 @@
Release history
===============
+3.0.20200609
+------------
+
+* Usage of SkipPageError with BaseBot has been removed
+* Throttle requests after ratelimits exceeded (T253180)
+* Make Pywikibot daemon logs unexecutable (T253472)
+* Check for missing generator after BaseBot.setup() call
+* Do not change usernames when creating a Site (T253127)
+* pagegenerators: handle protocols in -weblink (T251308, T251310)
+* Bugfixes and improvements
+* Localisation updates
+
+
3.0.20200508
------------
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 2a23552..ed87e3b 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,14 +1,7 @@
Current release
~~~~~~~~~~~~~~~
-* Usage of SkipPageError with BaseBot has been removed
-* Throttle requests after ratelimits exceeded (T253180)
-* Make Pywikibot daemon logs unexecutable (T253472)
-* Check for missing generator after BaseBot.setup() call
-* Do not change usernames when creating a Site (T253127)
-* pagegenerators: handle protocols in -weblink (T251308, T251310)
-* Bugfixes and improvements
-* Localisation updates
+* (currently empty)
Future releases
~~~~~~~~~~~~~~~
diff --git a/docs/conf.py b/docs/conf.py
index 284c318..6b934c4 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -71,7 +71,7 @@
# The short X.Y version.
version = '3.0'
# The full version, including alpha/beta/rc tags.
-release = '3.0.20200508'
+release = '3.0.20200609'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
--
To view, visit https://gerrit.wikimedia.org/r/604697
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: Ica658410235a9707f3755787b17fa999483bff73
Gerrit-Change-Number: 604697
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/603967 )
Change subject: [bugfix] Skip Sphinx 3.1.0
......................................................................
[bugfix] Skip Sphinx 3.1.0
https://github.com/sphinx-doc/sphinx/issues/7805
Change-Id: I694f1be3593c6fc95928d24677f313705b70952b
---
M docs/requirements-py3.txt
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/requirements-py3.txt b/docs/requirements-py3.txt
index 1265fa8..8f6e55c 100644
--- a/docs/requirements-py3.txt
+++ b/docs/requirements-py3.txt
@@ -2,5 +2,5 @@
# using sphinx on python3.4.
# requirements.txt and pywikibot[security] are also needed
-sphinx >= 1.8
-sphinx-epytext>=0.0.4
\ No newline at end of file
+sphinx >= 1.8, != 3.1.0
+sphinx-epytext >= 0.0.4
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/603967
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: I694f1be3593c6fc95928d24677f313705b70952b
Gerrit-Change-Number: 603967
Gerrit-PatchSet: 3
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)