jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[7.7.2] Backport T324310 changes to stable

Also update languages_by_size and adjust jenkins tests

Bug: T324310
Change-Id: If20b7e0e3cf246ac91cce4a53bde34174bc6b2d6
---
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikibooks_family.py
M pywikibot/textlib.py
M tests/site_detect_tests.py
M setup.py
M pywikibot/__metadata__.py
M pywikibot/page/_wikibase.py
R docs/requirements.txt
M pywikibot/families/wikiquote_family.py
M pywikibot/bot.py
M pywikibot/families/wiktionary_family.py
M tox.ini
M pywikibot/families/wikipedia_family.py
13 files changed, 124 insertions(+), 83 deletions(-)

diff --git a/docs/requirements-py3.txt b/docs/requirements.txt
similarity index 100%
rename from docs/requirements-py3.txt
rename to docs/requirements.txt
diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index 276a423..7081716 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -11,7 +11,7 @@


__name__ = 'pywikibot'
-__version__ = '7.7.1'
+__version__ = '7.7.2'
__description__ = 'Python MediaWiki Bot Framework'
__maintainer__ = 'The Pywikibot team'
__maintainer_email__ = 'pywikibot@lists.wikimedia.org'
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 6aaa9f0..9d86e97 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -699,7 +699,7 @@
self._default = default
self._quit = automatic_quit

- current_match_type = Optional[Tuple[ # skipcq: PYL-W0612
+ current_match_type = Optional[Tuple[ # noqa: F841
PageLinkType,
str,
Mapping[str, str],
diff --git a/pywikibot/families/wikibooks_family.py b/pywikibot/families/wikibooks_family.py
index bf28930..5f230d2 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -30,9 +30,9 @@

languages_by_size = [
'en', 'hu', 'de', 'vi', 'fr', 'it', 'ja', 'pt', 'es', 'nl', 'pl', 'id',
- 'he', 'fi', 'zh', 'sq', 'az', 'fa', 'ru', 'ca', 'eu', 'th', 'da', 'ko',
- 'ba', 'sv', 'gl', 'cs', 'hi', 'sr', 'uk', 'hr', 'no', 'tr', 'sa', 'ar',
- 'ta', 'eo', 'sk', 'is', 'bn', 'ro', 'si', 'bg', 'ms', 'ka', 'mk', 'tt',
+ 'he', 'fi', 'zh', 'fa', 'sq', 'az', 'ru', 'ca', 'eu', 'th', 'cs', 'da',
+ 'ko', 'ba', 'sv', 'gl', 'hi', 'sr', 'uk', 'hr', 'no', 'tr', 'sa', 'ar',
+ 'ta', 'bn', 'eo', 'sk', 'is', 'ro', 'si', 'bg', 'ms', 'ka', 'mk', 'tt',
'lt', 'el', 'li', 'sl', 'tl', 'ur', 'km', 'la', 'mr', 'kk', 'te', 'et',
'be', 'ia', 'ml', 'oc', 'hy', 'ne', 'pa', 'cv', 'tg', 'ku', 'fy', 'af',
'bs', 'cy', 'mg', 'ky',
diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py
index 619f5ab..010ffc8 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -28,35 +28,35 @@
languages_by_size = [
'en', 'ceb', 'de', 'sv', 'fr', 'nl', 'ru', 'es', 'it', 'arz', 'pl',
'ja', 'zh', 'vi', 'war', 'uk', 'ar', 'pt', 'fa', 'ca', 'sr', 'id',
- 'ko', 'no', 'fi', 'tr', 'hu', 'cs', 'ce', 'sh', 'ro', 'zh-min-nan',
- 'tt', 'eu', 'ms', 'eo', 'he', 'hy', 'da', 'bg', 'cy', 'azb', 'sk',
- 'kk', 'et', 'min', 'be', 'simple', 'el', 'hr', 'lt', 'gl', 'az', 'sl',
- 'ur', 'uz', 'ka', 'nn', 'hi', 'th', 'ta', 'la', 'mk', 'ast', 'bn',
- 'zh-yue', 'lv', 'tg', 'af', 'my', 'mg', 'bs', 'oc', 'mr', 'sq', 'nds',
- 'ky', 'ml', 'be-tarask', 'te', 'sw', 'br', 'new', 'jv', 'vec', 'ht',
- 'pms', 'pnb', 'su', 'lb', 'ba', 'lld', 'ga', 'szl', 'lmo', 'ku', 'is',
- 'cv', 'fy', 'ckb', 'tl', 'wuu', 'an', 'sco', 'diq', 'pa', 'io', 'ne',
- 'vo', 'yo', 'gu', 'als', 'kn', 'bar', 'scn', 'ia', 'bpy', 'avk', 'qu',
- 'mn', 'nv', 'crh', 'xmf', 'ha', 'si', 'bat-smg', 'os', 'frr', 'or',
- 'ps', 'gd', 'ban', 'cdo', 'yi', 'bug', 'ilo', 'sd', 'am', 'nap', 'sah',
- 'hsb', 'fo', 'li', 'map-bms', 'mai', 'mzn', 'gor', 'eml', 'ace', 'bcl',
- 'shn', 'sa', 'zh-classical', 'wa', 'ie', 'lij', 'as', 'ig', 'zu',
- 'mhr', 'mrj', 'hyw', 'hif', 'mni', 'km', 'hak', 'roa-tara', 'pam',
- 'sn', 'so', 'nso', 'rue', 'bh', 'se', 'myv', 'vls', 'nds-nl', 'mi',
- 'sat', 'sc', 'nah', 'vep', 'tum', 'gan', 'kab', 'glk', 'tk', 'fiu-vro',
- 'co', 'bo', 'ab', 'ary', 'gv', 'frp', 'kw', 'kv', 'pcd', 'csb', 'ug',
- 'udm', 'skr', 'zea', 'ay', 'gn', 'mt', 'nrm', 'bjn', 'smn', 'lez',
- 'lfn', 'stq', 'lo', 'olo', 'mwl', 'fur', 'rm', 'ang', 'rw', 'lad',
- 'gom', 'koi', 'ext', 'tyv', 'dsb', 'dty', 'ln', 'av', 'cbk-zam', 'dv',
- 'ksh', 'gag', 'pap', 'bxr', 'pfl', 'pag', 'pi', 'haw', 'awa', 'tay',
- 'ks', 'tw', 'inh', 'dag', 'krc', 'szy', 'xal', 'mdf', 'kaa', 'za',
- 'pdc', 'atj', 'to', 'arc', 'tcy', 'kbp', 'jam', 'na', 'wo', 'kbd',
- 'nia', 'nov', 'tet', 'ki', 'mnw', 'lg', 'bi', 'tpi', 'nqo', 'jbo',
- 'roa-rup', 'fj', 'lbe', 'kg', 'xh', 'ty', 'cu', 'shi', 'srn', 'trv',
- 'om', 'guw', 'sm', 'gcr', 'alt', 'blk', 'chr', 'ltg', 'ny', 'pih',
- 'got', 'mad', 'st', 'ami', 'tn', 'bm', 've', 'rmy', 'ts', 'chy', 'rn',
- 'iu', 'ak', 'ss', 'ff', 'ch', 'kcg', 'pnt', 'ady', 'ik', 'ee', 'pcm',
- 'sg', 'din', 'pwn', 'kl', 'ti', 'dz', 'cr',
+ 'ko', 'no', 'fi', 'tr', 'hu', 'cs', 'ce', 'sh', 'tt', 'ro',
+ 'zh-min-nan', 'eu', 'ms', 'eo', 'he', 'hy', 'da', 'bg', 'cy', 'sk',
+ 'azb', 'kk', 'et', 'min', 'be', 'simple', 'el', 'hr', 'uz', 'lt', 'gl',
+ 'az', 'ur', 'sl', 'ka', 'nn', 'hi', 'th', 'ta', 'la', 'mk', 'bn',
+ 'ast', 'zh-yue', 'lv', 'tg', 'af', 'my', 'mg', 'bs', 'mr', 'oc', 'sq',
+ 'nds', 'ky', 'be-tarask', 'ml', 'te', 'br', 'sw', 'new', 'jv', 'lld',
+ 'vec', 'ht', 'pnb', 'pms', 'su', 'lb', 'ba', 'ku', 'ga', 'lmo', 'szl',
+ 'is', 'cv', 'fy', 'ckb', 'tl', 'an', 'wuu', 'diq', 'sco', 'pa', 'io',
+ 'vo', 'yo', 'ne', 'gu', 'als', 'kn', 'ia', 'bar', 'scn', 'avk', 'bpy',
+ 'qu', 'crh', 'mn', 'nv', 'xmf', 'ha', 'si', 'bat-smg', 'ban', 'ps',
+ 'os', 'frr', 'or', 'sah', 'gd', 'bug', 'cdo', 'yi', 'ilo', 'sd', 'am',
+ 'nap', 'li', 'hsb', 'fo', 'map-bms', 'gor', 'mai', 'mzn', 'ig', 'eml',
+ 'bcl', 'ace', 'shn', 'zh-classical', 'sa', 'wa', 'ie', 'lij', 'as',
+ 'zu', 'mhr', 'mrj', 'hyw', 'hif', 'mni', 'bjn', 'hak', 'km', 'sn',
+ 'roa-tara', 'pam', 'so', 'nso', 'rue', 'bh', 'tum', 'se', 'myv', 'vls',
+ 'sat', 'mi', 'nds-nl', 'sc', 'nah', 'vep', 'tk', 'kab', 'gan', 'glk',
+ 'co', 'fiu-vro', 'kw', 'ary', 'ab', 'bo', 'gv', 'frp', 'skr', 'dag',
+ 'ug', 'kv', 'pcd', 'zea', 'udm', 'csb', 'ay', 'mt', 'gn', 'nrm', 'smn',
+ 'lez', 'lfn', 'stq', 'olo', 'rw', 'lo', 'mwl', 'ang', 'fur', 'rm',
+ 'lad', 'gom', 'koi', 'ext', 'tyv', 'dsb', 'dty', 'ln', 'av', 'cbk-zam',
+ 'dv', 'pap', 'ksh', 'gag', 'bxr', 'kaa', 'pfl', 'pag', 'pi', 'ks',
+ 'szy', 'haw', 'awa', 'tay', 'za', 'mdf', 'tw', 'inh', 'blk', 'krc',
+ 'xal', 'pdc', 'atj', 'to', 'arc', 'tcy', 'kbp', 'mnw', 'jam', 'na',
+ 'wo', 'kbd', 'lg', 'nia', 'nov', 'ki', 'bi', 'nqo', 'tpi', 'tet',
+ 'shi', 'jbo', 'roa-rup', 'fj', 'lbe', 'kg', 'xh', 'ty', 'cu', 'guw',
+ 'srn', 'trv', 'om', 'sm', 'alt', 'gcr', 'chr', 'ltg', 'tn', 'ny', 'st',
+ 'pih', 'mad', 'got', 'ami', 'bm', 'rmy', 've', 'ts', 'chy', 'ff', 'rn',
+ 'ss', 'ak', 'kcg', 'iu', 'ch', 'pnt', 'ee', 'ady', 'ik', 'pcm', 'sg',
+ 'din', 'pwn', 'kl', 'ti', 'dz', 'cr',
]

# Sites we want to edit but not count as real languages
diff --git a/pywikibot/families/wikiquote_family.py b/pywikibot/families/wikiquote_family.py
index 8a6c39c..db85f3f 100644
--- a/pywikibot/families/wikiquote_family.py
+++ b/pywikibot/families/wikiquote_family.py
@@ -27,13 +27,13 @@
]

languages_by_size = [
- 'it', 'en', 'pl', 'ru', 'cs', 'et', 'pt', 'fa', 'uk', 'de', 'fr', 'he',
+ 'it', 'en', 'pl', 'ru', 'cs', 'et', 'pt', 'fa', 'uk', 'de', 'he', 'fr',
'es', 'eo', 'tr', 'sk', 'bs', 'ca', 'az', 'fi', 'sl', 'zh', 'lt', 'ar',
- 'bg', 'hy', 'hr', 'sr', 'el', 'su', 'nn', 'id', 'sv', 'li', 'hu', 'ko',
- 'nl', 'sah', 'ja', 'la', 'ta', 'gl', 'gu', 'ur', 'be', 'te', 'vi',
- 'cy', 'no', 'ml', 'sq', 'hi', 'kn', 'eu', 'ro', 'ku', 'uz', 'ka', 'da',
- 'sa', 'is', 'br', 'mr', 'af', 'th', 'wo', 'ky', 'ig', 'bcl', 'tl',
- 'bn',
+ 'sr', 'bg', 'hy', 'hr', 'el', 'su', 'nn', 'id', 'sv', 'li', 'hu', 'ko',
+ 'nl', 'sah', 'ja', 'la', 'ta', 'gl', 'gu', 'ur', 'ig', 'hi', 'be',
+ 'te', 'vi', 'tl', 'cy', 'no', 'ml', 'sq', 'kn', 'bn', 'ro', 'eu', 'ku',
+ 'uz', 'ka', 'da', 'sa', 'is', 'bcl', 'br', 'mr', 'af', 'th', 'wo',
+ 'ky',
]

category_redirect_templates = {
diff --git a/pywikibot/families/wikisource_family.py b/pywikibot/families/wikisource_family.py
index 8a676d1..388e2a3 100644
--- a/pywikibot/families/wikisource_family.py
+++ b/pywikibot/families/wikisource_family.py
@@ -25,12 +25,12 @@
]

languages_by_size = [
- 'pl', 'en', 'ru', 'de', 'fr', 'zh', 'he', 'it', 'es', 'uk', 'ar', 'cs',
- 'mul', 'gu', 'sr', 'pt', 'fa', 'sv', 'bn', 'hu', 'ko', 'ml', 'ta',
- 'sa', 'te', 'sl', 'tr', 'hy', 'la', 'el', 'vi', 'ja', 'ro', 'fi',
- 'nap', 'nl', 'az', 'ca', 'br', 'be', 'kn', 'no', 'hr', 'th', 'id',
+ 'pl', 'en', 'ru', 'de', 'fr', 'zh', 'he', 'it', 'uk', 'es', 'ar', 'cs',
+ 'mul', 'gu', 'sr', 'pt', 'fa', 'sv', 'bn', 'hu', 'ko', 'ta', 'ml',
+ 'sa', 'te', 'sl', 'tr', 'la', 'hy', 'el', 'vi', 'ja', 'ro', 'fi',
+ 'nap', 'nl', 'be', 'az', 'ca', 'br', 'kn', 'no', 'hr', 'id', 'th',
'eo', 'hi', 'is', 'vec', 'pms', 'ban', 'mr', 'cy', 'da', 'lij', 'et',
- 'mk', 'as', 'yi', 'bg', 'li', 'wa', 'lt', 'jv', 'pa', 'eu', 'or', 'gl',
+ 'mk', 'as', 'yi', 'bg', 'li', 'wa', 'jv', 'lt', 'pa', 'eu', 'or', 'gl',
'bs', 'sah', 'sk', 'zh-min-nan', 'fo',
]

diff --git a/pywikibot/families/wiktionary_family.py b/pywikibot/families/wiktionary_family.py
index b695432..7977678 100644
--- a/pywikibot/families/wiktionary_family.py
+++ b/pywikibot/families/wiktionary_family.py
@@ -28,20 +28,20 @@

languages_by_size = [
'en', 'fr', 'mg', 'zh', 'ru', 'de', 'es', 'sh', 'sv', 'nl', 'el', 'pl',
- 'ku', 'lt', 'ca', 'it', 'fi', 'ta', 'hu', 'tr', 'io', 'ja', 'hy', 'ko',
+ 'ku', 'lt', 'ca', 'it', 'fi', 'ta', 'hu', 'tr', 'ja', 'io', 'hy', 'ko',
'pt', 'kn', 'vi', 'sr', 'th', 'hi', 'ro', 'no', 'id', 'et', 'cs', 'ml',
- 'my', 'uz', 'li', 'or', 'eo', 'te', 'fa', 'skr', 'gl', 'ar', 'oc',
- 'jv', 'az', 'eu', 'uk', 'br', 'ast', 'is', 'da', 'lo', 'simple', 'bn',
- 'sg', 'la', 'hr', 'fj', 'tg', 'sk', 'ky', 'mnw', 'bg', 'wa', 'shn',
- 'ur', 'ps', 'cy', 'vo', 'he', 'om', 'sl', 'af', 'zh-min-nan', 'scn',
- 'lmo', 'tl', 'pa', 'sw', 'fy', 'ms', 'nn', 'ka', 'lv', 'min', 'sq',
+ 'my', 'uz', 'li', 'skr', 'or', 'eo', 'te', 'fa', 'gl', 'ar', 'oc',
+ 'jv', 'az', 'eu', 'uk', 'br', 'ast', 'is', 'sg', 'bn', 'da', 'lo',
+ 'simple', 'la', 'hr', 'mnw', 'fj', 'sk', 'tg', 'shn', 'ky', 'bg', 'wa',
+ 'ur', 'ps', 'cy', 'vo', 'he', 'om', 'sl', 'af', 'zh-min-nan', 'lmo',
+ 'scn', 'tl', 'pa', 'ms', 'sw', 'fy', 'nn', 'ka', 'lv', 'min', 'sq',
'nds', 'lb', 'co', 'mn', 'pnb', 'bs', 'nah', 'yue', 'sa', 'kk', 'km',
- 'diq', 'vec', 'be', 'tk', 'mk', 'nia', 'sm', 'hsb', 'ks', 'shy', 'su',
+ 'vec', 'be', 'diq', 'tk', 'mk', 'nia', 'sm', 'hsb', 'ks', 'shy', 'su',
'gd', 'ga', 'bcl', 'an', 'gom', 'mr', 'wo', 'mni', 'ia', 'ang', 'mt',
- 'sd', 'fo', 'tt', 'gn', 'so', 'ie', 'mi', 'csb', 'ug', 'si', 'st',
- 'roa-rup', 'tpi', 'hif', 'kl', 'bjn', 'ha', 'zu', 'guw', 'ay', 'jbo',
- 'yi', 'ln', 'gu', 'na', 'gv', 'kw', 'am', 'ne', 'rw', 'ts', 'qu', 'ss',
- 'iu', 'chr', 'dv', 'ti', 'tn', 'ig',
+ 'fo', 'sd', 'tt', 'gn', 'bjn', 'so', 'ie', 'mi', 'csb', 'ug', 'si',
+ 'st', 'ha', 'roa-rup', 'tpi', 'hif', 'guw', 'kl', 'zu', 'ay', 'jbo',
+ 'yi', 'ln', 'gu', 'na', 'gv', 'kw', 'am', 'ne', 'rw', 'ts', 'ig', 'qu',
+ 'ss', 'iu', 'chr', 'dv', 'ti', 'tn',
]

category_redirect_templates = {
diff --git a/pywikibot/page/_wikibase.py b/pywikibot/page/_wikibase.py
index 2418cd8..14e7d5b 100644
--- a/pywikibot/page/_wikibase.py
+++ b/pywikibot/page/_wikibase.py
@@ -1936,7 +1936,7 @@
>>> repo = pywikibot.Site('wikidata')
>>> L2 = pywikibot.LexemePage(repo, 'L2') # create a Lexeme page
>>> list(L2.claims.keys()) # access the claims
- ['P5831', 'P5402']
+ ['P5402', 'P5831']
>>> len(L2.forms) # access the forms
2
>>> F1 = L2.forms[0] # access the first form
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index f8e1675..38687ed 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -25,7 +25,12 @@
from pywikibot.exceptions import InvalidTitleError, SiteDefinitionError
from pywikibot.family import Family
from pywikibot.time import TZoneFixedOffset
-from pywikibot.tools import ModuleDeprecationWrapper, deprecated
+from pywikibot.tools import (
+ ModuleDeprecationWrapper,
+ deprecated,
+ first_lower,
+ first_upper,
+)
from pywikibot.userinterfaces.transliteration import NON_LATIN_DIGITS


@@ -1838,13 +1843,18 @@
self.site = pywikibot.Site() if site is None else site

self.origNames2monthNum = {}
- for n, (_long, _short) in enumerate(self.site.months_names, start=1):
- self.origNames2monthNum[_long] = n
- self.origNames2monthNum[_short] = n
- # in some cases month in ~~~~ might end without dot even if
- # site.months_names do not.
- if _short.endswith('.'):
- self.origNames2monthNum[_short[:-1]] = n
+ # use first_lower/first_upper for 'vi' language because monthsnames
+ # were changed: T324310
+ functions = [first_upper,
+ first_lower] if self.site.lang == 'vi' else [str]
+ for n, (long, short) in enumerate(self.site.months_names, start=1):
+ for func in functions:
+ self.origNames2monthNum[func(long)] = n
+ self.origNames2monthNum[func(short)] = n
+ # in some cases month in ~~~~ might end without dot even if
+ # site.months_names do not.
+ if short.endswith('.'):
+ self.origNames2monthNum[func(short[:-1])] = n

self.groups = ['year', 'month', 'hour', 'time', 'day', 'minute',
'tzinfo']
diff --git a/setup.py b/setup.py
index c1e9957..74af5f8 100755
--- a/setup.py
+++ b/setup.py
@@ -87,7 +87,9 @@
'flake8-docstrings>=1.3.1',
'verve-flake8-mock>=0.4',
'flake8-print>=2.0.1',
- 'flake8-quotes>=2.0.1',
+ # flake8-quotes is incompatible with flake8 6 (T323752),
+ # jenkins CI ignores "3.8.1"
+ 'flake8-quotes>=3.3.0; python_version < "3.8"',
'flake8-string-format',
'flake8-tuple>=0.2.8',
'flake8-no-u-prefixed-strings>=0.2',
@@ -97,8 +99,8 @@
'hacking': [
'hacking',
# importlib-metadata module already installed with hacking 4.1.0
- # but importlib-metadata 5.0.0 fails, so adjust it
- 'importlib-metadata!=5.0.0',
+ # but importlib-metadata 5 fails, so adjust it
+ 'importlib-metadata<5.0.0; python_version < "3.8"',
],
}

diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py
index 2ac6ffc..a96e3ff 100755
--- a/tests/site_detect_tests.py
+++ b/tests/site_detect_tests.py
@@ -130,10 +130,6 @@
"""Test detection of MediaWiki sites for www.otterstedt.de."""
self.assertNoSite('http://www.otterstedt.de/wiki/index.php/$1')

- def test_mozillazine(self):
- """Test detection of MediaWiki sites for kb.mozillazine.org."""
- self.assertNoSite('http://kb.mozillazine.org/$1')
-

class APIHiddenTestCase(SiteDetectionTestCase):

diff --git a/tox.ini b/tox.ini
index 4f0e1f0..ec44541 100644
--- a/tox.ini
+++ b/tox.ini
@@ -22,11 +22,14 @@
py36: python3.6
py37: python3.7
py38: python3.8
+ py39: python3.9
setenv =
VIRTUAL_ENV={envdir}
PYWIKIBOT_NO_USER_CONFIG=2
+ PYWIKIBOT_TEST_RUNNING=1
usedevelop = True
commands =
+ python --version
flake8: flake8 --version
flake8-py36: flake8 --doctests {posargs} {[params]exclude}
flake8-py38: flake8 --doctests {posargs}
@@ -35,7 +38,8 @@
hacking: flake8 --format=default {posargs}

deeptest: python {[params]generate_user_files}
- deeptest: python -m unittest discover -vv -p "*_tests.py"
+ deeptest-py36: python -m unittest discover -vv -p "*_tests.py"
+ deeptest-py39: pytest

fasttest: python {[params]generate_user_files}
fasttest: pytest --version
@@ -44,20 +48,22 @@
flake8: .[flake8]
hacking: .[hacking]

- fasttest: pytest >= 5.3
+ fasttest: pytest >= 7.0.1
fasttest: pytest-attrib>=0.1.3
fasttest: pytest-subtests >= 0.3.2
fasttest: mock
fasttest: .[mwparserfromhell]
fasttest: .[scripts]

- fasttest-py35: .[html]
+ fasttest-py36: .[html]
fasttest-py37: .[wikitextparser]

deeptest: .[html]
deeptest: .[mwparserfromhell]
deeptest: .[scripts]
- deeptest: .[wikitextparser]
+ deeptest-py39: .[wikitextparser]
+ deeptest-py39: pytest >= 7.0.1
+ deeptest-py39: pytest-subtests >= 0.3.2

[testenv:commit-message]
basepython = python3
@@ -80,13 +86,29 @@
commands = {posargs}

[testenv:doc]
+basepython = python3.7
commands =
- sphinx-build -M html ./docs ./docs/_build
- rstcheck --recursive --report warning --ignore-roles api,phab .
-basepython = python3.6
+ sphinx-build -M html ./docs ./docs/_build -j auto
deps =
-rrequirements.txt
- -rdocs/requirements-py3.txt
+ -rdocs/requirements.txt
+
+[testenv:rstcheck]
+basepython = python3.7
+commands =
+ rstcheck --version
+ rstcheck -r --report-level WARNING --ignore-roles api,phab .
+deps =
+ -rrequirements.txt
+ -rdocs/requirements.txt
+
+[testenv:sphinx]
+basepython = python3.7
+commands =
+ sphinx-build -M html ./docs ./docs/_build -j auto -D html_theme=nature
+deps =
+ -rrequirements.txt
+ -rdocs/requirements.txt

[flake8]
# The following are intentionally ignored, possibly pending consensus
@@ -112,7 +134,7 @@

# DARXXX: Darglint docstring issues to be solved

-ignore = B007,C103,D105,D211,D401,D413,D412,DAR003,DAR101,DAR102,DAR201,DAR202,DAR301,DAR401,DAR402,DAR501,H101,H238,H301,H306,H404,H405,H903,P101,P102,P103,P205,W503
+ignore = B007,C103,D105,D211,D401,D413,D412,DAR003,DAR101,DAR102,DAR201,DAR202,DAR301,DAR401,DAR402,DAR501,F401,H101,H238,H301,H306,H404,H405,H903,P101,P102,P103,P205,W503
enable-extensions = H203,H204,H205,N818

color = always
@@ -235,8 +257,7 @@
ignore = D105,D211

[pytest]
-minversion = 5.3
+minversion = 7.0.1
testpaths = tests
python_files = *_tests.py
addopts = --ignore=tests/l10n_tests.py
-filterwarnings = ignore::pytest.PytestDeprecationWarning

To view, visit change 863436. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: stable
Gerrit-Change-Id: If20b7e0e3cf246ac91cce4a53bde34174bc6b2d6
Gerrit-Change-Number: 863436
Gerrit-PatchSet: 9
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged