diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cb8eab5d6..90f7d3fd5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,11 +22,11 @@ jobs: sphinx: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox - name: Build docs @@ -37,11 +37,11 @@ jobs: twine-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox twine wheel - name: Check twine readme rendering diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0647754dc..01bee8a33 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,12 +22,12 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - - uses: actions/setup-python@v5.6.0 + - uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - run: pip install --upgrade tox - name: Run commitizen (https://commitizen-tools.github.io/commitizen/) run: tox -e cz diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 05e21065c..f6f1c6229 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -15,6 +15,6 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v5.0.1 + - uses: dessant/lock-threads@v6.0.0 with: process-only: 'issues' diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 4da71860a..4be228d66 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -29,10 +29,10 @@ jobs: pre_commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5.0.0 - - uses: actions/setup-python@v5.6.0 + - uses: actions/checkout@v6.0.1 + - uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - name: install tox run: pip install tox==3.26.0 - name: pre-commit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdf090887..ff04716dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,14 @@ jobs: id-token: write environment: pypi.org steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 with: fetch-depth: 0 token: ${{ secrets.RELEASE_GITHUB_TOKEN }} - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.3.1 + uses: python-semantic-release/python-semantic-release@v10.5.3 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.3.1 + uses: python-semantic-release/publish-action@v10.5.3 if: steps.release.outputs.released == 'true' with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0b6cbe5db..e4fd014a5 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,10 +3,12 @@ name: 'Close stale issues and PRs' on: schedule: - cron: '30 1 * * *' + workflow_dispatch: # For manual runs permissions: issues: write pull-requests: write + actions: write concurrency: group: lock @@ -15,7 +17,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v9.1.0 + - uses: actions/stale@v10.1.1 with: operations-per-run: 500 stale-issue-label: "stale" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8c32dd8d..eec3e1599 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,8 +26,6 @@ jobs: matrix: os: [ubuntu-latest] python: - - version: "3.9" - toxenv: py39,smoke - version: "3.10" toxenv: py310,smoke - version: "3.11" @@ -36,21 +34,21 @@ jobs: toxenv: py312,smoke - version: "3.13" toxenv: py313,smoke - - version: "3.14.0-alpha - 3.14" # SemVer's version range syntax + - version: "3.14" toxenv: py314,smoke include: - os: macos-latest python: - version: "3.13" - toxenv: py313,smoke + version: "3.14" + toxenv: py314,smoke - os: windows-latest python: - version: "3.13" - toxenv: py313,smoke + version: "3.14" + toxenv: py314,smoke steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python ${{ matrix.python.version }} - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.1.0 with: python-version: ${{ matrix.python.version }} - name: Install dependencies @@ -67,11 +65,11 @@ jobs: matrix: toxenv: [api_func_v4, cli_func_v4] steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox - name: Run tests @@ -79,7 +77,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} run: tox -- --override-ini='log_cli=True' - name: Upload codecov coverage - uses: codecov/codecov-action@v5.5.0 + uses: codecov/codecov-action@v5.5.2 with: files: ./coverage.xml flags: ${{ matrix.toxenv }} @@ -89,11 +87,11 @@ jobs: coverage: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox - name: Run tests @@ -102,7 +100,7 @@ jobs: TOXENV: cover run: tox - name: Upload codecov coverage - uses: codecov/codecov-action@v5.5.0 + uses: codecov/codecov-action@v5.5.2 with: files: ./coverage.xml flags: unit @@ -113,16 +111,16 @@ jobs: runs-on: ubuntu-latest name: Python wheel steps: - - uses: actions/checkout@v5.0.0 - - uses: actions/setup-python@v5.6.0 + - uses: actions/checkout@v6.0.1 + - uses: actions/setup-python@v6.1.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: | pip install -r requirements-test.txt - name: Build package run: python -m build -o dist/ - - uses: actions/upload-artifact@v4.6.2 + - uses: actions/upload-artifact@v5.0.0 with: name: dist path: dist @@ -131,12 +129,12 @@ jobs: runs-on: ubuntu-latest needs: [dist] steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.1.0 with: - python-version: '3.13' - - uses: actions/download-artifact@v5.0.0 + python-version: '3.14' + - uses: actions/download-artifact@v6.0.0 with: name: dist path: dist diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1094aa9a..8a396443b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: python:3.13 +image: python:3.14 stages: - build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf5dd8e24..41e732604 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,11 +3,11 @@ default_language_version: repos: - repo: https://github.com/psf/black - rev: 25.1.0 + rev: 25.12.0 hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.8.3 + rev: v4.10.1 hooks: - id: commitizen stages: [commit-msg] @@ -16,11 +16,11 @@ repos: hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 7.0.0 hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v3.3.8 + rev: v4.0.4 hooks: - id: pylint additional_dependencies: @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.1 + rev: v1.19.1 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.82.10 + rev: 42.64.0 hooks: - id: renovate-config-validator diff --git a/.readthedocs.yml b/.readthedocs.yml index 2d561b88b..facdbd3f9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.13" sphinx: configuration: docs/conf.py diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cf99cd4..de7c0d113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,205 @@ # CHANGELOG +All versions below are listed in reverse chronological order. + +## v7.0.0 (2025-10-29) + +### Features + +- Drop Python 3.9 support and add Python 3.14 + ([`22941ac`](https://github.com/python-gitlab/python-gitlab/commit/22941acc3f331d5b683599c014ec962ece5d4b76)) + +### Breaking Changes + +- As of python-gitlab 7.0.0, Python 3.9 is no longer supported. Python 3.10 or higher is required. + + +## v6.5.0 (2025-10-17) + +### Bug Fixes + +- **semantic-release**: Enable CHANGELOG.md generation + ([`fb9693b`](https://github.com/python-gitlab/python-gitlab/commit/fb9693bf1e6798149196e57fed87bf2588ad3b47)) + +### Continuous Integration + +- **stale**: Fix permission for stale action and allow manual run + ([`9357a37`](https://github.com/python-gitlab/python-gitlab/commit/9357a374702dcc8049a6d8af636f48c736d3f160)) + +### Documentation + +- **pull_mirror**: Fix incorrect start() method usage example + ([`2acac19`](https://github.com/python-gitlab/python-gitlab/commit/2acac19356c8624def90c7e54237b256bceece18)) + +### Features + +- **api**: Add content_ref and dry_run_ref parameters to ProjectCiLintManager + ([`e8d2538`](https://github.com/python-gitlab/python-gitlab/commit/e8d2538cdf85a7c57babbc00074efbdab97548cd)) + +- **users**: Implement 'skip_confirmation' in users 'emails' creation + ([`2981730`](https://github.com/python-gitlab/python-gitlab/commit/298173017be387f26aa0828cae1e9a48e3cce328)) + + +## v6.4.0 (2025-09-28) + +### Features + +- **users**: Implement missing arguments in users 'list' + ([`99923d4`](https://github.com/python-gitlab/python-gitlab/commit/99923d40dcb4f32f02bcbc5e8ef5ec4b77e3cb02)) + +- **users**: Sort 'user list' arguments against documentation + ([`99923d4`](https://github.com/python-gitlab/python-gitlab/commit/99923d40dcb4f32f02bcbc5e8ef5ec4b77e3cb02)) + + +## v6.3.0 (2025-08-28) + +### Features + +- Add sync method to force remote mirror updates + ([`f3c6678`](https://github.com/python-gitlab/python-gitlab/commit/f3c6678482b7ca35b1dd1e3bc49fc0c56cd03639)) + +- **api**: Add missing ProjectJob list filters + ([`5fe0e71`](https://github.com/python-gitlab/python-gitlab/commit/5fe0e715448b00a666f76cdce6db321686f6a271)) + +- **api**: Add missing ProjectPackageManager list filters + ([`b1696be`](https://github.com/python-gitlab/python-gitlab/commit/b1696be5fb223028755e303069e23e42a11cab42)) + +- **users**: Implement support for 'admins' in administrators 'list' + ([`aaed51c`](https://github.com/python-gitlab/python-gitlab/commit/aaed51cdec65c8acabe8b9a39fd18c7e1e48519c)) + + +## v6.2.0 (2025-07-28) + +### Build System + +- **release**: Use correct python-semantic-release/publish-action + ([`2f20634`](https://github.com/python-gitlab/python-gitlab/commit/2f20634b9700bc802177278ffdd7bdf83ef1605a)) + +### Continuous Integration + +- **stale**: Improve formatting of stale message + ([`0ef20d1`](https://github.com/python-gitlab/python-gitlab/commit/0ef20d1b0ee6cd82c4e34003aca4c0c72935f4d9)) + +- **stale**: Increase `operations-per-run` to 500 + ([`326e1a4`](https://github.com/python-gitlab/python-gitlab/commit/326e1a46881467f41dc3de5f060ac654924fbe40)) + +### Features + +- **api**: Add ListMixin to ProjectIssueDiscussionNoteManager + ([`f908f0e`](https://github.com/python-gitlab/python-gitlab/commit/f908f0e82840a5df374e8fbfb1298608d23f02bd)) + +- **api**: Add ListMixin to ProjectMergeRequestDiscussionNoteManager + ([`865339a`](https://github.com/python-gitlab/python-gitlab/commit/865339ac037fb125280180b05a2c4e44067dc5e9)) + + +## v6.1.0 (2025-06-28) + +### Chores + +- Update to mypy 1.16.0 and resolve issues found + ([`f734c58`](https://github.com/python-gitlab/python-gitlab/commit/f734c586e3fe5a0e866bcf60030107ca142fa763)) + +### Documentation + +- Update CONTRIBUTING.rst with policy on issue management + ([`45dda50`](https://github.com/python-gitlab/python-gitlab/commit/45dda50ff4c0e01307480befa86498600563f818)) + +### Features + +- **api**: Add listing user contributed projects + ([`98c1307`](https://github.com/python-gitlab/python-gitlab/commit/98c13074127ae46d85545498746d55c8b75aef48)) + +- **api**: Add support for project tag list filters + ([`378a836`](https://github.com/python-gitlab/python-gitlab/commit/378a836bf5744ca6c9409dd60899e5d2f90b55be)) + +- **api**: Pipeline inputs support + ([#3194](https://github.com/python-gitlab/python-gitlab/pull/3194), + [`306c4b1`](https://github.com/python-gitlab/python-gitlab/commit/306c4b1931e2b03d7cbcef5773668e876d5644b1)) + +- **const**: Add PLANNER_ACCESS constant + ([`ba6f174`](https://github.com/python-gitlab/python-gitlab/commit/ba6f174896f908ba711e1e3e8ebf4692c86bd3d4)) + +- **groups**: Add protectedbranches to group class + ([#3164](https://github.com/python-gitlab/python-gitlab/pull/3164), + [`bfd31a8`](https://github.com/python-gitlab/python-gitlab/commit/bfd31a867547dffb2c2d54127e184fefa058cb30)) + + +## v6.0.0 (2025-06-04) + +### Chores + +- Add reformat code commit to .git-blame-ignore-revs + ([`a6ac939`](https://github.com/python-gitlab/python-gitlab/commit/a6ac9392b0e543df32adf9058f9808d199149982)) + +- Reformat code with skip_magic_trailing_comma = true + ([`2100aa4`](https://github.com/python-gitlab/python-gitlab/commit/2100aa458ba4f1c084bc97b00f7ba1693541d68a)) + +- Remove trivial get methods in preparation for generic Get mixin + ([`edd01a5`](https://github.com/python-gitlab/python-gitlab/commit/edd01a57aa8c45e6514e618263003beaa0fb68e8)) + +- Upgrade to sphinx 8.2.1 and resolve issues + ([`d0b5ae3`](https://github.com/python-gitlab/python-gitlab/commit/d0b5ae36bd0bc06f1f338adbd93d76a83a0fa459)) + +- **ci**: Replace docs artifact with readthedocs previews + ([`193c5de`](https://github.com/python-gitlab/python-gitlab/commit/193c5de9b443193da3f87d664a777f056d920146)) + +### Documentation + +- Use get_all keyword arg instead of all in docstrings + ([`f62dda7`](https://github.com/python-gitlab/python-gitlab/commit/f62dda7fa44e3bc46f03bd6402eba3f641f365eb)) + +- Use list(get_all=True) in documentation examples + ([`f36614f`](https://github.com/python-gitlab/python-gitlab/commit/f36614f1ce5a873ed1bbb8618ced39fa80f13ee6)) + +- **api-usage**: Fix GitLab API links to the publicly accessible URLs + ([`f55fa15`](https://github.com/python-gitlab/python-gitlab/commit/f55fa152cdccc0dd4815f17df9ff80628115667d)) + +- **api-usage-graphql**: Fix the example graphql query string + ([`8dbdd7e`](https://github.com/python-gitlab/python-gitlab/commit/8dbdd7e75447d01a457ac55f18066ebd355e4dbf)) + +- **job_token_scope**: Fix typo/inconsistency + ([`203bd92`](https://github.com/python-gitlab/python-gitlab/commit/203bd92e524845a3e1287439d78c167133347a69)) + +### Features + +- Adds member role methods + ([`055557e`](https://github.com/python-gitlab/python-gitlab/commit/055557efe9de9d4ab7b8237f7de7e033a6b02cd9)) + +- **api**: Add iteration_id as boards create attribute + ([#3191](https://github.com/python-gitlab/python-gitlab/pull/3191), + [`938b0d9`](https://github.com/python-gitlab/python-gitlab/commit/938b0d9c188bcffc6759184325bf292131307556)) + +- **api**: Add support for adding instance deploy keys + ([`22be96c`](https://github.com/python-gitlab/python-gitlab/commit/22be96cbe698f5d8b18be388edf9b01d6008d1dd)) + +- **api**: Add support for avatar removal + ([`5edd2e6`](https://github.com/python-gitlab/python-gitlab/commit/5edd2e66cd5d4cd48fcf5f996d4ad4c3d495b3fa)) + +- **api**: Add support for token self-rotation + ([`da40e09`](https://github.com/python-gitlab/python-gitlab/commit/da40e09498277467878b810aa44f86b48813d832)) + +- **api**: ListMixin.list typing overload + ([`6eee494`](https://github.com/python-gitlab/python-gitlab/commit/6eee494749ccc5387a0d3af7ce331cfb1e95308b)) + +- **api**: Make RESTManager generic on RESTObject class + ([`91c4f18`](https://github.com/python-gitlab/python-gitlab/commit/91c4f18dc49a7eed101ce5f004f396436c6ef7eb)) + +- **api**: Make RESTObjectList typing generic + ([`befba35`](https://github.com/python-gitlab/python-gitlab/commit/befba35a16c5543c5f270996a9bf7a4277482915)) + +- **settings**: Implement support for 'silent_mode_enabled' + ([`a9163a9`](https://github.com/python-gitlab/python-gitlab/commit/a9163a9775b3f9a7b729048fab83bb0bca7228b5)) + +### Refactoring + +- Use more python3.9 syntax + ([`4e90c11`](https://github.com/python-gitlab/python-gitlab/commit/4e90c113f1af768b8b049f4a64c5978a1bfbf323)) + +### Testing + +- **functional**: Switch to new runner registration API + ([`cbc613d`](https://github.com/python-gitlab/python-gitlab/commit/cbc613d0f2ccd8ec021bf789b337104489a3e5f1)) + ## v5.6.0 (2025-01-28) diff --git a/README.rst b/README.rst index 101add1eb..1b7b7ce48 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,7 @@ Features Installation ------------ -As of 5.0.0, ``python-gitlab`` is compatible with Python 3.9+. +As of 7.0.0, ``python-gitlab`` is compatible with Python 3.10+. Use ``pip`` to install the latest stable version of ``python-gitlab``: diff --git a/docs/gl_objects/ci_lint.rst b/docs/gl_objects/ci_lint.rst index b44b09486..69a403eac 100644 --- a/docs/gl_objects/ci_lint.rst +++ b/docs/gl_objects/ci_lint.rst @@ -46,6 +46,18 @@ Lint a project's CI configuration:: assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid print(lint_result.merged_yaml) # Print the merged YAML file +Lint a project's CI configuration from a specific branch or tag:: + + lint_result = project.ci_lint.get(content_ref="main") + assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid + print(lint_result.merged_yaml) # Print the merged YAML file + +Lint a project's CI configuration with dry run simulation:: + + lint_result = project.ci_lint.get(dry_run=True, dry_run_ref="develop") + assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid + print(lint_result.merged_yaml) # Print the merged YAML file + Lint a CI YAML configuration with a namespace:: lint_result = project.ci_lint.create({"content": gitlab_ci_yml}) diff --git a/docs/gl_objects/pull_mirror.rst b/docs/gl_objects/pull_mirror.rst index bc83ba36d..19e8a1946 100644 --- a/docs/gl_objects/pull_mirror.rst +++ b/docs/gl_objects/pull_mirror.rst @@ -33,6 +33,6 @@ Update an existing remote mirror's attributes:: mirror.only_protected_branches = True mirror.save() -Start an sync of the pull mirror:: +Start a sync of the pull mirror:: - mirror.start() + project.pull_mirror.start() diff --git a/gitlab/_version.py b/gitlab/_version.py index c9434cd63..e7817062d 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.3.0" +__version__ = "7.0.0" diff --git a/gitlab/utils.py b/gitlab/utils.py index bf37e09a5..cf1b5b7b0 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -133,7 +133,7 @@ def handle_retry_on_status( if "Retry-After" in headers: wait_time = int(headers["Retry-After"]) elif "RateLimit-Reset" in headers: - wait_time = int(headers["RateLimit-Reset"]) - time.time() + wait_time = max(0, int(headers["RateLimit-Reset"]) - time.time()) self.cur_retries += 1 time.sleep(wait_time) return True diff --git a/gitlab/v4/objects/ci_lint.py b/gitlab/v4/objects/ci_lint.py index 01d38373d..9bbe9f7e4 100644 --- a/gitlab/v4/objects/ci_lint.py +++ b/gitlab/v4/objects/ci_lint.py @@ -51,7 +51,14 @@ class ProjectCiLintManager( _path = "/projects/{project_id}/ci/lint" _obj_cls = ProjectCiLint _from_parent_attrs = {"project_id": "id"} - _optional_get_attrs = ("dry_run", "include_jobs", "ref") + _optional_get_attrs = ( + "content_ref", + "dry_run", + "dry_run_ref", + "include_jobs", + "ref", + ) + _create_attrs = RequiredOptional( required=("content",), optional=("dry_run", "include_jobs", "ref") ) diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py index 2c2393eba..be0e36529 100644 --- a/gitlab/v4/objects/users.py +++ b/gitlab/v4/objects/users.py @@ -400,17 +400,29 @@ class UserManager(CRUDMixin[User]): _obj_cls = User _list_filters = ( + "username", + "public_email", + "search", "active", + "external", "blocked", - "username", + "humans", + "created_after", + "created_before", + "exclude_active", + "exclude_external", + "exclude_humans", + "exclude_internal", + "without_project_bots", "extern_uid", "provider", - "external", - "search", - "custom_attributes", - "status", "two_factor", + "without_projects", "admins", + "auditors", + "skip_ldap", + "custom_attributes", + "status", ) _create_attrs = RequiredOptional( optional=( @@ -490,7 +502,9 @@ class UserEmailManager( _path = "/users/{user_id}/emails" _obj_cls = UserEmail _from_parent_attrs = {"user_id": "id"} - _create_attrs = RequiredOptional(required=("email",)) + _create_attrs = RequiredOptional( + required=("email",), optional=("skip_confirmation",) + ) class UserActivities(RESTObject): diff --git a/pyproject.toml b/pyproject.toml index 5104c2b16..7b8510b94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ maintainers = [ {name = "Nejc Habjan", email="nejc.habjan@siemens.com"}, {name = "Roger Meier", email="r.meier@siemens.com"} ] -requires-python = ">=3.9.0" +requires-python = ">=3.10.0" dependencies = [ "requests>=2.32.0", "requests-toolbelt>=1.0.0", @@ -30,11 +30,11 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] keywords = ["api", "client", "gitlab", "python", "python-gitlab", "wrapper"] license = {text = "LGPL-3.0-or-later"} @@ -101,6 +101,13 @@ version_variables = [ ] commit_message = "chore: release v{version}" +[tool.semantic_release.changelog] +exclude_commit_patterns = [ + '''chore\(deps\): .+''', # Exclude dependency updates from the changelog +] +mode = "update" +insertion_flag = "All versions below are listed in reverse chronological order." + [tool.pylint.messages_control] max-line-length = 88 jobs = 0 # Use auto-detected number of multiple processes to speed up Pylint. diff --git a/requirements-docker.txt b/requirements-docker.txt index 532609b3f..123a4438a 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -1,3 +1,3 @@ -r requirements.txt -r requirements-test.txt -pytest-docker==3.2.3 +pytest-docker==3.2.5 diff --git a/requirements-docs.txt b/requirements-docs.txt index 39f5f61e2..b83ef6dac 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,7 +1,7 @@ -r requirements.txt -furo==2025.7.19 +furo==2025.9.25 jinja2==3.1.6 myst-parser==4.0.1 sphinx==8.2.3 sphinxcontrib-autoprogram==0.1.9 -sphinx-autobuild==2024.10.3 +sphinx-autobuild==2025.8.25 diff --git a/requirements-lint.txt b/requirements-lint.txt index 6d326d8bd..31ec607b9 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,14 +1,14 @@ -r requirements.txt argcomplete==2.0.0 -black==25.1.0 -commitizen==4.8.3 +black==25.12.0 +commitizen==4.10.1 flake8==7.3.0 -isort==6.0.1 -mypy==1.17.1 -pylint==3.3.8 -pytest==8.4.1 +isort==7.0.0 +mypy==1.19.1 +pylint==4.0.4 +pytest==9.0.2 responses==0.25.8 respx==0.22.0 -types-PyYAML==6.0.12.20250822 -types-requests==2.32.4.20250809 +types-PyYAML==6.0.12.20250915 +types-requests==2.32.4.20250913 types-setuptools==80.9.0.20250822 diff --git a/requirements-precommit.txt b/requirements-precommit.txt index 3ee862221..fc2379223 100644 --- a/requirements-precommit.txt +++ b/requirements-precommit.txt @@ -1 +1 @@ -pre-commit==4.3.0 +pre-commit==4.5.1 diff --git a/requirements-test.txt b/requirements-test.txt index 36e60a2bb..b06434452 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,13 +1,13 @@ -r requirements.txt -anyio==4.10.0 +anyio==4.12.0 build==1.3.0 -coverage==7.10.5 +coverage==7.13.0 pytest-console-scripts==1.4.1 -pytest-cov==6.2.1 +pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 -pytest==8.4.1 -PyYaml==6.0.2 +pytest==9.0.2 +PyYaml==6.0.3 responses==0.25.8 respx==0.22.0 -trio==0.30.0 +trio==0.32.0 wheel==0.45.1 diff --git a/tox.ini b/tox.ini index 05a15c6c4..0ba295692 100644 --- a/tox.ini +++ b/tox.ini @@ -2,14 +2,14 @@ minversion = 4.0 skipsdist = True skip_missing_interpreters = True -envlist = py313,py312,py311,py310,py39,black,isort,flake8,mypy,twine-check,cz,pylint +envlist = py314,py313,py312,py311,py310,black,isort,flake8,mypy,twine-check,cz,pylint # NOTE(jlvillal): To use a label use the `-m` flag. # For example to run the `func` label group of environments do: # tox -m func labels = lint = black,isort,flake8,mypy,pylint,cz - unit = py313,py312,py311,py310,py39,py38 + unit = py314,py313,py312,py311,py310 # func is the functional tests. This is very time consuming. func = cli_func_v4,api_func_v4