From 31d7453d7191a3798bdd6600d90e73f4f1f786bc Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 12:57:24 +0530 Subject: [PATCH 1/9] PQC changes --- .github/workflows/dockerimage.yml | 2 +- .github/workflows/run_tests.yml | 13 ++++++++++++- CHANGELOG.md | 9 +++++++++ Dockerfile | 5 +---- README.md | 21 ++++++++++++++++++++- examples/scmb/scmb.py | 2 +- hpeOneView/__init__.py | 4 ++-- hpeOneView/connection.py | 4 +++- tests/unit/test_connection.py | 12 ++++++++---- tox.ini | 23 ++++++++++++++++++++++- 10 files changed, 79 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 82800f6a0..ceb4886f5 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.12' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 561deac2f..c8cde99dc 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -8,7 +8,7 @@ jobs: name: Run tox (${{ matrix.python_version }}) strategy: matrix: - python_version: [3.9] + python_version: [3.9, 3.12] runs-on: ubuntu-latest steps: @@ -24,6 +24,17 @@ jobs: python -m pip install --upgrade pip pip install tox + - name: Display Python SSL runtime details + run: | + python -c "import ssl; print('Python SSL:', ssl.OPENSSL_VERSION)" + + - name: Display OpenSSL providers and PQC algorithms + run: | + openssl version + openssl list -providers || true + openssl list -public-key-algorithms | grep -i mldsa || true + openssl list -public-key-algorithms | grep -i mlkem || true + - name: Run tox tests run: tox diff --git a/CHANGELOG.md b/CHANGELOG.md index d7f9aead6..0549a55bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Unreleased +#### Notes +- Updated HTTPS client context from TLS 1.2 pinning to TLS client mode with TLS 1.3 minimum. +- Added explicit trust-all hostname handling for non-verified SSL mode. +- Updated unit tests to validate TLS client protocol and TLS 1.3 minimum. +- Updated SCMB example to remove TLS 1.2 pinning. +- Updated Docker base image to Python 3.12 Bookworm and refreshed CI/tox matrix for Python 3.12 coverage. +- Added README guidance for OpenSSL runtime and PQC validation commands. + # 11.30.0 #### Notes Extends Support Of The Sdk To Oneview Rest Api Version 8600 (Oneview V11.30.0) diff --git a/Dockerfile b/Dockerfile index 29a324e57..91e7cf013 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim-bullseye +FROM python:3.12-slim-bookworm ARG http_proxy ARG https_proxy @@ -20,9 +20,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && \ RUN python -m pip install --upgrade pip -RUN pip install future==0.18.2 - - RUN pip install hpeOneView diff --git a/README.md b/README.md index 18215c5a3..110eed3b7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,26 @@ HPE OneView makes it simple to deploy and manage today’s complex hybrid cloud infrastructure. HPE OneView can help you transform your data center to software-defined, and it supports HPE’s broad portfolio of servers, storage, and networking solutions, ensuring the simple and automated management of your hybrid infrastructure. Software-defined intelligence enables a template-driven approach for deploying, provisioning, updating, and integrating compute, storage, and networking infrastructure. -The HPE OneView Python library provides a pure Python interface to the HPE OneView REST APIs. It depends on the [Python-Future](http://python-future.org/index.html) library to provide Python 2/3 compatibility. +The HPE OneView Python library provides a pure Python interface to the HPE OneView REST APIs. + +## TLS and PQC Requirements + +For PQC-ready TLS negotiation, use an environment where Python is linked to a PQC-capable OpenSSL runtime. + +- Minimum Python runtime: 3.9+ +- Minimum OpenSSL runtime for PQC paths: 3.2+ with OQS provider, or 3.5+ with native PQC support +- TLS requirement for PQC handshake: TLS 1.3 + +To verify runtime capabilities: + +```bash +python -c "import ssl; print(ssl.OPENSSL_VERSION)" +openssl list -providers +openssl list -public-key-algorithms | grep -i mldsa +openssl list -public-key-algorithms | grep -i mlkem +``` + +Note: Do not pin ciphers or groups in the SDK; rely on OpenSSL defaults so hybrid PQC groups can be negotiated by the TLS stack. You can find the latest supported HPE OneView Python SDK [here](https://github.com/HewlettPackard/oneview-python/releases/latest) diff --git a/examples/scmb/scmb.py b/examples/scmb/scmb.py index 5d4834a49..232e852d6 100755 --- a/examples/scmb/scmb.py +++ b/examples/scmb/scmb.py @@ -91,7 +91,7 @@ def recv(host, route): 'certfile': 'client.pem', 'keyfile': 'key.pem', 'cert_reqs': ssl.CERT_NONE, - 'ssl_version': ssl.PROTOCOL_TLSv1_2, + 'ssl_version': ssl.PROTOCOL_TLS_CLIENT, 'server_side': False}) # Checking whether the file is present or not diff --git a/hpeOneView/__init__.py b/hpeOneView/__init__.py index 362d68807..2b626c127 100644 --- a/hpeOneView/__init__.py +++ b/hpeOneView/__init__.py @@ -45,9 +45,9 @@ warning_message = 'Running unsupported Python version: %s, unexpected errors might occur.' warning_message += ' Use of Python v2.7.9+ is advised.' warnings.warn(warning_message % '.'.join(map(str, PYTHON_VERSION)), Warning) -elif PYTHON_VERSION < (3, 4): +elif PYTHON_VERSION < (3, 9): warning_message = 'Running unsupported Python version> %s, unexpected errors might occur.' - warning_message += ' Use of Python v3.4+ is advised.' + warning_message += ' Use of Python v3.9+ is advised.' warnings.warn(warning_message % '.'.join(map(str, PYTHON_VERSION)), Warning) from hpeOneView.connection import * diff --git a/hpeOneView/connection.py b/hpeOneView/connection.py index 15f244cfd..7506817b1 100644 --- a/hpeOneView/connection.py +++ b/hpeOneView/connection.py @@ -226,7 +226,8 @@ def __handle_download_error(self, resp, conn): raise HPEOneViewException(body) def get_connection(self): - context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + context.minimum_version = ssl.TLSVersion.TLSv1_3 if self._sslTrustAll is False: context.verify_mode = ssl.CERT_REQUIRED context.load_verify_locations(self._sslTrustedBundle) @@ -241,6 +242,7 @@ def get_connection(self): timeout=self._timeout) conn.set_tunnel(self._host, 443) else: + context.check_hostname = False context.verify_mode = ssl.CERT_NONE if self._doProxy is False: conn = http.client.HTTPSConnection(self._host, diff --git a/tests/unit/test_connection.py b/tests/unit/test_connection.py index 343249ce5..3e4a3f1d8 100644 --- a/tests/unit/test_connection.py +++ b/tests/unit/test_connection.py @@ -1065,7 +1065,8 @@ def test_get_connection_ssl_trust_all(self): self.assertEqual(conn.host, '127.0.0.1') self.assertEqual(conn.port, 443) - self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLSv1_2) + self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLS_CLIENT) + self.assertEqual(conn._context.minimum_version, ssl.TLSVersion.TLSv1_3) def test_get_connection_ssl_trust_all_with_proxy(self): @@ -1075,7 +1076,8 @@ def test_get_connection_ssl_trust_all_with_proxy(self): self.assertEqual(conn.host, '10.0.0.1') self.assertEqual(conn.port, 3128) - self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLSv1_2) + self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLS_CLIENT) + self.assertEqual(conn._context.minimum_version, ssl.TLSVersion.TLSv1_3) @patch.object(ssl.SSLContext, 'load_verify_locations') def test_get_connection_trusted_ssl_bundle_with_proxy(self, mock_lvl): @@ -1087,7 +1089,8 @@ def test_get_connection_trusted_ssl_bundle_with_proxy(self, mock_lvl): self.assertEqual(conn.host, '10.0.0.1') self.assertEqual(conn.port, 3128) - self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLSv1_2) + self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLS_CLIENT) + self.assertEqual(conn._context.minimum_version, ssl.TLSVersion.TLSv1_3) @patch.object(ssl.SSLContext, 'load_verify_locations') def test_get_connection_trusted_ssl_bundle(self, mock_lvl): @@ -1098,7 +1101,8 @@ def test_get_connection_trusted_ssl_bundle(self, mock_lvl): self.assertEqual(conn.host, '127.0.0.1') self.assertEqual(conn.port, 443) - self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLSv1_2) + self.assertEqual(conn._context.protocol, ssl.PROTOCOL_TLS_CLIENT) + self.assertEqual(conn._context.minimum_version, ssl.TLSVersion.TLSv1_3) if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index cdb0bd9d0..78ca8107b 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ [tox] -envlist = docs, py34, py36, py39-coverage, py39-flake8 +envlist = docs, py39-coverage, py39-flake8, py312-coverage, py312-flake8 skip_missing_interpreters = true [flake8] @@ -36,6 +36,19 @@ commands = coverage run --source=hpeOneView -m unittest discover - coveralls +[testenv:py312-coverage] +basepython = + python3.12 +passenv = TRAVIS, TRAVIS_JOB_ID, TRAVIS_BRANCH +deps = + -r{toxinidir}/test_requirements.txt + coverage + coveralls +commands = + coverage erase + coverage run --source=hpeOneView -m unittest discover + - coveralls + [testenv:py39-flake8] basepython = python3.9 @@ -44,6 +57,14 @@ deps = commands = flake8 {posargs} hpeOneView/ tests/ examples/ +[testenv:py312-flake8] +basepython = + python3.12 +deps = + flake8 +commands = + flake8 {posargs} hpeOneView/ tests/ examples/ + [testenv:docs] basepython=python3.9 deps= From 02c76492b5551dadfc3b74eea60c66db1e639376 Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 13:26:47 +0530 Subject: [PATCH 2/9] Fix - Deploy to github pages --- .github/workflows/run_tests.yml | 34 +++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c8cde99dc..665ef4a34 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -2,6 +2,7 @@ name: python CI on: - pull_request +- push jobs: tox_test: @@ -10,6 +11,10 @@ jobs: matrix: python_version: [3.9, 3.12] runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write steps: - uses: actions/checkout@v2 @@ -43,15 +48,28 @@ jobs: pip install coverage coverage xml - - name: Deploy to GitHub Pages - if: success() - uses: crazy-max/ghaction-github-pages@v2 + - name: Build docs for Pages deploy + if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + run: tox -e docs + + - name: Verify docs build output exists + if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + run: test -d docs/build/html + + - name: Configure GitHub Pages + if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + uses: actions/configure-pages@v5 + + - name: Upload GitHub Pages artifact + if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + uses: actions/upload-pages-artifact@v3 with: - target_branch: gh-pages - keep_history: true - build_dir: docs/build/html/. - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + path: docs/build/html + + - name: Deploy to GitHub Pages + if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + id: deployment + uses: actions/deploy-pages@v4 - name: Upload coverage to Coveralls id: coveralls From b9bc48bc0a312672e8b2a335a3a2ffb1ba0e1df6 Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 13:41:49 +0530 Subject: [PATCH 3/9] Fix - Create coverage status check --- .github/workflows/run_tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 665ef4a34..83884fff8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,6 +15,7 @@ jobs: contents: read pages: write id-token: write + statuses: write steps: - uses: actions/checkout@v2 @@ -84,17 +85,20 @@ jobs: continue-on-error: true - name: Create coverage status check - if: always() + if: always() && (github.event_name == 'push' || github.event.pull_request.head.repo.fork == false) uses: actions/github-script@v6 with: script: | const coverage_result = '${{ steps.coveralls.outcome }}'; const conclusion = coverage_result === 'success' ? 'success' : 'neutral'; + const sha = context.eventName === 'pull_request' + ? context.payload.pull_request.head.sha + : context.sha; await github.rest.repos.createCommitStatus({ owner: context.repo.owner, repo: context.repo.repo, - sha: context.payload.pull_request.head.sha, + sha, state: conclusion === 'success' ? 'success' : 'failure', target_url: 'https://coveralls.io/github/${{ github.repository }}', description: 'Coverage report uploaded', From b43248db99164b576036442d61969330b1b14d5c Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 13:56:41 +0530 Subject: [PATCH 4/9] Run tox 3.9 failure - github pages --- .github/workflows/run_tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 83884fff8..bbff750a9 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -11,6 +11,8 @@ jobs: matrix: python_version: [3.9, 3.12] runs-on: ubuntu-latest + environment: + name: github-pages permissions: contents: read pages: write From 7f02a519bce1c6e6eca7f78a7e49d5f4db9832b3 Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 14:03:49 +0530 Subject: [PATCH 5/9] Fix - tox 3.9 github pages --- .github/workflows/run_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index bbff750a9..62276748f 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -52,25 +52,25 @@ jobs: coverage xml - name: Build docs for Pages deploy - if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' run: tox -e docs - name: Verify docs build output exists - if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' run: test -d docs/build/html - name: Configure GitHub Pages - if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' uses: actions/configure-pages@v5 - name: Upload GitHub Pages artifact - if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' uses: actions/upload-pages-artifact@v3 with: path: docs/build/html - name: Deploy to GitHub Pages - if: success() && github.event_name == 'push' && matrix.python_version == '3.9' + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' id: deployment uses: actions/deploy-pages@v4 From 799f10ea376494cc852199b6db626d7c46164098 Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 14:24:50 +0530 Subject: [PATCH 6/9] Fix run fail --- .github/workflows/run_tests.yml | 48 +++++++++------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 62276748f..b08012008 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -2,7 +2,6 @@ name: python CI on: - pull_request -- push jobs: tox_test: @@ -11,13 +10,6 @@ jobs: matrix: python_version: [3.9, 3.12] runs-on: ubuntu-latest - environment: - name: github-pages - permissions: - contents: read - pages: write - id-token: write - statuses: write steps: - uses: actions/checkout@v2 @@ -51,29 +43,6 @@ jobs: pip install coverage coverage xml - - name: Build docs for Pages deploy - if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' - run: tox -e docs - - - name: Verify docs build output exists - if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' - run: test -d docs/build/html - - - name: Configure GitHub Pages - if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' - uses: actions/configure-pages@v5 - - - name: Upload GitHub Pages artifact - if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' - uses: actions/upload-pages-artifact@v3 - with: - path: docs/build/html - - - name: Deploy to GitHub Pages - if: success() && github.event_name == 'push' && github.ref == 'refs/heads/gh-pages' && matrix.python_version == '3.9' - id: deployment - uses: actions/deploy-pages@v4 - - name: Upload coverage to Coveralls id: coveralls uses: coverallsapp/github-action@v2 @@ -86,21 +55,28 @@ jobs: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} continue-on-error: true + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + keep_history: true + build_dir: docs/build/html/. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create coverage status check - if: always() && (github.event_name == 'push' || github.event.pull_request.head.repo.fork == false) + if: always() uses: actions/github-script@v6 with: script: | const coverage_result = '${{ steps.coveralls.outcome }}'; const conclusion = coverage_result === 'success' ? 'success' : 'neutral'; - const sha = context.eventName === 'pull_request' - ? context.payload.pull_request.head.sha - : context.sha; await github.rest.repos.createCommitStatus({ owner: context.repo.owner, repo: context.repo.repo, - sha, + sha: context.payload.pull_request.head.sha, state: conclusion === 'success' ? 'success' : 'failure', target_url: 'https://coveralls.io/github/${{ github.repository }}', description: 'Coverage report uploaded', From eab311101c90dafbd4251a657593822a63c593fd Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 14:27:26 +0530 Subject: [PATCH 7/9] Fix failure --- .github/workflows/run_tests.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index b08012008..c8cde99dc 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -43,6 +43,16 @@ jobs: pip install coverage coverage xml + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + keep_history: true + build_dir: docs/build/html/. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload coverage to Coveralls id: coveralls uses: coverallsapp/github-action@v2 @@ -55,16 +65,6 @@ jobs: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} continue-on-error: true - - name: Deploy to GitHub Pages - if: success() - uses: crazy-max/ghaction-github-pages@v2 - with: - target_branch: gh-pages - keep_history: true - build_dir: docs/build/html/. - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create coverage status check if: always() uses: actions/github-script@v6 From 020bfdf75c3690b182fa9a68ba18be5128648a6e Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 14:39:14 +0530 Subject: [PATCH 8/9] Keep run only for 3.9 --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c8cde99dc..3ef915cbc 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -44,7 +44,7 @@ jobs: coverage xml - name: Deploy to GitHub Pages - if: success() + if: success() && matrix.python_version == '3.9' uses: crazy-max/ghaction-github-pages@v2 with: target_branch: gh-pages From eb141a3e4a106f51d1447ccd1a4e7c042146ee1b Mon Sep 17 00:00:00 2001 From: shyamala-kotrayya-majjigudda Date: Thu, 30 Jul 2026 15:45:04 +0530 Subject: [PATCH 9/9] Remove python 3.9 --- .github/pull_request_template.md | 2 +- .github/workflows/run_tests.yml | 4 ++-- README.md | 2 +- hpeOneView/__init__.py | 10 ++-------- setup.py | 1 + tox.ini | 25 ++----------------------- 6 files changed, 9 insertions(+), 35 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7525cc960..c6c370a6a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,7 @@ ### Check List - [ ] New functionality includes testing. - - [ ] All tests pass for Python 3.9+ & 3.9+(`$ tox`). + - [ ] All tests pass for Python 3.12+ (`$ tox`). - [ ] New functionality has been documented in the README if applicable. - [ ] New functionality has been thoroughly documented in the examples (please include helpful comments). - [ ] New endpoints supported are updated in the endpoints-support.md file. diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 3ef915cbc..af90bd5ef 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -8,7 +8,7 @@ jobs: name: Run tox (${{ matrix.python_version }}) strategy: matrix: - python_version: [3.9, 3.12] + python_version: [3.12] runs-on: ubuntu-latest steps: @@ -44,7 +44,7 @@ jobs: coverage xml - name: Deploy to GitHub Pages - if: success() && matrix.python_version == '3.9' + if: success() && matrix.python_version == '3.12' uses: crazy-max/ghaction-github-pages@v2 with: target_branch: gh-pages diff --git a/README.md b/README.md index 110eed3b7..b3ee33bc1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The HPE OneView Python library provides a pure Python interface to the HPE OneVi For PQC-ready TLS negotiation, use an environment where Python is linked to a PQC-capable OpenSSL runtime. -- Minimum Python runtime: 3.9+ +- Minimum Python runtime: 3.12+ - Minimum OpenSSL runtime for PQC paths: 3.2+ with OQS provider, or 3.5+ with native PQC support - TLS requirement for PQC handshake: TLS 1.3 diff --git a/hpeOneView/__init__.py b/hpeOneView/__init__.py index 2b626c127..95c86f28c 100644 --- a/hpeOneView/__init__.py +++ b/hpeOneView/__init__.py @@ -39,15 +39,9 @@ import warnings PYTHON_VERSION = sys.version_info[:3] -PY2 = (PYTHON_VERSION[0] == 2) -if PY2: - if PYTHON_VERSION < (2, 7, 9): - warning_message = 'Running unsupported Python version: %s, unexpected errors might occur.' - warning_message += ' Use of Python v2.7.9+ is advised.' - warnings.warn(warning_message % '.'.join(map(str, PYTHON_VERSION)), Warning) -elif PYTHON_VERSION < (3, 9): +if PYTHON_VERSION < (3, 12): warning_message = 'Running unsupported Python version> %s, unexpected errors might occur.' - warning_message += ' Use of Python v3.9+ is advised.' + warning_message += ' Use of Python v3.12+ is advised.' warnings.warn(warning_message % '.'.join(map(str, PYTHON_VERSION)), Warning) from hpeOneView.connection import * diff --git a/setup.py b/setup.py index 0b361e1cc..2bfea4c9e 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ author_email='pdl-oneview-sdk@hpe.com', license='Apache', packages=find_packages(exclude=['examples*', 'tests*']), + python_requires='>=3.12', keywords=['oneview', 'hpe'], long_description_content_type="text/markdown", install_requires=['future>=0.15.2', 'docutils<0.18']) diff --git a/tox.ini b/tox.ini index 78ca8107b..77c87bf14 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ [tox] -envlist = docs, py39-coverage, py39-flake8, py312-coverage, py312-flake8 +envlist = docs, py312-coverage, py312-flake8 skip_missing_interpreters = true [flake8] @@ -23,19 +23,6 @@ deps = commands = {envpython} -m unittest discover -[testenv:py39-coverage] -basepython = - python3.9 -passenv = TRAVIS, TRAVIS_JOB_ID, TRAVIS_BRANCH -deps = - -r{toxinidir}/test_requirements.txt - coverage - coveralls -commands = - coverage erase - coverage run --source=hpeOneView -m unittest discover - - coveralls - [testenv:py312-coverage] basepython = python3.12 @@ -49,14 +36,6 @@ commands = coverage run --source=hpeOneView -m unittest discover - coveralls -[testenv:py39-flake8] -basepython = - python3.9 -deps = - flake8 -commands = - flake8 {posargs} hpeOneView/ tests/ examples/ - [testenv:py312-flake8] basepython = python3.12 @@ -66,7 +45,7 @@ commands = flake8 {posargs} hpeOneView/ tests/ examples/ [testenv:docs] -basepython=python3.9 +basepython=python3.12 deps= sphinx sphinx_rtd_theme