From e10829c4a1d60fc8d0d7cd738780babecc6c4a67 Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:41:39 +0000 Subject: [PATCH 1/9] Update doc --- doc/en/getting_started.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/en/getting_started.rst b/doc/en/getting_started.rst index 3a9bcc957..76890da9e 100644 --- a/doc/en/getting_started.rst +++ b/doc/en/getting_started.rst @@ -9,7 +9,7 @@ in your local environment! Supported Python Versions ========================= -Testplan is tested to work with Python 3.7 and 3.8, 3.10 and 3.11 so we recommend choosing one of those. +Testplan is tested to work with Python 3.10 and 3.11 so we recommend choosing one of those. .. _install_testplan: @@ -22,7 +22,7 @@ Install from archive: .. code-block:: bash - python3.7 -m pip install https://github.com/morganstanley/testplan/releases/download/latest/testplan-21.9.29-py3-none-any.whl + python3.10 -m pip install https://github.com/morganstanley/testplan/releases/download/24.9.2/testplan-24.9.2-py3-none-any.whl Run testplan @@ -76,8 +76,8 @@ Also find all our downloadable examples :ref:`here `. Working with the source ----------------------- - -You will need a working python 3.7+ interrpreter preferably a venv, and for the interactive ui you need node installed. + +You will need a working python 3.10+ interpreter preferably a venv, and for the interactive ui you need node installed. We are using `doit `_ as the taskrunner ``doit list`` can show all the commands. .. code-block:: text From a8ba0e74b1e59d149fd55ee10ff13ef32b581794 Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:43:47 +0000 Subject: [PATCH 2/9] add new function calls for newer Sphinx versions --- doc/en/conf.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/en/conf.py b/doc/en/conf.py index 9a314a11d..866b414be 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -39,6 +39,11 @@ def generate_news(): def setup(app): - app.add_stylesheet("icon.css") - app.add_stylesheet("news.css") + try: + app.add_css_file("icon.css") + app.add_css_file("news.css") + except AttributeError: + app.add_stylesheet("icon.css") + app.add_stylesheet("news.css") + generate_news() From e5e044c3a9f93d98950d659873769b83be3a047c Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:56:42 +0000 Subject: [PATCH 3/9] update Python version in documentation links --- doc/en/unittests.rst | 2 +- examples/PyUnit/test_plan.py | 4 ++-- testplan/testing/filtering.py | 2 +- tests/unit/testplan/testing/test_pyunit.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/en/unittests.rst b/doc/en/unittests.rst index 9614cce2b..8e521966a 100644 --- a/doc/en/unittests.rst +++ b/doc/en/unittests.rst @@ -42,7 +42,7 @@ Python - unittest ================= ``unittest`` is the unit-testing framework built into the Python standard library, -see https://docs.python.org/3.7/library/unittest.html for more information. +see https://docs.python.org/3/library/unittest.html for more information. ``unittest`` testcases may be integrated with Testplan via the :py:class:`~testplan.testing.pyunit.PyUnit` test runner. Example can be found :ref:`here `. diff --git a/examples/PyUnit/test_plan.py b/examples/PyUnit/test_plan.py index 8aa47c9f7..844c32107 100755 --- a/examples/PyUnit/test_plan.py +++ b/examples/PyUnit/test_plan.py @@ -29,7 +29,7 @@ class TestAlpha(unittest.TestCase): """ Minimal PyUnit testcase with a single trivial test method. For more information about the unittest library, see the [documentation]( - http://docs.python.org/2/library/unittest.html). + http://docs.python.org/3/library/unittest.html). """ def test_example(self): @@ -42,7 +42,7 @@ class TestBeta(unittest.TestCase): """ Minimal PyUnit testcase with a single trivial test method. For more information about the unittest library, see the [documentation]( - http://docs.python.org/2/library/unittest.html). + http://docs.python.org/3/library/unittest.html). """ def test_fails(self): diff --git a/testplan/testing/filtering.py b/testplan/testing/filtering.py index 1592130e6..e76022690 100644 --- a/testplan/testing/filtering.py +++ b/testplan/testing/filtering.py @@ -268,7 +268,7 @@ class Pattern(Filter): """ Base class for name based, glob style filtering. - https://docs.python.org/3.4/library/fnmatch.html + https://docs.python.org/3/library/fnmatch.html Examples: diff --git a/tests/unit/testplan/testing/test_pyunit.py b/tests/unit/testplan/testing/test_pyunit.py index 222f21855..925d74716 100644 --- a/tests/unit/testplan/testing/test_pyunit.py +++ b/tests/unit/testplan/testing/test_pyunit.py @@ -23,7 +23,7 @@ class Passing(unittest.TestCase): """ Minimal PyUnit testcase with a single trivial test method. For more information about the unittest library, see the [documentation]( - http://docs.python.org/2/library/unittest.html). + http://docs.python.org/3/library/unittest.html). """ def test_asserts(self): From 0d326dcff9a10c72f48c11a87ee29f0b0e8b8f4a Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:12:24 +0000 Subject: [PATCH 4/9] py310 in RTD config --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index aeb5d4e33..97d272a26 100755 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.7" + python: "3.10" jobs: post_checkout: - git fetch --unshallow || true From 88aa0abccdf73743113ff824e489f3f680bb510c Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:47:31 +0000 Subject: [PATCH 5/9] remove use of 3.7 and 3.8 from PR testing --- .github/workflows/test_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index 92a9eb3e9..c345b17a6 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -109,7 +109,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04, windows-latest] - python-version: [3.7, 3.8, '3.10', 3.11] + python-version: ['3.10', 3.11] fail-fast: false steps: From 68c882c481c3a5cf1b08cd7af0e2e2d286f9b822 Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:50:24 +0000 Subject: [PATCH 6/9] update pyproject.toml --- pyproject.toml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f9200476f..bd959d39c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,9 +20,6 @@ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Testing", @@ -44,12 +41,9 @@ "pyzmq", "terminaltables", "requests>=2.4.3", - "Flask>2.0.0,<2.3.0; python_version=='3.7'", - "Flask>2.0.0; python_version>='3.8'", - "Werkzeug>2.0.0,<2.3.0; python_version=='3.7'", - "Werkzeug>2.0.0; python_version>='3.8'", - "flask_restx<1.2.0; python_version=='3.7'", - "flask_restx; python_version>='3.8'", + "Flask>2.0.0", + "Werkzeug>2.0.0", + "flask_restx", "cheroot", "boltons", "validators<=0.20.0", @@ -66,7 +60,7 @@ "orjson; python_version>='3.8'", "flask-orjson; python_version>='3.8'" ] - requires-python = ">=3.7" + requires-python = ">=3.10" [project.urls] homepage = "https://github.com/morganstanley/testplan" From 92ece5a03871e4cd6f40c28a64d780c0952b0e86 Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:53:38 +0000 Subject: [PATCH 7/9] Only warn about Python 3.7 and 3.8 deprecation --- .github/workflows/test_pr.yml | 2 +- doc/en/getting_started.rst | 2 +- doc/en/index.rst | 5 +++++ .../3055_deprecated.py37_38_deprecated.rst | 1 + examples/Multitest/Parallel/parallel_tasks.py | 2 +- pyproject.toml | 14 ++++++++++---- 6 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 doc/newsfragments/3055_deprecated.py37_38_deprecated.rst diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index c345b17a6..92a9eb3e9 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -109,7 +109,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04, windows-latest] - python-version: ['3.10', 3.11] + python-version: [3.7, 3.8, '3.10', 3.11] fail-fast: false steps: diff --git a/doc/en/getting_started.rst b/doc/en/getting_started.rst index 76890da9e..b99131afc 100644 --- a/doc/en/getting_started.rst +++ b/doc/en/getting_started.rst @@ -9,7 +9,7 @@ in your local environment! Supported Python Versions ========================= -Testplan is tested to work with Python 3.10 and 3.11 so we recommend choosing one of those. +Testplan is tested to work with Python 3.10 and 3.11 so we recommend choosing one of those. Python 3.7 and 3.8 support is deprecated and will be removed soon. .. _install_testplan: diff --git a/doc/en/index.rst b/doc/en/index.rst index 3b45d27c9..bc45d0c13 100644 --- a/doc/en/index.rst +++ b/doc/en/index.rst @@ -1,3 +1,8 @@ +.. attention:: + + Support for Python 3.7 and 3.8 is deprecated and will be removed soon. + Please upgrade to Python 3.10 or 3.11. + .. raw:: html
diff --git a/doc/newsfragments/3055_deprecated.py37_38_deprecated.rst b/doc/newsfragments/3055_deprecated.py37_38_deprecated.rst new file mode 100644 index 000000000..54b068e9a --- /dev/null +++ b/doc/newsfragments/3055_deprecated.py37_38_deprecated.rst @@ -0,0 +1 @@ +Support for Python 3.7 and 3.8 is deprecated and will be removed soon. \ No newline at end of file diff --git a/examples/Multitest/Parallel/parallel_tasks.py b/examples/Multitest/Parallel/parallel_tasks.py index e67d30484..6a896c65d 100644 --- a/examples/Multitest/Parallel/parallel_tasks.py +++ b/examples/Multitest/Parallel/parallel_tasks.py @@ -35,7 +35,7 @@ def __init__(self): # # Note that on Python 3 you can use the Barrier class from the standard # library: - # https://docs.python.org/3.7/library/threading.html#barrier-objects . + # https://docs.python.org/3/library/threading.html#barrier-objects . # Here we use a backported Barrier provided by Testplan, which works # on both Python 2 and 3. self._barrier = thread_utils.Barrier(2) diff --git a/pyproject.toml b/pyproject.toml index bd959d39c..f9200476f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,9 @@ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Testing", @@ -41,9 +44,12 @@ "pyzmq", "terminaltables", "requests>=2.4.3", - "Flask>2.0.0", - "Werkzeug>2.0.0", - "flask_restx", + "Flask>2.0.0,<2.3.0; python_version=='3.7'", + "Flask>2.0.0; python_version>='3.8'", + "Werkzeug>2.0.0,<2.3.0; python_version=='3.7'", + "Werkzeug>2.0.0; python_version>='3.8'", + "flask_restx<1.2.0; python_version=='3.7'", + "flask_restx; python_version>='3.8'", "cheroot", "boltons", "validators<=0.20.0", @@ -60,7 +66,7 @@ "orjson; python_version>='3.8'", "flask-orjson; python_version>='3.8'" ] - requires-python = ">=3.10" + requires-python = ">=3.7" [project.urls] homepage = "https://github.com/morganstanley/testplan" From 953c5fbb0b99face4649fe5c37ca4c91b387845a Mon Sep 17 00:00:00 2001 From: zsambokiandras <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:58:34 +0100 Subject: [PATCH 8/9] Apply suggestions for documentation Co-authored-by: Zhenyu Yao <111329301+zhenyu-ms@users.noreply.github.com> --- doc/en/getting_started.rst | 4 ++-- doc/en/index.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/getting_started.rst b/doc/en/getting_started.rst index b99131afc..b293cacbb 100644 --- a/doc/en/getting_started.rst +++ b/doc/en/getting_started.rst @@ -22,7 +22,7 @@ Install from archive: .. code-block:: bash - python3.10 -m pip install https://github.com/morganstanley/testplan/releases/download/24.9.2/testplan-24.9.2-py3-none-any.whl + python3 -m pip install https://github.com/morganstanley/testplan/releases/download/24.9.2/testplan-24.9.2-py3-none-any.whl Run testplan @@ -77,7 +77,7 @@ Also find all our downloadable examples :ref:`here `. Working with the source ----------------------- -You will need a working python 3.10+ interpreter preferably a venv, and for the interactive ui you need node installed. +You will need a working Python 3 interpreter preferably a venv, and for the interactive ui you need Node.js installed. We are using `doit `_ as the taskrunner ``doit list`` can show all the commands. .. code-block:: text diff --git a/doc/en/index.rst b/doc/en/index.rst index bc45d0c13..08ffc03d9 100644 --- a/doc/en/index.rst +++ b/doc/en/index.rst @@ -1,7 +1,7 @@ .. attention:: Support for Python 3.7 and 3.8 is deprecated and will be removed soon. - Please upgrade to Python 3.10 or 3.11. + Please upgrade to newer versions. .. raw:: html From bade7c13d78f7e01dd684d0b310348a85c56d2fa Mon Sep 17 00:00:00 2001 From: Andras Zsamboki <13022325+zsambokiandras@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:30:49 +0000 Subject: [PATCH 9/9] add pypi info to documentation --- doc/en/getting_started.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/en/getting_started.rst b/doc/en/getting_started.rst index b293cacbb..a8151ed5f 100644 --- a/doc/en/getting_started.rst +++ b/doc/en/getting_started.rst @@ -16,7 +16,14 @@ Testplan is tested to work with Python 3.10 and 3.11 so we recommend choosing on Install testplan ================ -Testplan is not yet available from pypi.org but one can still install it from the latest github package. A link for our lates package can be obtained from: https://github.com/morganstanley/testplan/releases/tag/latest +Testplan is available from pypi.org: https://pypi.org/project/testplan/ + + .. code-block:: bash + + python3 -m pip install testplan + + +Alternatively, one can install it from the latest github package. A link for our lates package can be obtained from: https://github.com/morganstanley/testplan/releases/tag/latest Install from archive: