Xqt submitted this change.

View Change

Approvals: JJMC89: Looks good to me, approved Xqt: Verified; Looks good to me, approved
[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(-)

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 change 836737. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: If66d4869d8bb30bec55aaee76786d3ef2b9f9314
Gerrit-Change-Number: 836737
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged