From 53824b1ba8f753ea1278ff494ddebaee843d4056 Mon Sep 17 00:00:00 2001 From: ValentinFrancois <24223132+ValentinFrancois@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:45:13 +0200 Subject: [PATCH 1/3] Fix outdated GitHub workflows Applied recommandations from https://rhysd.github.io/actionlint/ --- .github/workflows/_code_checks.yml | 10 +++++----- .github/workflows/check_pr_code.yml | 6 +++--- .github/workflows/release.yml | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/_code_checks.yml b/.github/workflows/_code_checks.yml index 8237d3b..9bced40 100644 --- a/.github/workflows/_code_checks.yml +++ b/.github/workflows/_code_checks.yml @@ -21,17 +21,17 @@ jobs: steps: - name: checkout current commit - uses: actions/checkout@v2 + uses: actions/checkout@v4 if: ${{ inputs.ref == 'default' }} - name: checkout main - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} if: ${{ inputs.ref != 'default' }} - name: install python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -48,9 +48,9 @@ jobs: run: make test - name: codeql_init - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: 'python' - name: codeql_analyze - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/check_pr_code.yml b/.github/workflows/check_pr_code.yml index f47d128..7c9617c 100644 --- a/.github/workflows/check_pr_code.yml +++ b/.github/workflows/check_pr_code.yml @@ -14,7 +14,7 @@ jobs: n_commits: ${{ steps.count_commits.outputs.n_commits }} steps: - name: checkout current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -23,7 +23,7 @@ jobs: run: | git fetch N_COMMITS=$(git rev-list origin/main.. --count) - echo "::set-output name=n_commits::${N_COMMITS}" + echo "n_commits=${N_COMMITS}" >> $GITHUB_OUTPUT add_empty_commit_if_only_one: needs: count_commits @@ -33,7 +33,7 @@ jobs: steps: - name: checkout current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce077a5..2759bc3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,10 +19,10 @@ jobs: startsWith(github.event.head_commit.message, '[PATCH]') steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.8' @@ -71,7 +71,7 @@ jobs: steps: - name: Checkout main - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: main fetch-depth: 0 # fetches entire history for all branches and tags @@ -99,12 +99,12 @@ jobs: steps: - name: Checkout main - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: main - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.8' From ff9a502b8d1fa7c452c1415d1995a6ef535fa173 Mon Sep 17 00:00:00 2001 From: ValentinFrancois <24223132+ValentinFrancois@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:53:06 +0200 Subject: [PATCH 2/3] Upadte list of tested python versions ; set minimal python version to 3.8 --- .github/workflows/_code_checks.yml | 2 +- README.md | 2 +- setup.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_code_checks.yml b/.github/workflows/_code_checks.yml index 9bced40..33f1d4c 100644 --- a/.github/workflows/_code_checks.yml +++ b/.github/workflows/_code_checks.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] name: Check Python${{ matrix.python-version }} diff --git a/README.md b/README.md index fd90cea..b7d4838 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ a thumb up: https://gitlab.com/gitlab-org/gitlab/-/issues/352836 --- ## Requirements -- Python >= __3.7__ (required by `python-gitlab` since version `3.0.0`) +- Python >= __3.8__ (`python-gitlab` requires python>=3.9 since version `5.0.0`) ## Dependencies - [python-gitlab](https://github.com/python-gitlab/python-gitlab) diff --git a/setup.py b/setup.py index a894ce2..203182a 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ maintainer='Valentin François', url='https://github.com/ValentinFrancois/python-gitlab-submodule', packages=['gitlab_submodule'], + python_requires='>=3.8.0', install_requires=[ 'python-gitlab>=3.0.0', 'giturlparse>=0.10.0' From e80cad735d50dab09d1a7ff35f7c79476a25d400 Mon Sep 17 00:00:00 2001 From: ValentinFrancois <24223132+ValentinFrancois@users.noreply.github.com> Date: Sat, 28 Jun 2025 18:02:32 +0200 Subject: [PATCH 3/3] Update check for python version in `make test` --- Makefile | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f2dc4ba..ca4a788 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ lint: test: PYTHON_VERSION=$$(python3 --version) && \ - if echo "$${PYTHON_VERSION}" | grep -q "3.10"; \ + if echo "$${PYTHON_VERSION}" | grep -E -q "3\.[0-9]{2,}"; \ then python3 -m pytest tests; \ else nosetests -v --with-coverage --cover-package=$(PROJECT) tests; \ fi diff --git a/requirements.txt b/requirements.txt index 377c65c..ee1de34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -python-gitlab==3.1.0 -giturlparse==0.10.0 \ No newline at end of file +python-gitlab>=3.1.0 +giturlparse>=0.10.0 \ No newline at end of file