jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/882000 )
Change subject: Merge branch 'master' into stable ...................................................................... Merge branch 'master' into stable Bug: T308258 Change-Id: I5597702e0e005537b18ebb9bf39111b9ecd24095 --- M pywikibot/families/wikisource_family.py M pywikibot/textlib.py M tests/site_detect_tests.py M setup.py M pywikibot/__metadata__.py M 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 12 files changed, 458 insertions(+), 231 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/requirements.txt b/docs/requirements.txt index 4778783..61d54ac 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,12 +1,6 @@ # This is a PIP requirements file for building Sphinx documentation of pywikibot # requirements.txt is also needed -<<<<<<< HEAD (ad2a8a Update git submodules) - -sphinx == 5.1.1 -rstcheck >=3.5.0 -======= sphinx >= 5.2.3 rstcheck >=6.1.0 sphinxext-opengraph >= 0.7.2 furo >= 2022.9.29 ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py index 6cffa86..a9e6e99 100644 --- a/pywikibot/__metadata__.py +++ b/pywikibot/__metadata__.py @@ -11,11 +11,7 @@ __name__ = 'pywikibot' -<<<<<<< HEAD (ad2a8a Update git submodules) -__version__ = '7.7.3' -======= __version__ = '8.0.0' ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) __description__ = 'Python MediaWiki Bot Framework' __maintainer__ = 'The Pywikibot team' __maintainer_email__ = 'pywiki...@lists.wikimedia.org' diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 47045b9..95dee26 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -708,7 +708,7 @@ self._default = default self._quit = automatic_quit - current_match_type = Optional[Tuple[ # noqa: F841 + current_match_type = Optional[Tuple[ # skipcq: PYL-W0612 PageLinkType, str, Mapping[str, str], diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 4444bb4..0a0603e 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -30,35 +30,6 @@ 'ja', 'zh', 'vi', 'war', 'uk', 'ar', 'pt', 'fa', 'ca', 'sr', 'id', 'ko', 'no', 'fi', 'tr', 'hu', 'cs', 'ce', 'tt', 'sh', 'ro', 'zh-min-nan', 'eu', 'ms', 'eo', 'he', 'hy', 'da', 'bg', 'cy', 'sk', -<<<<<<< HEAD (ad2a8a Update git submodules) - 'azb', 'et', 'kk', 'be', 'min', 'simple', 'uz', 'el', 'hr', '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', 'lb', 'ba', 'su', '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', 'ha', 'xmf', 'si', 'ban', 'bat-smg', 'ps', - 'os', 'frr', 'or', 'sah', 'gd', 'bug', 'cdo', 'yi', 'ilo', 'sd', 'am', - 'nap', 'li', 'fo', 'hsb', 'gor', 'map-bms', 'mai', 'mzn', 'ig', 'bcl', - 'eml', 'ace', 'shn', 'zh-classical', 'sa', 'wa', 'ie', 'lij', 'as', - 'zu', 'mhr', 'mrj', 'hyw', 'hif', 'bjn', 'mni', 'sn', 'hak', 'km', - 'roa-tara', 'so', 'pam', 'rue', 'nso', 'bh', 'tum', 'se', 'mi', 'myv', - 'sat', 'vls', 'nds-nl', 'nah', 'sc', 'vep', 'kab', 'tk', 'gan', 'kw', - 'glk', 'co', 'dag', 'fiu-vro', 'ary', 'bo', 'ab', 'gv', 'frp', 'zea', - 'skr', 'ug', 'kv', 'pcd', 'udm', 'csb', 'mt', 'ay', 'gn', 'smn', 'nrm', - 'lez', 'lfn', 'stq', 'olo', 'lo', 'rw', 'mwl', 'ang', 'fur', 'rm', - 'lad', 'gom', 'koi', 'ext', 'tyv', 'dsb', 'av', 'dty', 'ln', 'cbk-zam', - 'pap', 'dv', 'kaa', 'ksh', 'gag', 'bxr', 'pfl', 'pag', 'pi', 'ks', - 'szy', 'haw', 'awa', 'tay', 'mdf', 'za', 'tw', 'blk', 'inh', 'krc', - 'xal', 'pdc', 'atj', 'to', 'arc', 'tcy', 'lg', 'mnw', 'kbp', 'jam', - 'na', 'wo', 'kbd', 'nia', 'nov', 'ki', 'bi', 'nqo', 'tpi', 'tet', - 'shi', 'jbo', 'roa-rup', 'fj', 'lbe', 'kg', 'xh', 'ty', 'cu', 'guw', - 'om', 'trv', 'srn', 'sm', 'gcr', 'alt', 'chr', 'ltg', 'tn', 'ny', 'st', - 'pih', 'mad', 'got', 'ami', 'rmy', 'bm', 've', 'ts', 'ff', 'chy', 'ss', - 'rn', 'kcg', 'ak', 'iu', 'ch', 'ee', 'pnt', 'ady', 'ik', 'pcm', 'sg', - 'pwn', 'din', 'ti', 'kl', 'dz', 'cr', -======= 'azb', 'et', 'kk', 'be', 'simple', 'min', 'uz', 'el', 'hr', 'lt', 'gl', 'az', 'ur', 'sl', 'ka', 'nn', 'hi', 'th', 'ta', 'la', 'bn', 'mk', 'ast', 'zh-yue', 'lv', 'tg', 'af', 'my', 'mg', 'bs', 'mr', 'oc', 'sq', @@ -86,7 +57,6 @@ 'st', 'mad', 'pih', 'got', 'ami', 'rmy', 'bm', 've', 'ts', 'ff', 'chy', 'ss', 'rn', 'kcg', 'ak', 'iu', 'ee', 'ch', 'pnt', 'ik', 'ady', 'pcm', 'sg', 'pwn', 'din', 'ti', 'kl', 'dz', 'cr', ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) ] # 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 2ee90fa..8f93dcc 100644 --- a/pywikibot/families/wikiquote_family.py +++ b/pywikibot/families/wikiquote_family.py @@ -30,17 +30,10 @@ 'it', 'en', 'pl', 'ru', 'cs', 'et', 'pt', 'fa', 'uk', 'de', 'he', 'fr', 'es', 'eo', 'tr', 'sk', 'bs', 'az', 'ca', 'fi', 'sr', 'sl', 'zh', 'lt', 'ar', 'bg', 'hy', 'hr', 'su', 'el', 'nn', 'id', 'sv', 'li', 'hu', 'ko', -<<<<<<< HEAD (ad2a8a Update git submodules) - 'nl', 'ja', 'sah', 'la', 'ta', 'gl', 'gu', 'ur', 'hi', 'ig', 'be', - 'te', 'guw', 'tl', 'vi', 'cy', 'no', 'sq', 'ml', 'bn', 'kn', 'ro', - 'eu', 'ku', 'as', 'uz', 'ka', 'da', 'sa', 'is', 'bcl', 'br', 'mr', - 'af', 'wo', 'th', 'ky', -======= 'nl', 'sah', 'ja', 'la', 'ta', 'gl', 'gu', 'hi', 'ur', 'ig', 'be', 'te', 'guw', 'tl', 'vi', 'cy', 'no', 'sq', 'ml', 'bn', 'kn', 'ro', 'eu', 'ku', 'as', 'uz', 'ka', 'da', 'sa', 'is', 'bcl', 'br', 'mr', 'af', 'th', 'wo', 'ky', ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) ] category_redirect_templates = { diff --git a/pywikibot/families/wikisource_family.py b/pywikibot/families/wikisource_family.py index 92ff162..984a277 100644 --- a/pywikibot/families/wikisource_family.py +++ b/pywikibot/families/wikisource_family.py @@ -29,11 +29,7 @@ 'mul', 'cs', 'gu', 'sr', 'pt', 'fa', 'sv', 'bn', 'hu', 'ko', 'ta', 'ml', 'sa', 'te', 'sl', 'tr', 'hy', 'la', 'vi', 'el', 'ja', 'ro', 'fi', 'nap', 'nl', 'be', 'az', 'ca', 'br', 'kn', 'no', 'hr', 'id', 'th', -<<<<<<< HEAD (ad2a8a Update git submodules) - 'eo', 'hi', 'is', 'vec', 'pms', 'ban', 'cy', 'mr', 'lij', 'da', 'et', -======= 'eo', 'hi', 'is', 'vec', 'pms', 'cy', 'ban', 'mr', 'lij', 'da', 'et', ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) 'mk', 'as', 'yi', 'bg', 'wa', 'li', '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 daebbf2..45ba4d9 100644 --- a/pywikibot/families/wiktionary_family.py +++ b/pywikibot/families/wiktionary_family.py @@ -36,32 +36,17 @@ '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', 'skr', 'uz', 'li', 'or', 'eo', 'te', 'fa', 'gl', 'ar', 'oc', -<<<<<<< HEAD (ad2a8a Update git submodules) - 'jv', 'az', 'eu', 'uk', 'ast', 'br', 'sg', 'is', 'bn', 'da', 'lo', - 'simple', 'la', 'mnw', 'hr', 'fj', 'sk', 'shn', 'tg', 'ky', 'bg', 'wa', - 'ur', 'ps', 'cy', 'vo', 'he', 'om', 'sl', 'lmo', 'af', 'zh-min-nan', - 'scn', 'tl', 'pa', 'ms', 'sw', 'fy', 'nn', 'ka', 'lv', 'min', 'sq', -======= 'jv', 'az', 'eu', 'uk', 'ast', 'br', 'is', 'sg', 'bn', 'da', 'lo', 'simple', 'mnw', 'la', 'hr', 'shn', 'fj', 'sk', 'tg', 'ky', 'bg', 'wa', 'ur', 'ps', 'cy', 'vo', 'he', 'lmo', 'om', 'sl', 'af', 'zh-min-nan', 'scn', 'tl', 'pa', 'ms', 'fy', 'sw', 'nn', 'ka', 'lv', 'min', 'sq', ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) 'nds', 'lb', 'co', 'mn', 'pnb', 'bs', 'nah', 'yue', 'sa', 'kk', 'km', 'vec', 'be', 'diq', 'tk', 'mk', 'nia', 'sm', 'hsb', 'ks', 'shy', 'su', -<<<<<<< HEAD (ad2a8a Update git submodules) - 'gd', 'ga', 'bcl', 'an', 'gom', 'mr', 'wo', 'mni', 'ia', 'ang', 'mt', - 'bjn', 'fo', 'sd', 'tt', 'gn', 'so', 'ie', 'mi', 'csb', 'ug', 'si', - 'ha', 'st', 'roa-rup', 'hif', 'tpi', 'guw', 'jbo', 'kl', 'zu', 'ay', - 'yi', 'ln', 'gu', 'na', 'gv', 'kw', 'am', 'ne', 'rw', 'ts', 'ig', 'qu', - 'ss', 'iu', 'chr', 'dv', 'gor', 'ti', 'tn', -======= 'gd', 'ga', 'bcl', 'an', 'gom', 'mr', 'gor', 'wo', 'mni', 'ia', 'ang', 'bjn', 'mt', 'fo', 'sd', 'tt', 'gn', 'so', 'ie', 'mi', 'csb', 'ug', 'si', 'ha', 'st', 'roa-rup', 'hif', 'guw', 'tpi', 'jbo', 'kl', 'zu', 'ay', 'yi', 'ln', 'gu', 'na', 'gv', 'kw', 'am', 'ne', 'rw', 'ts', 'ig', 'qu', 'ss', 'iu', 'chr', 'dv', 'ti', 'tn', ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) ] category_redirect_templates = { diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index ecc0a90..3079c22 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -26,10 +26,7 @@ from pywikibot.tools import ( ModuleDeprecationWrapper, deprecated, -<<<<<<< HEAD (ad2a8a Update git submodules) -======= deprecated_args, ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) first_lower, first_upper, ) @@ -1870,12 +1867,6 @@ # site.months_names do not. if short.endswith('.'): self.origNames2monthNum[func(short[:-1])] = n -<<<<<<< HEAD (ad2a8a Update git submodules) - - self.groups = ['year', 'month', 'hour', 'time', 'day', 'minute', - 'tzinfo'] -======= ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) timeR = (r'(?P<time>(?P<hour>([0-1]\d|2[0-3]))[:\.h]' r'(?P<minute>[0-5]\d))') diff --git a/setup.py b/setup.py index c6f6f45..1f9e32f 100755 --- a/setup.py +++ b/setup.py @@ -48,11 +48,7 @@ # vulnerability found in Pillow<8.1.1 but toolforge uses 5.4.1 'Tkinter': ['Pillow>=8.1.1'], 'mwoauth': ['mwoauth!=0.3.1,>=0.2.4'], -<<<<<<< HEAD (ad2a8a Update git submodules) - 'html': ['BeautifulSoup4'], -======= 'html': ['beautifulsoup4>=4.7.1'], ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) 'http': [ 'fake_useragent<0.1.14; python_version < "3.7"', 'fake_useragent>1.0.1; python_version >= "3.7"', @@ -63,34 +59,18 @@ 'pydocstyle>=6.2.3', 'flake8-bugbear!=23.1.14', 'flake8-coding', -<<<<<<< HEAD (ad2a8a Update git submodules) - 'flake8-comprehensions>=3.1.4; python_version >= "3.8"', - 'flake8-comprehensions>=2.2.0; python_version < "3.8"', - 'flake8-docstrings>=1.3.1', - 'verve-flake8-mock>=0.4', - 'flake8-print>=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-comprehensions', 'flake8-docstrings>=1.4.0', 'flake8-mock-x2', 'flake8-print>=4.0.1', 'flake8-quotes>=3.3.2', ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) 'flake8-string-format', 'flake8-tuple>=0.4.1', 'flake8-no-u-prefixed-strings>=0.2', 'pep8-naming>=0.12.1, <0.13.0; python_version < "3.7"', 'pep8-naming>=0.13.3; python_version >= "3.7"', ], - 'hacking': [ - 'hacking', - # importlib-metadata module already installed with hacking 4.1.0 - # but importlib-metadata 5 fails, so adjust it - 'importlib-metadata<5.0.0; python_version < "3.8"', - ], + 'hacking': ['hacking'], } diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py index 8ec8b25..3b56837 100755 --- a/tests/site_detect_tests.py +++ b/tests/site_detect_tests.py @@ -129,137 +129,11 @@ with self.subTest(url=urlparse(url).netloc): self.assertNoSite(url) -<<<<<<< HEAD (ad2a8a Update git submodules) - def test_gentoo(self): - """Test detection of MediaWiki sites for wiki.gentoo.org.""" - self.assertSite('https://wiki.gentoo.org/wiki/$1') - - def test_arabeyes(self): - """Test detection of MediaWiki sites for www.arabeyes.org.""" - self.assertSite('https://www.arabeyes.org/$1') - - def test_tfwiki(self): - """Test detection of MediaWiki sites for tfwiki.net.""" - self.assertNoSite('http://tfwiki.net/wiki/$1') # 1.19.5-1+deb7u1 - - -class Pre119SiteTestCase(SiteDetectionTestCase): - - """Test pre 1.19 sites which should be detected as unsupported.""" - - def test_hrwiki(self): - """Test detection of MediaWiki sites for www.hrwiki.org.""" - self.assertNoSite('http://www.hrwiki.org/index.php/$1') # v 1.15.4 - - def test_wikifon(self): - """Test detection of MediaWiki sites for www.wikifon.org.""" - self.assertNoSite('http://www.wikifon.org/$1') # v1.11.0 - - -class PreAPISiteTestCase(SiteDetectionTestCase): - - """Test detection of MediaWiki sites prior to the API.""" - - def test_thelemapedia(self): - """Test detection of MediaWiki sites for www.thelemapedia.org.""" - self.assertNoSite('http://www.thelemapedia.org/index.php/$1') - - def test_werelate(self): - """Test detection of MediaWiki sites for www.werelate.org.""" - self.assertNoSite('http://www.werelate.org/wiki/$1') - - def test_otterstedt(self): - """Test detection of MediaWiki sites for www.otterstedt.de.""" - self.assertNoSite('http://www.otterstedt.de/wiki/index.php/$1') - - -class APIHiddenTestCase(SiteDetectionTestCase): - - """Test MediaWiki sites with a hidden enabled API.""" - - def test_wikisophia(self): - """Test wikisophia.org which has redirect problems. - - /index.php?title=$1 reports 404, however a wiki exists there, - but the API is also hidden. - """ - self.assertNoSite('http://wikisophia.org/index.php?title=$1') - - -class FailingSiteTestCase(SiteDetectionTestCase): - - """Test detection failure for MediaWiki sites with an API.""" - - def test_animutationportal(self): - """Test detection of MediaWiki sites for wiki.animutationportal.com. - - SSL certificate verification fails. - """ - self.assertNoSite('http://wiki.animutationportal.com/index.php/$1') - - -class NoSiteTestCase(SiteDetectionTestCase): - - """Test detection of non-wiki sites.""" - - def test_imdb(self): - """Test detection of MediaWiki sites for www.imdb.com.""" - self.assertNoSite('http://www.imdb.com/name/nm$1/') - - def test_ecyrd(self): - """Test detection of MediaWiki sites for www.ecyrd.com.""" - self.assertNoSite('http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=$1') - - def test_tvtropes(self): - """Test detection of MediaWiki sites for www.tvtropes.org.""" - self.assertNoSite('http://www.tvtropes.org/pmwiki/pmwiki.php/Main/$1') - - def test_c2(self): - """Test detection of MediaWiki sites for c2.com.""" - self.assertNoSite('http://c2.com/cgi/wiki?$1') - - def test_phabricator(self): - """Test detection of MediaWiki sites for phabricator.wikimedia.org.""" - self.assertNoSite('https://phabricator.wikimedia.org/$1') - - def test_merriam_webster(self): - """Test detection of MediaWiki sites for www.merriam-webster.com.""" - self.assertNoSite( - 'http://www.merriam-webster.com/' - 'cgi-bin/dictionary?book=Dictionary&va=$1') - - def test_arxiv(self): - """Test detection of MediaWiki sites for arxiv.org.""" - self.assertNoSite('http://arxiv.org/abs/$1') - - -class OfflineSiteTestCase(SiteDetectionTestCase): - - """Test offline sites.""" - - def test_opensprints_wiki(self): - """Test detection of MediaWiki sites for wiki.opensprints.org.""" - self.assertNoSite('http://wiki.opensprints.org/index.php?title=$1') - - -class OtherSiteTestCase(SiteDetectionTestCase): - - """Test other non-MediaWiki sites.""" - - def test_musicbrainz(self): - """Test http://musicbrainz.org/doc/ which has a page 'api.php'. - - Possible false positive caused by the existence of a page called - http://musicbrainz.org/doc/api.php. - """ - self.assertNoSite('http://musicbrainz.org/doc/$1') -======= def test_failing_sites(self): """Test detection of failing MediaWiki sites.""" for url, reason in self.failing_sites: with self.subTest(url=urlparse(url).netloc, reason=reason): self.assertNoSite(url) ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) class PrivateWikiTestCase(PatchingTestCase): diff --git a/tox.ini b/tox.ini index 5ec5400..a5f454b 100644 --- a/tox.ini +++ b/tox.ini @@ -77,10 +77,6 @@ deps = pytest >= 7.0.1 .[eventstreams] -<<<<<<< HEAD (ad2a8a Update git submodules) - .[mwparserfromhell] -======= ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) .[mysql] [testenv:venv] @@ -135,11 +131,7 @@ # DARXXX: Darglint docstring issues to be solved -<<<<<<< HEAD (ad2a8a Update git submodules) -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 -======= ignore = B007,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 ->>>>>>> BRANCH (2645ee [8.0] Publish Pywikibot 8) enable-extensions = H203,H204,H205,N818 color = always -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/882000 To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings Gerrit-Project: pywikibot/core Gerrit-Branch: stable Gerrit-Change-Id: I5597702e0e005537b18ebb9bf39111b9ecd24095 Gerrit-Change-Number: 882000 Gerrit-PatchSet: 2 Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
_______________________________________________ Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org