Skip to content

Commit

Permalink
Merge "[8.0] Require Python 3.6.1+ with Pywikibot and drop support fo…
Browse files Browse the repository at this point in the history
…r Python 3.6.0"
  • Loading branch information
xqt authored and Gerrit Code Review committed Sep 29, 2022
2 parents 6c152cd + daca2bd commit 4d6e674
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 30 deletions.
28 changes: 14 additions & 14 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ environment:

# 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_ARCH: "32"

- PYTHON: "C:\\Python39"
- PYTHON: "C:\\Python39-x64"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "32"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python310-x64"
- PYTHON: "C:\\Python310"
PYTHON_VERSION: "3.10.x"
PYTHON_ARCH: "64"
PYTHON_ARCH: "32"

matrix:
fast_finish: false
Expand All @@ -53,7 +53,7 @@ install:
- 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)"
Expand Down
4 changes: 2 additions & 2 deletions appveyor_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function ParsePythonVersion ($python_version) {
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) {
Expand Down Expand Up @@ -125,7 +125,7 @@ function RunCommand ($command, $command_args) {


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
}
}
Expand Down
5 changes: 2 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ werkzeug>=0.15.5, <2.1.0
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
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ system that has a compatible version of Python installed. To check
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
Expand Down
1 change: 0 additions & 1 deletion make_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
[pwb] make_dist [options]
.. note:: Requires Python 3.6+.
.. versionadded:: 7.3
.. versionchanged:: 7.4
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ are not installed by default on some Linux distributions:
* 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.
Expand Down
3 changes: 0 additions & 3 deletions pywikibot/userinterfaces/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -73,8 +73,7 @@ def python_is_supported() -> bool:
'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',
Expand Down Expand Up @@ -270,7 +269,7 @@ def main() -> None: # pragma: no cover
# 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,
Expand Down

0 comments on commit 4d6e674

Please sign in to comment.