diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index 1d6cd0d..2e3af92 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 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..060b18d 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -6,27 +6,28 @@ jobs: build: runs-on: ubuntu-latest + timeout-minutes: 5 strategy: - max-parallel: 4 + max-parallel: 6 matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.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 run: | python -m pip install --upgrade pip - pip install .[tests] + pip install .[tests] --use-pep517 - 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/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/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/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..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('/') @@ -51,7 +51,7 @@ def testStartPage(self): '', '', '', - '', 'webware-discuss', + '', 'Quickstart', '', 'Webware', 'Python', diff --git a/webware/Tests/TestEndToEnd/TestMakeApp.py b/webware/Tests/TestEndToEnd/TestMakeApp.py index 837d26f..77e8773 100644 --- a/webware/Tests/TestEndToEnd/TestMakeApp.py +++ b/webware/Tests/TestEndToEnd/TestMakeApp.py @@ -31,12 +31,15 @@ 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]') + output = ' ' .join(' '.join(output[:4]).split()) + 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') + expected = ' '.join(expected) + self.assertTrue(output.startswith(expected)) def testMakeNewApp(self): output = self.runMake(['MyApp'])