From 8d1a1f441c761ba583ff867a4d411a35a6c61f45 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sun, 17 Jul 2022 00:06:33 +0200 Subject: [PATCH 1/8] Mailing lists on SourceForge have been closed --- docs/install.rst | 3 ++- docs/overview.rst | 8 +------- webware/SidebarPage.py | 11 ++++++----- webware/Tests/TestEndToEnd/TestExamples.py | 2 +- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/install.rst b/docs/install.rst index 9a148c5..26af48c 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -54,10 +54,11 @@ When installing Webware for Python 3, the following "extras" can optionally be i * "dev": extras for developing Webware applications * "examples": extras for running all Webware examples * "test": extras needed to test all functions of Webware +* "docs": extras needed to build this documentation On your development machine, we recommend installing the full "test" environment which also includes the other two environments. To do that, you need to specify the "Extras" name in square brackets when installing Webware for Python 3:: - pip install "Webware-for-Python[tests]>=3" + pip install "Webware-for-Python[dev]>=3" Installation from Source diff --git a/docs/overview.rst b/docs/overview.rst index d418014..5782093 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -62,11 +62,7 @@ This documentation is available online via `GitHub Pages`_ and via `Read the Doc Feedback, Contributing and Support ---------------------------------- -You can use the `discussion mailing list`_ to give feedback, discuss features and get help using Webware. - -You can also report issues_ and send in `pull requests`_ using the `GitHub project page`_ of Webware for Python 3. - -You can keep up on new releases through the very low traffic `announcement mailing list`_ or subscribing to `releases`_ on GitHub. +You can report issues_ and send in `pull requests`_ using the `GitHub project page`_ of Webware for Python 3. If you want to be notified when new `releases`_ are available, you can use the "Watch" feature of GitHub. .. _Webware for Python 3: https://webwareforpython.github.io/w4py3/ .. _original project: https://webwareforpython.github.io/w4py/ @@ -79,8 +75,6 @@ You can keep up on new releases through the very low traffic `announcement maili .. _twill: https://twill-tools.github.io/twill/ .. _WebTest: https://docs.pylonsproject.org/projects/webtest/en/latest/ .. _Python 2 to Python 3: https://docs.python.org/3/howto/pyporting.html -.. _discussion mailing list: https://sourceforge.net/projects/webware/lists/webware-discuss -.. _announcement mailing list: https://sourceforge.net/projects/webware/lists/webware-announce .. _GitHub project page: https://github.com/WebwareForPython/w4py3 .. _GitHub pages: https://webwareforpython.github.io/w4py3/ .. _Read the Docs: https://webware-for-python-3.readthedocs.io/ diff --git a/webware/SidebarPage.py b/webware/SidebarPage.py index 22bee6c..bf60bcd 100644 --- a/webware/SidebarPage.py +++ b/webware/SidebarPage.py @@ -182,7 +182,7 @@ def writeWebwareSidebarSections(self): It writes sections such as contexts, e-mails, exits and versions. """ self.writeContextsMenu() - self.writeWebwareEmailMenu() + self.writeWebwareDocsMenu() self.writeWebwareExitsMenu() self.writeVersions() @@ -195,10 +195,11 @@ def writeContextsMenu(self): for context in contexts: self.menuItem(context, f'{servletPath}/{context}/') - def writeWebwareEmailMenu(self): - self.menuHeading('E-mail') - self.menuItem( - 'webware-discuss', 'mailto:webware-discuss@lists.sourceforge.net') + def writeWebwareDocsMenu(self): + docs = 'https://webwareforpython.github.io/w4py3/' + self.menuHeading('Docs') + self.menuItem('Quickstart', f'{docs}quickstart.html') + self.menuItem('Reference', f'{docs}ref/') def writeWebwareExitsMenu(self): self.menuHeading('Exits') diff --git a/webware/Tests/TestEndToEnd/TestExamples.py b/webware/Tests/TestEndToEnd/TestExamples.py index 8c2e8d9..0a4e505 100644 --- a/webware/Tests/TestEndToEnd/TestExamples.py +++ b/webware/Tests/TestEndToEnd/TestExamples.py @@ -51,7 +51,7 @@ def testStartPage(self): '', '', '', - '', 'webware-discuss', + '', 'Quickstart', '', 'Webware', 'Python', From f944d1797a163025336aaabcc782453680cc4aab Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 17:10:28 +0100 Subject: [PATCH 2/8] Update dependencies and support Python 3.11 --- .github/workflows/release-docs.yml | 4 ++-- .github/workflows/test-package.yml | 6 +++--- docs/conf.py | 4 ++-- setup.py | 11 ++++++----- tox.ini | 16 ++++++++-------- webware/MiscUtils/Tests/TestFuncs.py | 2 +- webware/Properties.py | 2 +- webware/Scripts/MakeAppWorkDir.py | 3 ++- webware/Scripts/WaitressServer.py | 2 +- webware/Tests/TestEndToEnd/TestExamples.py | 2 +- webware/Tests/TestEndToEnd/TestMakeApp.py | 11 ++++++----- 11 files changed, 33 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index 1d6cd0d..b0750e4 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index bd2f156..726440e 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - uses: actions/checkout@v2 @@ -22,11 +22,11 @@ jobs: python -m pip install --upgrade pip pip install .[tests] - name: Lint with flake8 - if: matrix.python-version == 3.9 + if: matrix.python-version == '3.10' run: | flake8 webware setup.py --count --exit-zero --statistics - name: Lint with pylint - if: matrix.python-version == 3.9 + if: matrix.python-version == '3.10' run: | pylint webware - name: Run all unit tests diff --git a/docs/conf.py b/docs/conf.py index 7d2258e..ee5058a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,13 +22,13 @@ # -- Project information ----------------------------------------------------- project = 'Webware for Python 3' -copyright = '1999-2022, Christoph Zwerschke et al' +copyright = '1999-2023, Christoph Zwerschke et al' author = 'Christoph Zwerschke et al.' # The short X.Y version version = '3.0' # The full version, including alpha/beta/rc tags -release = '3.0.6' +release = '3.0.7' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 0bd044c..285d0a4 100644 --- a/setup.py +++ b/setup.py @@ -11,18 +11,18 @@ long_description = fh.read() requireDocs = [ - 'Sphinx>=5,<6', 'sphinx_rtd_theme>=1' + 'Sphinx>=5,<7', 'sphinx_rtd_theme>=1.1' ] requireDev = [ - 'Pygments>=2.12,<3', 'WebTest>=3,<4', + 'Pygments>=2.14,<3', 'WebTest>=3,<4', 'waitress>=2,<3', 'hupper>=1.10,<2', ] requireExamples = [ - 'DBUtils>=3,<4', 'dominate>=2.6,<3', 'yattag>=1.14,<2', - 'Pygments>=2.12,<3', 'Pillow>=8,<10' + 'DBUtils>=3,<4', 'dominate>=2.7,<3', 'yattag>=1.15,<2', + 'Pygments>=2.14,<3', 'Pillow>=8,<10' ] requireTests = [ - 'psutil>=5.9,<6', 'flake8>=4,<5', 'pylint>=2.13.9,<3', 'tox>=3.25,<4', + 'psutil>=5.9,<6', 'flake8>=5,<7', 'pylint>=2.13,<3', 'tox>=3.28,<5', 'pywin32>=300,<400;' 'sys_platform=="win32" and implementation_name=="cpython"' ] + requireDev + requireExamples @@ -59,6 +59,7 @@ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Operating System :: OS Independent', diff --git a/tox.ini b/tox.ini index 506c281..bcc8a9b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,28 +1,28 @@ [tox] -envlist = py{36,37,38,39,310}, pypy3, flake8, pylint, docs, manifest +envlist = py{36,37,38,39,310,311}, pypy3, flake8, pylint, docs, manifest [testenv:flake8] -basepython = python3.9 -deps = flake8>=4.0.1,<5 +basepython = python3.10 +deps = flake8>=6,<7 commands = flake8 webware setup.py [testenv:pylint] -basepython = python3.9 -deps = pylint>=2.14.4,<3 +basepython = python3.10 +deps = pylint>=2.15,<3 commands = pylint webware [testenv:docs] -basepython = python3.9 +basepython = python3.10 extras = docs commands = sphinx-build -b html -nEW docs docs/_build/html [testenv:manifest] -basepython = python3.9 -deps = check-manifest>=0.47 +basepython = python3.10 +deps = check-manifest>=0.49 commands = check-manifest -v diff --git a/webware/MiscUtils/Tests/TestFuncs.py b/webware/MiscUtils/Tests/TestFuncs.py index 404ce2b..bf851ad 100644 --- a/webware/MiscUtils/Tests/TestFuncs.py +++ b/webware/MiscUtils/Tests/TestFuncs.py @@ -91,7 +91,7 @@ def testLocalIP(self): self.assertEqual(localIP(), ip) # second invocation self.assertEqual(localIP(useCache=None), ip) # ignore if the following tests fetch the WSL address - ips = (ip, '192.168.80.1', '172.25.112.1') + ips = (ip, '192.168.80.1', '172.22.32.1', '172.25.112.1') self.assertIn( localIP(remote=None, useCache=None), ips, 'See if this works: localIP(remote=None).' diff --git a/webware/Properties.py b/webware/Properties.py index 3618f63..491aea0 100644 --- a/webware/Properties.py +++ b/webware/Properties.py @@ -1,6 +1,6 @@ name = 'Webware for Python' -version = (3, 0, 6) +version = (3, 0, 7) status = 'stable' diff --git a/webware/Scripts/MakeAppWorkDir.py b/webware/Scripts/MakeAppWorkDir.py index 92b984a..a188c1f 100644 --- a/webware/Scripts/MakeAppWorkDir.py +++ b/webware/Scripts/MakeAppWorkDir.py @@ -277,7 +277,8 @@ def changeOwner(self): self.msg("\tWarning: Write permissions could not be set.") self.msg(f"\tThe error message was: {e}") - def printCompleted(self): + @staticmethod + def printCompleted(): print(""" Congratulations, you've just created a runtime working directory for Webware. diff --git a/webware/Scripts/WaitressServer.py b/webware/Scripts/WaitressServer.py index 1178736..be2cb5f 100644 --- a/webware/Scripts/WaitressServer.py +++ b/webware/Scripts/WaitressServer.py @@ -29,7 +29,7 @@ def openBrowser(): webbrowser.open(url) t = threading.Thread(target=openBrowser) - t.setDaemon(True) + t.daemon = True t.start() if args.reload: diff --git a/webware/Tests/TestEndToEnd/TestExamples.py b/webware/Tests/TestEndToEnd/TestExamples.py index 0a4e505..00bfa84 100644 --- a/webware/Tests/TestEndToEnd/TestExamples.py +++ b/webware/Tests/TestEndToEnd/TestExamples.py @@ -29,7 +29,7 @@ def removeDemoDatabase(): sleep(.5) else: break - sleep(.5) + sleep(1) def testStartPage(self): r = self.testApp.get('/') diff --git a/webware/Tests/TestEndToEnd/TestMakeApp.py b/webware/Tests/TestEndToEnd/TestMakeApp.py index 837d26f..3d620ed 100644 --- a/webware/Tests/TestEndToEnd/TestMakeApp.py +++ b/webware/Tests/TestEndToEnd/TestMakeApp.py @@ -31,12 +31,13 @@ def runMake(self, opts=None): def testMakeHelp(self): output = self.runMake(['-h']) - self.assertEqual(output.pop(0), - 'usage: webware make [-h]' - ' [-c CONTEXT_NAME] [-d CONTEXT_DIR] [-l LIBRARY]') + expected = [ + 'usage: webware make [-h]', + '[-c CONTEXT_NAME] [-d CONTEXT_DIR] [-l LIBRARY]'] if hasattr(shutil, 'chown'): - self.assertEqual(output.pop(0).lstrip(), '[-u USER] [-g GROUP]') - self.assertEqual(output.pop(0).lstrip(), 'WORK_DIR') + expected.append('[-u USER] [-g GROUP]') + expected.append('WORK_DIR') + self.assertEqual(output.pop(0), ' '.join(expected)) def testMakeNewApp(self): output = self.runMake(['MyApp']) From 591ead6fff55ac736ed74ba6cbf87462ad129776 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 18:01:14 +0100 Subject: [PATCH 3/8] Don't run Python 3.6 test with GitHub actions But this version is still supported and can be tested locally with tox. --- .github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 726440e..664aeb6 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - uses: actions/checkout@v2 @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install .[tests] + pip install .[tests] --use-pep517 - name: Lint with flake8 if: matrix.python-version == '3.10' run: | From b8a2dd3c27159970a9d9952637aa5e5f2787ffe0 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 18:20:03 +0100 Subject: [PATCH 4/8] Make test a bit more robust regarding word wraps --- webware/Tests/TestEndToEnd/TestMakeApp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webware/Tests/TestEndToEnd/TestMakeApp.py b/webware/Tests/TestEndToEnd/TestMakeApp.py index 3d620ed..77e8773 100644 --- a/webware/Tests/TestEndToEnd/TestMakeApp.py +++ b/webware/Tests/TestEndToEnd/TestMakeApp.py @@ -31,13 +31,15 @@ def runMake(self, opts=None): def testMakeHelp(self): output = self.runMake(['-h']) + output = ' ' .join(' '.join(output[:4]).split()) expected = [ 'usage: webware make [-h]', '[-c CONTEXT_NAME] [-d CONTEXT_DIR] [-l LIBRARY]'] if hasattr(shutil, 'chown'): expected.append('[-u USER] [-g GROUP]') expected.append('WORK_DIR') - self.assertEqual(output.pop(0), ' '.join(expected)) + expected = ' '.join(expected) + self.assertTrue(output.startswith(expected)) def testMakeNewApp(self): output = self.runMake(['MyApp']) From 00a60f2fce83ee7ccc2629212c72028216ac46c3 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 19:18:14 +0100 Subject: [PATCH 5/8] Update GitHub actions --- .github/workflows/release-docs.yml | 4 ++-- .github/workflows/test-package.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index b0750e4..2e3af92 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install dependencies diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 664aeb6..3cf53a1 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -9,12 +9,12 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.9'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 956bcc4b995dc8c25dc0beeae44b736301e64bda Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 19:24:59 +0100 Subject: [PATCH 6/8] Increase timeout for GitHub actions --- .github/workflows/test-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 3cf53a1..0825fd3 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -6,6 +6,7 @@ jobs: build: runs-on: ubuntu-latest + timeout-minutes: 5 strategy: max-parallel: 4 matrix: From a332ed84813c2a27a25b62bc156946732c71c684 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 19:30:46 +0100 Subject: [PATCH 7/8] Fix GitHub action with PyPy 3.9 --- .github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 0825fd3..966b8b1 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -10,7 +10,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.9'] steps: - uses: actions/checkout@v3 From aa74b07683b71b163965f6af1c6ea2c74242798e Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Sat, 7 Jan 2023 19:32:43 +0100 Subject: [PATCH 8/8] Run more GitHub actions jobs in parallel --- .github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 966b8b1..060b18d 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 strategy: - max-parallel: 4 + max-parallel: 6 matrix: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.9']