From 268f866c88070bb2416eb71412e1889c7e9a4ef7 Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Fri, 17 Nov 2023 22:56:58 +0100 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20deprecated=20python=203.7?= =?UTF-8?q?=20(#9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: ๐ŸŽก deprecated python 3.7 BREAKING CHANGE: ๐Ÿงจ python3.7 no longer supported * ci: ๐ŸŽก adjust pip requirements * chore: ๐Ÿค– update readme version * ci: ๐ŸŽก update npm packages --------- Signed-off-by: Daniel Dias --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/pytest.yml | 2 +- .github/workflows/python3.7.yml | 15 -------- .github/workflows/windows.yml | 2 +- Pipfile | 2 +- README.md | 7 ++-- package-lock.json | 48 ++++++++++++++----------- requirements-dev.txt | 64 ++++++++++++++++----------------- requirements.txt | 16 ++++----- serverless.yml | 2 +- 11 files changed, 77 insertions(+), 85 deletions(-) delete mode 100644 .github/workflows/python3.7.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2bd942e..5d1b8a3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,4 +12,4 @@ jobs: uses: ./.github/workflows/pytest.yml with: os: "ubuntu-latest" - python-version: "3.9" + python-version: "3.10" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6da33ba..033b559 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -9,4 +9,4 @@ jobs: uses: ./.github/workflows/pytest.yml with: os: "macos-latest" - python-version: "3.9" + python-version: "3.10" diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9371546..1694ce5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -10,7 +10,7 @@ on: type: string python-version: description: "Python version passed from the caller workflow" - default: "3.9" + default: "3.10" required: false type: string diff --git a/.github/workflows/python3.7.yml b/.github/workflows/python3.7.yml deleted file mode 100644 index 7f64d17..0000000 --- a/.github/workflows/python3.7.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: python3.7 - -on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - -jobs: - call-workflow: - uses: ./.github/workflows/pytest.yml - with: - os: "ubuntu-latest" - python-version: "3.7" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 77ad5cb..8d7dd21 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,4 +12,4 @@ jobs: uses: ./.github/workflows/pytest.yml with: os: "windows-latest" - python-version: "3.9" + python-version: "3.10" diff --git a/Pipfile b/Pipfile index 81d7fec..adccf68 100644 --- a/Pipfile +++ b/Pipfile @@ -19,4 +19,4 @@ coverage-badge = "*" py4j = "*" [requires] -python_version = ">=3.7" +python_version = ">=3.8" diff --git a/README.md b/README.md index f1818c4..37ada42 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,14 @@ [![macOs](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/macos.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/macos.yml) [![Windows](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/windows.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/windows.yml) -![Python <=3.6](https://img.shields.io/badge/python-<=3.6-red.svg) +![Python <=3.7](https://img.shields.io/badge/python-<=3.7-red.svg) -[![Python 3.7](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.7.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.7.yml) [![Python 3.8](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.8.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.8.yml) [![Python 3.9](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.9.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.9.yml) [![Python 3.10](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.10.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.10.yml) [![Python 3.11](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.11.yml/badge.svg)](https://github.com/DanielRDias/ldap-password-rotation/actions/workflows/python3.11.yml) -![Python >=3.12](https://img.shields.io/badge/python->=3.12-greenyellow.svg) +![Python >=3.12](https://img.shields.io/badge/python->=3.12-yellow.svg) The LDAP Password Rotation Service offers a lambda function that integrates with AWS Secrets Manager and can update the user password to a new random password and update it in AWS Secrets Manager. @@ -21,7 +20,7 @@ The AWS Lambda Function expects to receive a key/value (JSON) secret from AWS Se ## Quick Start -You'll need to have [Python (>=3.7)](https://www.python.org/) with [pipenv](https://github.com/pypa/pipenv), [NodeJS (>=16)](https://nodejs.org/) with [npm (>=8)](https://www.npmjs.com/) installed, and [AWS CLI](https://aws.amazon.com/cli/). +You'll need to have [Python (>=3.8)](https://www.python.org/) with [pipenv](https://github.com/pypa/pipenv), [NodeJS (>=16)](https://nodejs.org/) with [npm (>=8)](https://www.npmjs.com/) installed, and [AWS CLI](https://aws.amazon.com/cli/). Optional: [Make](https://www.gnu.org/software/make/) diff --git a/package-lock.json b/package-lock.json index 68a6a58..4c09930 100644 --- a/package-lock.json +++ b/package-lock.json @@ -150,14 +150,14 @@ } }, "node_modules/@serverless/platform-client": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@serverless/platform-client/-/platform-client-4.3.2.tgz", - "integrity": "sha512-DAa5Z0JAZc6UfrTZLYwqoZxgAponZpFwaqd7WzzMA+loMCkYWyJNwxrAmV6cr2UUJpkko4toPZuJ3vM9Ie+NDA==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@serverless/platform-client/-/platform-client-4.5.1.tgz", + "integrity": "sha512-XltmO/029X76zi0LUFmhsnanhE2wnqH1xf+WBt5K8gumQA9LnrfwLgPxj+VA+mm6wQhy+PCp7H5SS0ZPu7F2Cw==", "dev": true, "dependencies": { "adm-zip": "^0.5.5", "archiver": "^5.3.0", - "axios": "^0.21.1", + "axios": "^1.6.2", "fast-glob": "^3.2.7", "https-proxy-agent": "^5.0.0", "ignore": "^5.1.8", @@ -634,12 +634,14 @@ } }, "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/balanced-match": { @@ -1218,9 +1220,9 @@ } }, "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -1945,9 +1947,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -2958,9 +2960,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -3527,6 +3529,12 @@ "node": ">= 0.8.0" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3841,9 +3849,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" diff --git a/requirements-dev.txt b/requirements-dev.txt index 55c219a..812de41 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,46 +1,46 @@ -i https://pypi.org/simple -attrs==23.1.0 ; python_version >= '3.6' +attrs==22.2.0; python_version >= '3.6' black==22.12.0 boto3==1.26.55 -botocore==1.29.161 ; python_version >= '3.7' -certifi==2023.7.22 ; python_version >= '3.6' +botocore==1.29.55; python_version >= '3.7' +certifi==2022.12.7; python_version >= '3.6' cffi==1.15.1 -charset-normalizer==3.3.0 -click==8.1.3 ; python_version >= '3.7' -coverage==7.2.7 ; python_version >= '3.7' +charset-normalizer==3.0.1 +click==8.1.3; python_version >= '3.7' +coverage==7.0.5; python_version >= '3.7' coverage-badge==1.1.0 -cryptography==41.0.4 ; python_version >= '3.6' +cryptography==39.0.0; python_version >= '3.6' docker==6.0.1 -exceptiongroup==1.1.0 ; python_version < '3.11' -idna==3.4 ; python_version >= '3.5' -iniconfig==2.0.0 ; python_version >= '3.7' -jinja2==3.1.2 ; python_version >= '3.7' -jmespath==1.0.1 ; python_version >= '3.7' -markupsafe==2.1.3 ; python_version >= '3.7' +exceptiongroup==1.1.0; python_version < '3.11' +idna==3.4; python_version >= '3.5' +iniconfig==2.0.0; python_version >= '3.7' +jinja2==3.1.2; python_version >= '3.7' +jmespath==1.0.1; python_version >= '3.7' +markupsafe==2.1.2; python_version >= '3.7' mock==5.0.1 moto==4.1.0 -mypy-extensions==1.0.0 -packaging==23.2 ; python_version >= '3.7' -pathspec==0.11.1 ; python_version >= '3.7' -platformdirs==3.5.1 ; python_version >= '3.7' -pluggy==1.0.0 ; python_version >= '3.6' +mypy-extensions==0.4.3 +packaging==23.0; python_version >= '3.7' +pathspec==0.10.3; python_version >= '3.7' +platformdirs==2.6.2; python_version >= '3.7' +pluggy==1.0.0; python_version >= '3.6' py4j==0.10.9.7 pycparser==2.21 pytest==7.2.1 pytest-cov==4.0.0 -python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -requests==2.28.2 ; python_version >= '3.7' and python_version < '4' -responses==0.23.1 ; python_version >= '3.7' -s3transfer==0.6.1 ; python_version >= '3.7' -six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -toml==0.10.2 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' -tomli==2.0.1 ; python_full_version < '3.11.0a7' -types-toml==0.10.8.7 -typing-extensions==4.5.0 ; python_version < '3.10' -urllib3==1.26.18 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' +python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +requests==2.28.2; python_version >= '3.7' and python_version < '4' +responses==0.22.0; python_version >= '3.7' +s3transfer==0.6.0; python_version >= '3.7' +six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' +tomli==2.0.1; python_full_version < '3.11.0a7' +types-toml==0.10.8.1 +typing-extensions==4.4.0; python_version < '3.10' +urllib3==1.26.14; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' uuid==1.30 -websocket-client==1.6.1 ; python_version >= '3.7' -werkzeug==2.2.3 ; python_version >= '3.7' -xmltodict==0.13.0 ; python_version >= '3.4' +websocket-client==1.4.2; python_version >= '3.7' +werkzeug==2.2.2; python_version >= '3.7' +xmltodict==0.13.0; python_version >= '3.4' ldap3==2.9.1 -pyasn1==0.5.0 +pyasn1==0.4.8 diff --git a/requirements.txt b/requirements.txt index 43e394d..673f45a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -i https://pypi.org/simple -boto3==1.26.54 -botocore==1.29.161 ; python_version >= '3.7' -jmespath==1.0.1 ; python_version >= '3.7' +boto3==1.26.55 +botocore==1.29.55; python_version >= '3.7' +jmespath==1.0.1; python_version >= '3.7' ldap3==2.9.1 -pyasn1==0.5.0 -python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -s3transfer==0.6.1 ; python_version >= '3.7' -six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -urllib3==1.26.18 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' +pyasn1==0.4.8 +python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +s3transfer==0.6.0; python_version >= '3.7' +six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +urllib3==1.26.14; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' diff --git a/serverless.yml b/serverless.yml index 520d29d..f2f3228 100644 --- a/serverless.yml +++ b/serverless.yml @@ -68,9 +68,9 @@ layers: ldappw: path: layer compatibleRuntimes: - - python3.7 - python3.8 - python3.9 + - python3.10 compatibleArchitectures: - x86_64 - arm64