From 53e264547b61fc79501cd8bf2fd10166bc6b1ad1 Mon Sep 17 00:00:00 2001 From: UlrichB22 <97119703+UlrichB22@users.noreply.github.com> Date: Sat, 13 Jan 2024 21:31:54 +0100 Subject: [PATCH 1/2] remove get_pip_version() from quickinstall --- quickinstall.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/quickinstall.py b/quickinstall.py index 2da31d77b..fe4f95bb6 100755 --- a/quickinstall.py +++ b/quickinstall.py @@ -562,34 +562,20 @@ def __call__(self): self.do_helpers() self.do_install() self.do_catalog() - sys.stdout.write("\n\nSuccessfully created or updated venv at {0}".format(self.dir_venv)) + sys.stdout.write("\n\nSuccessfully created or updated venv at {0}\n".format(self.dir_venv)) def do_venv(self): venv.create(self.dir_venv, system_site_packages=False, clear=False, symlinks=False, with_pip=True, prompt=None) - def get_pip_version(self): - """Return pip version as a list: [1, 5, 1]""" - command = 'pip --version' - pip_txt = subprocess.check_output(command, shell=True) - # expecting pip_txt similar to "pip 1.4.1 from /bitbucket/moin-2.0..." - pip_txt = pip_txt.decode().split() - if pip_txt[0] == 'pip': - pip_version = [int(x) for x in pip_txt[1].split('.')] - return pip_version - else: - sys.exit("Error: 'pip --version' produced unexpected results: '{0}".format(' '.join(pip_txt))) - def do_install(self): - pip_version = self.get_pip_version() args = [ os.path.join(self.dir_venv_bin, 'pip'), 'install', '--upgrade', + '--upgrade-strategy=eager', '--editable', self.dir_source, ] - if pip_version >= [9, 0]: - args += ['--upgrade-strategy=eager', ] subprocess.check_call(args) def do_catalog(self): From 46e3e312aeb026e0eeddff214f69ff2197651cbf Mon Sep 17 00:00:00 2001 From: UlrichB22 <97119703+UlrichB22@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:36:36 +0100 Subject: [PATCH 2/2] Raise python version from 3.8+ to 3.9+ --- .github/workflows/ci.yml | 13 ++++++++----- docs/admin/install.rst | 4 ++-- docs/admin/requirements.rst | 6 +++--- quickinstall.py | 12 +++++------- setup.py | 5 +++-- src/moin/__init__.py | 5 +++-- tox.ini | 2 +- 7 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbdd2ff06..66f3b87c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Lint with flake8 run: | pip install flake8 @@ -39,14 +39,17 @@ jobs: matrix: include: - os: macos-latest - python-version: '3.8' - toxenv: py38-fuse2 + python-version: '3.9' + toxenv: py39-fuse2 - os: windows-latest python-version: '3.11' - toxenv: py38-fuse2 + toxenv: py311-fuse3 - os: ubuntu-latest python-version: '3.10' - toxenv: py39-fuse3 + toxenv: py310-fuse3 + - os: ubuntu-latest + python-version: '3.12' + toxenv: py312-fuse3 runs-on: ${{ matrix.os }} timeout-minutes: 60 diff --git a/docs/admin/install.rst b/docs/admin/install.rst index 9b48b86e3..d42530f18 100644 --- a/docs/admin/install.rst +++ b/docs/admin/install.rst @@ -141,8 +141,8 @@ Before you can run moin, you need to install it. Using your standard user account, run the following command from the project root directory. Replace in the command -below with the path to a python 3.8+ executable. This is usually -just "python", but may be "python3", "python3.8", "/opt/pypy/bin/pypy" +below with the path to a python 3.9+ executable. This is usually +just "python", but may be "python3", "python3.9", "/opt/pypy/bin/pypy" or even : :: diff --git a/docs/admin/requirements.rst b/docs/admin/requirements.rst index 53679818c..6c40317cb 100644 --- a/docs/admin/requirements.rst +++ b/docs/admin/requirements.rst @@ -2,11 +2,11 @@ Requirements ============ -MoinMoin requires Python 3.8+. A CPython distribution is +MoinMoin requires Python 3.9+. A CPython distribution is recommended because it will likely be the fastest and most stable. Most developers use a CPython distribution for testing. -Typical linux distributions will either have Python 3.8+ installed by -default or will have a package manager that will install Python 3.8+ +Typical linux distributions will either have Python 3.9+ installed by +default or will have a package manager that will install Python 3.9+ as a secondary Python. Windows users may download CPython distributions from https://www.python.org/ or https://www.activestate.com/. diff --git a/quickinstall.py b/quickinstall.py index fe4f95bb6..4a21208a5 100755 --- a/quickinstall.py +++ b/quickinstall.py @@ -1,16 +1,16 @@ #!/usr/bin/python3 # Copyright: 2013 MoinMoin:BastianBlank # Copyright: 2013-2018 MoinMoin:RogerHaase -# Copyright: 2023 MoinMoin:UlrichB +# Copyright: 2023-2024 MoinMoin:UlrichB # License: GNU GPL v2 (or any later version), see LICENSE.txt for details. """ Create a virtual environment and install moin2 and all requirements in development mode. Usage for installation: - quickinstall.py (where is any Python 3.8+ executable) + quickinstall.py (where is any Python 3.9+ executable) -Requires: Python 3.8+, pip +Requires: Python 3.9+, pip The first run of quickinstall.py creates these files or symlink in the repo root: @@ -47,8 +47,8 @@ import venv -if sys.hexversion < 0x3080000: - sys.exit("Error: MoinMoin requires Python 3.8+, current version is %s\n" % (platform.python_version(), )) +if sys.hexversion < 0x3090000: + sys.exit("Error: MoinMoin requires Python 3.9+, current version is %s\n" % (platform.python_version(), )) WIN_INFO = 'm.bat, activate.bat, and deactivate.bat are created by quickinstall.py' @@ -272,8 +272,6 @@ def cmd_quickinstall(self, *args): with open(QUICKINSTALL, 'w') as messages: # we run ourself as a subprocess so output can be captured in a log file subprocess.run(command, shell=True, stderr=messages, stdout=messages) - # above result will be flagged as error unless all python versions specified in tox.ini are installed: - # [tox]\n envlist = py{38,39,310},pypy3,flake8 print('\nSearching {0}, important messages are shown below... Do "{1} log quickinstall" ' 'to see complete log.\n'.format(QUICKINSTALL, M)) search_for_phrase(QUICKINSTALL) diff --git a/setup.py b/setup.py index f86074eba..c4f9099bd 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Copyright: 2001 by Juergen Hermann # Copyright: 2001-2018 MoinMoin:ThomasWaldmann -# Copyright: 2023 MoinMoin project +# Copyright: 2023-2024 MoinMoin:UlrichB # License: GNU GPL v2 (or any later version), see LICENSE.txt for details. import os @@ -39,9 +39,10 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", diff --git a/src/moin/__init__.py b/src/moin/__init__.py index 1951ee2a2..27c457c8a 100644 --- a/src/moin/__init__.py +++ b/src/moin/__init__.py @@ -1,5 +1,6 @@ # Copyright: 2000-2006 by Juergen Hermann # Copyright: 2002-2018 MoinMoin:ThomasWaldmann +# Copyright: 2024 MoinMoin:UlrichB # License: GNU GPL v2 (or any later version), see LICENSE.txt for details. """ @@ -15,5 +16,5 @@ project = "MoinMoin" -if sys.hexversion < 0x3080000: - sys.exit("Error: %s requires Python 3.8+, current version is %s\n" % (project, platform.python_version())) +if sys.hexversion < 0x3090000: + sys.exit("Error: %s requires Python 3.9+, current version is %s\n" % (project, platform.python_version())) diff --git a/tox.ini b/tox.ini index 9b5f7a90e..e8998066b 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ # tox -- -v [tox] -envlist = py{38,39,310},pypy3,flake8 +envlist = py{39,310,311,312},flake8 [testenv] deps = -rrequirements.d/development.txt