From 0b3203f5504ac194b4b775b4abc2262e5c6b7934 Mon Sep 17 00:00:00 2001 From: Jagan Sivaraman Date: Mon, 26 May 2025 19:02:30 +0530 Subject: [PATCH 1/7] Installation in py27 restricted --- .github/workflows/main.yml | 3 ++- README.rst | 2 +- setup.py | 6 ++++-- tox.ini | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 836257e..f92f90a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,5 +17,6 @@ jobs: tox_env: ${{ matrix.tox_env }} strategy: matrix: - tox_env: [py27, py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] + tox_env: [py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] + #py27 removed runs-on: ubuntu-latest diff --git a/README.rst b/README.rst index 7116650..c8d6002 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ This Python package contains CVSS v2, v3 and v4 computation utilities and interactive calculator (for v2 and v3 only) compatible with both Python 2 and Python 3. The library is tested on all currently-supported Python versions available -via GitHub Actions (with the exception of Python 2.7, which is EOL but +via GitHub Actions (with the exception of Python 2.7 or lower, which is EOL but still tested against), but it is simple enough to run on even older versions. Installation diff --git a/setup.py b/setup.py index 60c5c35..1c106f4 100644 --- a/setup.py +++ b/setup.py @@ -45,8 +45,8 @@ "Intended Audience :: Developers", "Topic :: Security", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", + # "Programming Language :: Python :: 2", + # "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", @@ -59,6 +59,8 @@ ], keywords="security cvss score calculator", packages=find_packages(), + python_requires='>=3.6', + # given restrictions to install in py27 install_requires=dependencies, tests_require=["jsonschema"], entry_points={ diff --git a/tox.ini b/tox.ini index 1c82653..6838292 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] -envlist = py{27,36,38,39,310,311,312,313},black,isort,flake8 +envlist = py{36,38,39,310,311,312,313},black,isort,flake8 +#py27 removed [testenv] deps = jsonschema From 4751317f2d830be087ee8deb58f6a9c20d0315f1 Mon Sep 17 00:00:00 2001 From: Jagan Sivaraman Date: Mon, 26 May 2025 19:11:26 +0530 Subject: [PATCH 2/7] origin --- .github/workflows/main.yml | 3 +-- README.rst | 2 +- setup.py | 6 ++---- tox.ini | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f92f90a..836257e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,5 @@ jobs: tox_env: ${{ matrix.tox_env }} strategy: matrix: - tox_env: [py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] - #py27 removed + tox_env: [py27, py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] runs-on: ubuntu-latest diff --git a/README.rst b/README.rst index c8d6002..7116650 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ This Python package contains CVSS v2, v3 and v4 computation utilities and interactive calculator (for v2 and v3 only) compatible with both Python 2 and Python 3. The library is tested on all currently-supported Python versions available -via GitHub Actions (with the exception of Python 2.7 or lower, which is EOL but +via GitHub Actions (with the exception of Python 2.7, which is EOL but still tested against), but it is simple enough to run on even older versions. Installation diff --git a/setup.py b/setup.py index 1c106f4..60c5c35 100644 --- a/setup.py +++ b/setup.py @@ -45,8 +45,8 @@ "Intended Audience :: Developers", "Topic :: Security", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - # "Programming Language :: Python :: 2", - # "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", @@ -59,8 +59,6 @@ ], keywords="security cvss score calculator", packages=find_packages(), - python_requires='>=3.6', - # given restrictions to install in py27 install_requires=dependencies, tests_require=["jsonschema"], entry_points={ diff --git a/tox.ini b/tox.ini index 6838292..1c82653 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,5 @@ [tox] -envlist = py{36,38,39,310,311,312,313},black,isort,flake8 -#py27 removed +envlist = py{27,36,38,39,310,311,312,313},black,isort,flake8 [testenv] deps = jsonschema From 5f08c97b5ed3c81018f47d4fdb9267ba362539f4 Mon Sep 17 00:00:00 2001 From: Jagan Sivaraman Date: Mon, 26 May 2025 19:19:48 +0530 Subject: [PATCH 3/7] Warning to py27 or lower about support --- .github/workflows/main.yml | 3 ++- setup.py | 9 +++++++-- tox.ini | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 836257e..f92f90a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,5 +17,6 @@ jobs: tox_env: ${{ matrix.tox_env }} strategy: matrix: - tox_env: [py27, py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] + tox_env: [py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] + #py27 removed runs-on: ubuntu-latest diff --git a/setup.py b/setup.py index 60c5c35..370c0b6 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,13 @@ import codecs from os import path +import sys from setuptools import find_packages, setup +if sys.version_info < (3, 6): + print("Warning: Package supports Python 3.6 or newer.") + + try: from collections import OrderedDict # noqa except ImportError: @@ -45,8 +50,8 @@ "Intended Audience :: Developers", "Topic :: Security", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", + # "Programming Language :: Python :: 2", + # "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/tox.ini b/tox.ini index 1c82653..6838292 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] -envlist = py{27,36,38,39,310,311,312,313},black,isort,flake8 +envlist = py{36,38,39,310,311,312,313},black,isort,flake8 +#py27 removed [testenv] deps = jsonschema From 78844935c78d9c2afdda7bcee8cb4c3667f6a75b Mon Sep 17 00:00:00 2001 From: Jagan Sivaraman Date: Mon, 26 May 2025 19:20:17 +0530 Subject: [PATCH 4/7] Warning to py27 or lower about support --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7116650..c8d6002 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ This Python package contains CVSS v2, v3 and v4 computation utilities and interactive calculator (for v2 and v3 only) compatible with both Python 2 and Python 3. The library is tested on all currently-supported Python versions available -via GitHub Actions (with the exception of Python 2.7, which is EOL but +via GitHub Actions (with the exception of Python 2.7 or lower, which is EOL but still tested against), but it is simple enough to run on even older versions. Installation From 5cf09ca2ce0f268700ffa642527124ed9fc3dddc Mon Sep 17 00:00:00 2001 From: Jagan Sivaraman Date: Mon, 26 May 2025 19:37:21 +0530 Subject: [PATCH 5/7] Warning to py27 or lower about support --- README.rst | 5 ++--- setup.py | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index c8d6002..961304e 100644 --- a/README.rst +++ b/README.rst @@ -2,11 +2,10 @@ CVSS ==== This Python package contains CVSS v2, v3 and v4 computation utilities and -interactive calculator (for v2 and v3 only) compatible with both Python 2 and Python 3. +interactive calculator (for v2 and v3 only) compatible with Python 3. The library is tested on all currently-supported Python versions available -via GitHub Actions (with the exception of Python 2.7 or lower, which is EOL but -still tested against), but it is simple enough to run on even older versions. +via GitHub Actions but it is simple enough to run on even older versions. Installation ------------ diff --git a/setup.py b/setup.py index 370c0b6..31ad1b3 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,7 @@ from setuptools import find_packages, setup if sys.version_info < (3, 6): - print("Warning: Package supports Python 3.6 or newer.") - + print("Warning: Package does not support Python 2.7 or older.") try: from collections import OrderedDict # noqa From f22bacb60c0e423441b889ee899029a42c4f518b Mon Sep 17 00:00:00 2001 From: JAGAN <84223405+JAGAN-JGUN@users.noreply.github.com> Date: Mon, 26 May 2025 20:00:30 +0530 Subject: [PATCH 6/7] Update setup.py Sorry about the warning. I removed it. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 31ad1b3..176345f 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ import codecs from os import path -import sys +# import sys from setuptools import find_packages, setup -if sys.version_info < (3, 6): - print("Warning: Package does not support Python 2.7 or older.") +# if sys.version_info < (3, 6): +# print("Warning: Package does not support Python 2.7 or older.") try: from collections import OrderedDict # noqa From 343d6bba077325f602b3f8a7d98ef174b17f739f Mon Sep 17 00:00:00 2001 From: Jagan Sivaraman Date: Mon, 26 May 2025 20:26:46 +0530 Subject: [PATCH 7/7] Minor Changes --- .github/workflows/main.yml | 1 - setup.py | 6 ------ tox.ini | 1 - 3 files changed, 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f92f90a..9dc4af3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,5 +18,4 @@ jobs: strategy: matrix: tox_env: [py36, py38, py39, py310, py311, py312, py313, black, isort, flake8] - #py27 removed runs-on: ubuntu-latest diff --git a/setup.py b/setup.py index 31ad1b3..53763fc 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,8 @@ import codecs from os import path -import sys from setuptools import find_packages, setup -if sys.version_info < (3, 6): - print("Warning: Package does not support Python 2.7 or older.") - try: from collections import OrderedDict # noqa except ImportError: @@ -49,8 +45,6 @@ "Intended Audience :: Developers", "Topic :: Security", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - # "Programming Language :: Python :: 2", - # "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/tox.ini b/tox.ini index 6838292..42201b2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,5 @@ [tox] envlist = py{36,38,39,310,311,312,313},black,isort,flake8 -#py27 removed [testenv] deps = jsonschema