jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/832965 )
Change subject: [IMPR] Short site value can be given
......................................................................
[IMPR] Short site value can be given
Short site value can be given if site code is equal to family like
``-site:meta`` or ``-site:commons``. This is similar than to create
a site with the Site creator: site = Site('commons').
Change-Id: I951773b6509ddd18f04f63844a7ac21bad4e059c
---
M pywikibot/bot.py
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 6aaa9f0..e1bf683 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -876,6 +876,9 @@
toggling the value. Refer :func:`tools.strtobool` for valid values.
.. versionchanged:: 7.7
*-config* global option was added.
+ .. versionchanged:: 8.0
+ Short site value can be given if site code is equal to family
+ like ``-site:meta``.
:param args: Command line arguments. If None,
:meth:`pywikibot.argvu<userinterfaces._interface_base.ABUIC.argvu>`
@@ -909,7 +912,10 @@
elif option in ('-config', '-dir'):
pass
elif option == '-site':
- config.family, config.mylang = value.split(':')
+ if ':' in value:
+ config.family, config.mylang = value.split(':')
+ else:
+ config.family = config.mylang = value
elif option == '-family':
config.family = value
elif option == '-lang':
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/832965
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: I951773b6509ddd18f04f63844a7ac21bad4e059c
Gerrit-Change-Number: 832965
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/836737 )
Change subject: [8.0] Require Python 3.6.1+ with Pywikibot and drop support for Python 3.6.0
......................................................................
[8.0] Require Python 3.6.1+ with Pywikibot and drop support for Python 3.6.0
Bug: T318912
Change-Id: If66d4869d8bb30bec55aaee76786d3ef2b9f9314
---
M .appveyor.yml
M appveyor_install.ps1
M dev-requirements.txt
M docs/index.rst
M make_dist.py
M pywikibot/README.rst
M pywikibot/userinterfaces/gui.py
M setup.py
8 files changed, 25 insertions(+), 31 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
Xqt: Verified; Looks good to me, approved
diff --git a/.appveyor.yml b/.appveyor.yml
index 48e05d7..12e44c4 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -16,32 +16,32 @@
# Test the lowest supported release of each major Python version
- - PYTHON: "C:\\Python360-x64"
- PYTHON_VERSION: "3.6.0"
- PYTHON_ARCH: "32"
+ - PYTHON: "C:\\Python361-x64"
+ PYTHON_VERSION: "3.6.1"
+ PYTHON_ARCH: "64"
# Appveyor pre-installs these versions onto build machines
- - PYTHON: "C:\\Python36-x64"
+ - PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x"
- PYTHON_ARCH: "64"
+ PYTHON_ARCH: "32"
- - PYTHON: "C:\\Python37"
+ - PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
- PYTHON_ARCH: "32"
+ PYTHON_ARCH: "64"
- - PYTHON: "C:\\Python38-x64"
+ - PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.x"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python39"
- PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "32"
- - PYTHON: "C:\\Python310-x64"
- PYTHON_VERSION: "3.10.x"
+ - PYTHON: "C:\\Python39-x64"
+ PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "64"
+ - PYTHON: "C:\\Python310"
+ PYTHON_VERSION: "3.10.x"
+ PYTHON_ARCH: "32"
+
matrix:
fast_finish: false
@@ -53,7 +53,7 @@
- git submodule update --init
# Download the Appveyor Python build accessories into subdirectory .\appveyor
- mkdir appveyor
- # Download Python 3.6.0 which isn't pre-installed
+ # Download Python 3.6.1 which isn't pre-installed
- ps: ./appveyor_install.ps1
- python --version
- python -c "import struct; print('PYTHON_ARCH' + chr(58), struct.calcsize('P') << 3)"
diff --git a/appveyor_install.ps1 b/appveyor_install.ps1
index 2cf579e..b86e63d 100644
--- a/appveyor_install.ps1
+++ b/appveyor_install.ps1
@@ -60,7 +60,7 @@
function DownloadPython ($python_version, $platform_suffix) {
$major, $minor, $micro, $prerelease = ParsePythonVersion $python_version
- # Only Python 3.6.0+ is supported
+ # Only Python 3.6.1+ is supported
$dir = "$major.$minor.$micro"
$ext = "exe"
if ($platform_suffix) {
@@ -125,7 +125,7 @@
function main () {
- if ($env:PYTHON_VERSION -eq "3.6.0") {
+ if ($env:PYTHON_VERSION -eq "3.6.1") {
InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
}
}
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 922ee40..48d6783 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -16,10 +16,9 @@
pytest-httpbin
pydocstyle>=4.0.0
-flake8==3.9.2; python_version < "3.6.1"
-flake8>=5.0.2; python_version >= "3.6.1"
+flake8>=5.0.2
flake8-docstrings>=0.2.6
-flake8-isort;python_version>="3.6"
+flake8-isort
verve-flake8-mock>=0.4
codecov
coverage>=5.2.1
diff --git a/docs/index.rst b/docs/index.rst
index 3a84893..b460247 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -19,7 +19,7 @@
whether you have Python installed and to find its version, just type
``python`` at the CMD or shell prompt.
-Python 3.6.0 or higher is currently required to run the bot, but Python 3.7
+Python 3.6.1 or higher is currently required to run the bot, but Python 3.7
or higher is recommended. Python 3.6 support will be dropped with Pywikibot 9.
Pywikibot and this documentation are licensed under the
diff --git a/make_dist.py b/make_dist.py
index a285a7f..5b8af77 100644
--- a/make_dist.py
+++ b/make_dist.py
@@ -23,7 +23,6 @@
[pwb] make_dist [options]
-.. note:: Requires Python 3.6+.
.. versionadded:: 7.3
.. versionchanged:: 7.4
diff --git a/pywikibot/README.rst b/pywikibot/README.rst
index 21f1f54..acf480b 100644
--- a/pywikibot/README.rst
+++ b/pywikibot/README.rst
@@ -27,7 +27,7 @@
* python-tkinter (optional, used by some experimental GUI stuff)
-You need to have at least Python version `3.6.0 <https://www.python.org/downloads/>`_
+You need to have at least Python version `3.6.1 <https://www.python.org/downloads/>`_
or newer installed on your computer to be able to run any of the code in this
package. Please refer the manual at mediawiki for further details and
restrictions.
diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py
index 1e29c12..0173c20 100644
--- a/pywikibot/userinterfaces/gui.py
+++ b/pywikibot/userinterfaces/gui.py
@@ -2,9 +2,6 @@
A window with a textfield where the user can edit.
Useful for editing the contents of an article.
-
-.. versionchanged:: 6.1
- Python 3.6 or highter is required.
"""
#
# (C) Pywikibot team, 2003-2022
diff --git a/setup.py b/setup.py
index d276576..87efff2 100755
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@
Pywikibot is not available on:
{version}
-This version of Pywikibot only supports Python 3.6+.
+This version of Pywikibot only supports Python 3.6.1+.
"""
try:
@@ -49,7 +49,7 @@
def python_is_supported() -> bool:
"""Check that Python is supported."""
- return sys.version_info[:3] >= (3, 6)
+ return sys.version_info[:3] >= (3, 6, 1)
if not python_is_supported(): # pragma: no cover
@@ -73,8 +73,7 @@
'html': ['BeautifulSoup4'],
'http': ['fake_useragent'],
'flake8': [ # Due to incompatibilities between packages the order matters.
- 'flake8==3.9.2; python_version < "3.6.1"',
- 'flake8>=5.0.2; python_version >= "3.6.1"',
+ 'flake8>=5.0.2',
'darglint',
'pydocstyle>=4.0.0',
'flake8-bugbear!=21.4.1,!=21.11.28',
@@ -270,7 +269,7 @@
# zip_safe
install_requires=dependencies,
extras_require=extra_deps,
- python_requires='>=3.6',
+ python_requires='>=3.6.1',
# namespace_packages
test_suite='tests.collector',
tests_require=test_deps,
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/836737
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: If66d4869d8bb30bec55aaee76786d3ef2b9f9314
Gerrit-Change-Number: 836737
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
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/+/835649 )
Change subject: [IMPR] <<default>> color token can be omitted at the end of io function
......................................................................
[IMPR] <<default>> color token can be omitted at the end of io function
Change-Id: I60f02fb61a7d4b596733265d859f04c2c568f2c4
---
M scripts/commons_information.py
M scripts/fixing_redirects.py
M scripts/imagetransfer.py
M scripts/misspelling.py
4 files changed, 6 insertions(+), 8 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/commons_information.py b/scripts/commons_information.py
index c67ead8..c98fca4 100755
--- a/scripts/commons_information.py
+++ b/scripts/commons_information.py
@@ -131,12 +131,10 @@
pywikibot.info(value)
langs = self.detect_langs(value)
if langs:
- pywikibot.info(
- '<<lightblue>>Hints from langdetect:<<default>>')
+ pywikibot.info('<<lightblue>>Hints from langdetect:')
for language in langs:
pywikibot.info(
- '<<lightblue>>{obj.lang}: {obj.prob}<<default>>'
- .format(obj=language))
+ f'<<lightblue>>{language.lang}: {language.prob}')
lang = pywikibot.input(
'Enter the language of the displayed text:').strip()
if lang != '':
diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py
index 39481b6..e06e11b 100755
--- a/scripts/fixing_redirects.py
+++ b/scripts/fixing_redirects.py
@@ -240,7 +240,7 @@
if mysite.sitename == 'wikipedia:nl':
pywikibot.info(
'<<lightred>>There is consensus on the Dutch Wikipedia that '
- 'bots should not be used to fix redirects.<<default>>')
+ 'bots should not be used to fix redirects.')
return
if featured:
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index 5c0d69a..bb5ae71 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -321,7 +321,7 @@
# remove the selected image from the list
imagelist.pop(todo)
else:
- pywikibot.info('<<yellow>>No such image number.<<default>>')
+ pywikibot.info('<<yellow>>No such image number.')
def transfer_allowed(self, image) -> bool:
"""Check whether transfer is allowed."""
diff --git a/scripts/misspelling.py b/scripts/misspelling.py
index 7bc5c16..71cca13 100755
--- a/scripts/misspelling.py
+++ b/scripts/misspelling.py
@@ -64,7 +64,7 @@
if cat is not None]
if templates:
- pywikibot.info('<<yellow>>Working on templates...<<default>>')
+ pywikibot.info('<<yellow>>Working on templates...')
if isinstance(templates, str):
templates = (templates, )
@@ -80,7 +80,7 @@
'-start parameter is not supported on this wiki\n'
'because templates are used for misspellings.')
elif categories:
- pywikibot.info('<<yellow>>Working on categories...<<default>>')
+ pywikibot.info('<<yellow>>Working on categories...')
generators = (
pagegenerators.CategorizedPageGenerator(
cat, recurse=True, start=self.opt.start
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/835649
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: I60f02fb61a7d4b596733265d859f04c2c568f2c4
Gerrit-Change-Number: 835649
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
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/+/835550 )
Change subject: [IMPR] Remove pywikibot.output() with pywikibot.info()
......................................................................
[IMPR] Remove pywikibot.output() with pywikibot.info()
pywikibot.output() was renamed to info() in 7.2 to be in sync
with Python's Logger.info() method
Change-Id: I6c8933d266b18f7c7880e2506dfef9e3a5c3676a
---
M pywikibot/bot.py
M pywikibot/bot_choice.py
M pywikibot/data/api/_requests.py
M pywikibot/data/mysql.py
M pywikibot/diff.py
M pywikibot/interwiki_graph.py
M pywikibot/login.py
M pywikibot/page/_pages.py
M pywikibot/page/_user.py
M pywikibot/pagegenerators/_factory.py
M pywikibot/pagegenerators/_filters.py
M pywikibot/pagegenerators/_generators.py
M pywikibot/proofreadpage.py
M pywikibot/scripts/generate_user_files.py
M pywikibot/scripts/login.py
M pywikibot/scripts/preload_sites.py
M pywikibot/scripts/version.py
M pywikibot/site/_generators.py
M pywikibot/site/_upload.py
M pywikibot/specialbots/_upload.py
M pywikibot/textlib.py
M pywikibot/throttle.py
M pywikibot/titletranslate.py
M scripts/add_text.py
M scripts/archivebot.py
M scripts/blockpageschecker.py
M scripts/category.py
M scripts/category_redirect.py
M scripts/change_pagelang.py
M scripts/checkimages.py
M scripts/claimit.py
M scripts/clean_sandbox.py
M scripts/commons_information.py
M scripts/commonscat.py
M scripts/coordinate_import.py
M scripts/data_ingestion.py
M scripts/dataextend.py
M scripts/delete.py
M scripts/delinker.py
M scripts/djvutext.py
M scripts/download_dump.py
M scripts/fixing_redirects.py
M scripts/harvest_template.py
M scripts/illustrate_wikidata.py
M scripts/imagetransfer.py
M scripts/interwiki.py
M scripts/maintenance/cache.py
M scripts/maintenance/colors.py
M scripts/maintenance/sorting_order.py
M scripts/maintenance/wikimedia_sites.py
M scripts/misspelling.py
M scripts/movepages.py
M scripts/newitem.py
M scripts/noreferences.py
M scripts/nowcommons.py
M scripts/pagefromfile.py
M scripts/parser_function_count.py
M scripts/patrol.py
M scripts/redirect.py
M scripts/reflinks.py
M scripts/replace.py
M scripts/replicate_wiki.py
M scripts/revertbot.py
M scripts/solve_disambiguation.py
M scripts/speedy_delete.py
M scripts/template.py
M scripts/templatecount.py
M scripts/touch.py
M scripts/transferbot.py
M scripts/unusedfiles.py
M scripts/upload.py
M scripts/watchlist.py
M scripts/weblinkchecker.py
M scripts/welcome.py
M tests/api_tests.py
M tests/archivebot_tests.py
M tests/diff_tests.py
M tests/pwb/print_unicode.py
M tests/site_generators_tests.py
M tests/textlib_tests.py
M tests/ui_tests.py
M tests/user_tests.py
M tox.ini
83 files changed, 956 insertions(+), 1,071 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/835550
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: I6c8933d266b18f7c7880e2506dfef9e3a5c3676a
Gerrit-Change-Number: 835550
Gerrit-PatchSet: 12
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged