From 964395de88e7410641adc49567959ef06bd61d26 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Mon, 14 Oct 2024 10:06:03 -0400 Subject: [PATCH 1/4] Add 3.13 to Python version matrix and fix audit workflow Signed-off-by: Timothy Johnson --- .github/workflows/audit.yml | 3 +++ .github/workflows/sdk-build.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 2ea2812e..bedffc3a 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -15,6 +15,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/sdk-build.yml b/.github/workflows/sdk-build.yml index 34e99474..048b1d35 100644 --- a/.github/workflows/sdk-build.yml +++ b/.github/workflows/sdk-build.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} From d1114a3223de4e744ec8ce6dedad83146550a65c Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Mon, 14 Oct 2024 10:44:26 -0400 Subject: [PATCH 2/4] Clean up deps and deprecated VS Code settings Signed-off-by: Timothy Johnson --- .vscode/extensions.json | 1 + .vscode/settings.json | 18 ++++++++---------- requirements.txt | 40 +++++++++++++--------------------------- 3 files changed, 22 insertions(+), 37 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 971dbc3a..9a4e307d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "ms-python.black-formatter", "ms-python.isort", + "ms-python.pylint", "ms-python.vscode-pylance" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4ba0139c..044ce9e6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,20 +6,18 @@ "editor.defaultFormatter": "ms-python.black-formatter", "editor.formatOnSave": true }, - "python.testing.pytestArgs": ["tests"], - "python.testing.pytestEnabled": true, - "python.testing.unittestEnabled": false, - "rust-analyzer.linkedProjects": [ - "./src/secrets/Cargo.toml" - ], "python.analysis.extraPaths": [ "./src/core", "./src/zos_console", "./src/zos_files", "./src/zos_jobs", - "./src/zosmf", - "./src/zos_tso" + "./src/zos_tso", + "./src/zosmf" ], - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, + "python.testing.pytestArgs": ["tests"], + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, + "rust-analyzer.linkedProjects": [ + "./src/secrets/Cargo.toml" + ] } diff --git a/requirements.txt b/requirements.txt index cd3bf105..3a3561c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,35 +1,22 @@ -black -certifi==2024.7.4 -chardet==4.0.0 -colorama==0.4.5 commentjson==0.9.0 -coverage==5.4 deepmerge==1.1.0 -idna==3.7 -importlib-metadata==3.6.0;python_version<"3.8" -isort jsonschema==4.17.3 -lxml==4.9.3 -maturin -mccabe==0.7.0 -nose2==0.10.0 -pycodestyle==2.9.0 -pydocstyle==5.1.1 -pydoclint==0.5.3 -pyfakefs -pylama==7.7.1 -pylint==3.2.5 -pytest==7.4.4 -python-decouple==3.4 PyYAML==6.0.1 requests==2.32.0 -six==1.15.0 -snowballstemmer==2.1.0 -typing-extensions==4.0.1 -Unidecode==1.2.0 -urllib3==1.26.19 + +# Dev deps +black +coverage +isort +maturin +pydoclint +pydocstyle +pyfakefs +pylint +pytest wheel -zipp==3.19.1 + +# Local deps -e ./src/core[secrets] -e ./src/secrets -e ./src/zos_console @@ -37,4 +24,3 @@ zipp==3.19.1 -e ./src/zos_jobs -e ./src/zos_tso -e ./src/zosmf - From 5a4528364a812214713c5814b14ef72fddc35478 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Mon, 14 Oct 2024 10:55:26 -0400 Subject: [PATCH 3/4] Fix issue flagged by pydoclint Signed-off-by: Timothy Johnson --- src/zos_files/zowe/zos_files_for_zowe_sdk/file_system.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/zos_files/zowe/zos_files_for_zowe_sdk/file_system.py b/src/zos_files/zowe/zos_files_for_zowe_sdk/file_system.py index db007dca..de59397d 100644 --- a/src/zos_files/zowe/zos_files_for_zowe_sdk/file_system.py +++ b/src/zos_files/zowe/zos_files_for_zowe_sdk/file_system.py @@ -13,8 +13,9 @@ from typing import Optional from zowe.core_for_zowe_sdk import SdkApi -from zowe.zos_files_for_zowe_sdk import constants, exceptions +from zowe.zos_files_for_zowe_sdk import constants +from .exceptions import InvalidPermsOption, MaxAllocationQuantityExceeded from .response import FileSystemListResponse _ZOWE_FILES_DEFAULT_ENCODING = constants.zos_file_constants["ZoweFilesDefaultEncoding"] @@ -65,12 +66,12 @@ def create(self, file_system_name: str, options: dict = {}) -> dict: if key == "perms": if value < 0 or value > 777: self.logger.error("Invalid Permissions Option.") - raise exceptions.InvalidPermsOption(value) + raise InvalidPermsOption(value) if key == "cylsPri" or key == "cylsSec": if value > constants.zos_file_constants["MaxAllocationQuantity"]: self.logger.error("Maximum allocation quantity exceeded.") - raise exceptions.MaxAllocationQuantityExceeded + raise MaxAllocationQuantityExceeded() custom_args = self._create_custom_request_arguments() custom_args["url"] = "{}mfs/zfs/{}".format(self._request_endpoint, file_system_name) From 7df68618dcf1ae39a3b539d34d1c34d671c3ea5f Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Mon, 14 Oct 2024 11:18:13 -0400 Subject: [PATCH 4/4] Drop Python 3.8 from version matrix Signed-off-by: Timothy Johnson --- .github/workflows/sdk-build.yml | 2 +- README.md | 2 +- src/core/setup.py | 3 ++- src/setup.py | 3 ++- src/zos_console/setup.py | 3 ++- src/zos_files/setup.py | 3 ++- src/zos_jobs/setup.py | 3 ++- src/zos_tso/setup.py | 3 ++- src/zosmf/setup.py | 3 ++- 9 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sdk-build.yml b/.github/workflows/sdk-build.yml index 048b1d35..1b0b8a25 100644 --- a/.github/workflows/sdk-build.yml +++ b/.github/workflows/sdk-build.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} diff --git a/README.md b/README.md index 3306fc17..1f212e44 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ pip install -U --pre zowe.core-for-zowe-sdk[secrets] Ensure the following prerequisites are installed and on your PATH: -- Python >= 3.8 and `pip` +- Python >= 3.9 and `pip` - Cargo >= 1.72 (to build Rust bindings for Secrets SDK) - Visual Studio Build Tools >= 2015 (Windows only) diff --git a/src/core/setup.py b/src/core/setup.py index b607e996..3137f09c 100644 --- a/src/core/setup.py +++ b/src/core/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import sys from setuptools import find_namespace_packages, setup @@ -29,7 +30,7 @@ license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[ diff --git a/src/setup.py b/src/setup.py index 4b0d4767..60d7b049 100644 --- a/src/setup.py +++ b/src/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import os.path import uuid @@ -43,7 +44,7 @@ def resolve_sdk_dep(sdk_name, version_spec): license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[ diff --git a/src/zos_console/setup.py b/src/zos_console/setup.py index 0336d0a7..1ee7f52d 100644 --- a/src/zos_console/setup.py +++ b/src/zos_console/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import sys from setuptools import find_namespace_packages, setup @@ -29,7 +30,7 @@ license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[resolve_sdk_dep("core", "~=" + __version__)], diff --git a/src/zos_files/setup.py b/src/zos_files/setup.py index a4cf3ea3..a9d124a0 100644 --- a/src/zos_files/setup.py +++ b/src/zos_files/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import sys from setuptools import find_namespace_packages, setup @@ -29,7 +30,7 @@ license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[resolve_sdk_dep("core", "~=" + __version__)], diff --git a/src/zos_jobs/setup.py b/src/zos_jobs/setup.py index c885b8ae..665f343b 100644 --- a/src/zos_jobs/setup.py +++ b/src/zos_jobs/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import sys from setuptools import find_namespace_packages, setup @@ -29,7 +30,7 @@ license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[resolve_sdk_dep("core", "~=" + __version__)], diff --git a/src/zos_tso/setup.py b/src/zos_tso/setup.py index 46d96344..710a0d2b 100644 --- a/src/zos_tso/setup.py +++ b/src/zos_tso/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import sys from setuptools import find_namespace_packages, setup @@ -29,7 +30,7 @@ license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[resolve_sdk_dep("core", "~=" + __version__)], diff --git a/src/zosmf/setup.py b/src/zosmf/setup.py index 644192c1..3cc34061 100644 --- a/src/zosmf/setup.py +++ b/src/zosmf/setup.py @@ -9,6 +9,7 @@ Copyright Contributors to the Zowe Project. """ + import sys from setuptools import find_namespace_packages, setup @@ -29,7 +30,7 @@ license="EPL-2.0", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", ], install_requires=[resolve_sdk_dep("core", "~=" + __version__)],