Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency python-gitlab to v5 #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 4, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
python-gitlab (changelog) ==4.13.0 -> ==5.6.0 age adoption passing confidence

Release Notes

python-gitlab/python-gitlab (python-gitlab)

v5.6.0

Compare Source

Features
  • group: Add support for group level MR approval rules
    (304bdd0)

v5.5.0

Compare Source

Chores
  • Add deprecation warning for mirror_pull functions
    (7f6fd5c)

  • Relax typing constraints for response action
    (f430078)

  • tests: Catch deprecation warnings
    (0c1af08)

Documentation
  • Add usage of pull mirror
    (9b374b2)

  • Remove old pull mirror implementation
    (9e18672)

Features
  • functional: Add pull mirror test
    (3b31ade)

  • projects: Add pull mirror class
    (2411bff)

  • unit: Add pull mirror tests
    (5c11203)

v5.4.0

Compare Source

Bug Fixes
  • api: Make type ignores more specific where possible
    (e3cb806)

Instead of using absolute ignore # type: ignore use a more specific ignores like # type: ignore[override]. This might help in the future where a new bug might be introduced and get
ignored by a general ignore comment but not a more specific one.

Signed-off-by: Igor Ponomarev [email protected]

  • api: Return the new commit when calling cherry_pick
    (de29503)

  • files: Add optional ref parameter for cli project-file raw (#​3032)
    (22f03bd)

The ef parameter was removed in python-gitlab v4.8.0. This will add ef back as an optional parameter
for the project-file raw cli command.

Chores
  • Fix missing space in deprecation message
    (ba75c31)

  • Fix pytest deprecation
    (95db680)

pytest has changed the function argument name to start_path

  • Fix warning being generated
    (0eb5eb0)

The CI shows a warning. Use get_all=False to resolve issue.

  • Resolve DeprecationWarning message in CI run
    (accd5aa)

Catch the DeprecationWarning in our test, as we expect it.

  • ci: Set a 30 minute timeout for 'functional' tests
    (e8d6953)

Currently the functional API test takes around 17 minutes to run. And the functional CLI test takes
around 12 minutes to run.

Occasionally a job gets stuck and will sit until the default 360 minutes job timeout occurs.

Now have a 30 minute timeout for the 'functional' tests.

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • deps: Update gitlab/gitlab-ee docker tag to v17.7.1-ee.0
    (#​3082,
    1e95944)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • deps: Update mypy to 1.14 and resolve issues
    (671e711)

mypy 1.14 has a change to Enum Membership Semantics:
https://mypy.readthedocs.io/en/latest/changelog.html

Resolve the issues with Enum and typing, and update mypy to 1.14

  • test: Prevent 'job_with_artifact' fixture running forever
    (e4673d8)

Previously the 'job_with_artifact' fixture could run forever. Now give it up to 60 seconds to
complete before failing.

Continuous Integration
  • Use gitlab-runner:v17.7.1 for the CI
    (2dda9dc)

The latest gitlab-runner image does not have the gitlab-runner user and it causes our tests to
fail.

Closes: #​3091

Features
  • api: Add argument that appends extra HTTP headers to a request
    (fb07b5c)

Currently the only way to manipulate the headers for a request is to use Gitlab.headers attribute.
However, this makes it very concurrently unsafe because the Gitlab object can be shared between
multiple requests at the same time.

Instead add a new keyword argument extra_headers which will update the headers dictionary with new
values just before the request is sent.

For example, this can be used to download a part of a artifacts file using the Range header:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests

Signed-off-by: Igor Ponomarev [email protected]

  • api: Add support for external status check
    (175b355)

  • api: Narrow down return type of download methods using typing.overload
    (44fd9dc)

Currently the download methods such as ProjectJob.artifacts have return type set to
Optional[Union[bytes, Iterator[Any]]] which means they return either None or bytes or
Iterator[Any].

However, the actual return type is determined by the passed streamed and iterator arguments.
Using @typing.overload decorator it is possible to return a single type based on the passed
arguments.

Add overloads in the following order to all download methods:

  1. If streamed=False and iterator=False return bytes. This is the default argument values
    therefore it should be first as it will be used to lookup default arguments. 2. If iterator=True
    return Iterator[Any]. This can be combined with both streamed=True and streamed=False. 3. If
    streamed=True and iterator=False return None. In this case action argument can be set to a
    callable that accepts bytes.

Signed-off-by: Igor Ponomarev [email protected]

  • api: Narrow down return type of ProjectFileManager.raw using typing.overload
    (36d9b24)

This is equivalent to the changes in 44fd9dc but for
ProjectFileManager.raw method that I must have missed in the original commit.

Signed-off-by: Igor Ponomarev [email protected]

v5.3.1

Compare Source

Bug Fixes
  • api: Allow configuration of keep_base_url from file
    (f4f7d7a)

  • registry-protection: Fix api url
    (8c1aaa3)

See:
https://docs.gitlab.com/ee/api/container_repository_protection_rules.html#list-container-repository-protection-rules

Chores
  • Bump to 5.3.1
    (912e1a0)

  • deps: Update dependency jinja2 to v3.1.5 [security]
    (01d4194)

v5.3.0

Compare Source

Chores
  • deps: Update gitlab/gitlab-ee docker tag to v17.7.0-ee.0
    (#​3070,
    62b7eb7)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • renovate: Update httpx and respx again
    (aa07449)
Features
  • api: Support the new registry protection rule endpoint
    (40af1c8)

v5.2.0

Compare Source

Chores
  • deps: Update all non-major dependencies
    (1e02f23)

  • deps: Update all non-major dependencies
    (6532e8c)

  • deps: Update all non-major dependencies
    (8046387)

  • deps: Update codecov/codecov-action action to v5
    (735efff)

  • deps: Update dependency commitizen to v4
    (9306362)

  • deps: Update gitlab/gitlab-ee docker tag to v17.6.1-ee.0
    (#​3053,
    f2992ae)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • deps: Update gitlab/gitlab-ee docker tag to v17.6.2-ee.0
    (#​3065,
    db0db26)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • deps: Update pre-commit hook commitizen-tools/commitizen to v4
    (a8518f1)

  • docs: Fix CHANGELOG tracebacks codeblocks
    (9fe372a)

With v5.1.0 CHANGELOG.md was updated that mangled v1.10.0 triple backtick codeblock Traceback output
that made sphinx fail [1] with a non-zero return code.

The resulting docs appears to be processes as text after the failing line [2]. While reviewing other
backtick codeblocks fix v1.8.0 [3] to the original traceback.

[1]
https://github.com/python-gitlab/python-gitlab/actions/runs/12060608158/job/33631303063#step:5:204
[2] https://python-gitlab.readthedocs.io/en/v5.1.0/changelog.html#v1-10-0-2019-07-22 [3]
https://python-gitlab.readthedocs.io/en/v5.0.0/changelog.html#id258

  • renovate: Pin httpx until respx is fixed
    (b70830d)
Documentation
  • api-usage: Fix link to Gitlab REST API Authentication Docs
    (#​3059,
    f460d95)
Features
  • feat(api): Added project template classes to templates.py * feat(api): Added project template
    managers to Project in project.py * docs(merge_requests): Add example of creating mr with
    description template * test(templates): Added unit tests for templates * docs(templates): added
    section for project templates
  • graphql: Add async client
    (288f39c)

v5.1.0

Compare Source

Chores
  • deps: Update all non-major dependencies
    (9061647)

  • deps: Update all non-major dependencies
    (62da12a)

  • deps: Update all non-major dependencies
    (7e62136)

  • deps: Update all non-major dependencies
    (d4b52e7)

  • deps: Update all non-major dependencies
    (541a7e3)

  • deps: Update dependency pytest-cov to v6
    (ffa88b3)

  • deps: Update gitlab/gitlab-ee docker tag to v17.5.1-ee.0
    (8111f49)

  • deps: Update gitlab/gitlab-ee docker tag to v17.5.2-ee.0
    (#​3041,
    d39129b)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • deps: Update gitlab/gitlab-ee docker tag to v17.6.0-ee.0
    (#​3044,
    79113d9)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@​users.noreply.github.com>

  • deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v39
    (11458e0)
Features
  • api: Get single project approval rule
    (029695d)

  • api: Support list and delete for group service accounts
    (#​2963,
    499243b)

  • cli: Enable token rotation via CLI
    (0cb8171)

  • const: Add new Planner role to access levels
    (bdc8852)

  • files: Add support for more optional flags
    (f51cd52)

GitLab's Repository Files API supports additional flags that weren't implemented before. Notably,
the "start_branch" flag is particularly useful, as previously one had to use the "project-branch"
command alongside "project-file" to add a file on a separate branch.

[1] https://docs.gitlab.com/ee/api/repository_files.html

v5.0.0

Compare Source

Bug Fixes
  • api: Set _repr_attr for project approval rules to name attr
    (#​3011,
    1a68f1c)

Co-authored-by: Patrick Evans [email protected]

Chores

Mark that Python 3.13 is supported.

Use Python 3.13 for the Mac and Windows tests.

Also remove the 'py38' tox environment. We no longer support Python 3.8.

  • Add testing of Python 3.14
    (14d2a82)

Also fix annotations not working in Python 3.14 by using the annotation on the 'class' instead
of on the 'instance'

Closes: #​3013

python-gitlab hasn't supported the GitLab v3 API since 2018. The last version of python-gitlab to
support it was v1.4

Support was removed in:

commit fe89b94 Author: Gauvain Pocentek [email protected]

Date: Sat May 19 17:10:08 2018 +0200

Drop API v3 support

Drop the code, the tests, and update the documentation.

  • deps: Update all non-major dependencies
    (1e4326b)

  • deps: Update all non-major dependencies
    (b3834dc)

  • deps: Update dependency ubuntu to v24
    (6fda15d)

  • deps: Update gitlab/gitlab-ee docker tag to v17.4.2-ee.0
    (1cdfe40)

  • deps: Update gitlab/gitlab-ee docker tag to v17.5.0-ee.0
    (c02a392)

Documentation
Features

Python 3.8 is End-of-Life (EOL) as of 2024-10 as stated in https://devguide.python.org/versions/ and
https://peps.python.org/pep-0569/#lifespan

By dropping support for Python 3.8 and requiring Python 3.9 or higher it allows python-gitlab to
take advantage of new features in Python 3.9, which are documented at:
https://docs.python.org/3/whatsnew/3.9.html

Closes: #​2968

BREAKING CHANGE: As of python-gitlab 5.0.0, Python 3.8 is no longer supported. Python 3.9 or higher
is required.

Testing
  • Add test for to_json() method
    (f4bfe19)

This should get us to 100% test coverage on gitlab/base.py

BREAKING CHANGES
  • As of python-gitlab 5.0.0, Python 3.8 is no longer supported. Python 3.9 or higher is required.

Configuration

📅 Schedule: Branch creation - "every weekday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/python-gitlab-5.x branch from bd59352 to 4b5e71c Compare December 5, 2024 03:02
@renovate renovate bot force-pushed the renovate/python-gitlab-5.x branch from 4b5e71c to 7893bb7 Compare December 24, 2024 15:53
@renovate renovate bot force-pushed the renovate/python-gitlab-5.x branch 2 times, most recently from a6b8ff3 to bc71c47 Compare January 10, 2025 16:41
@renovate renovate bot force-pushed the renovate/python-gitlab-5.x branch from bc71c47 to 6547381 Compare January 14, 2025 19:55
@renovate renovate bot force-pushed the renovate/python-gitlab-5.x branch 2 times, most recently from 4b06b12 to 9982d74 Compare February 4, 2025 16:27
@renovate renovate bot force-pushed the renovate/python-gitlab-5.x branch from 9982d74 to fea7aff Compare February 4, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants