Update dependency python_gitlab to v7 (main)
This MR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| python_gitlab (changelog) |
==4.1.1 -> ==7.0.0
|
⚠️ WarningSome dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
python-gitlab/python-gitlab (python_gitlab)
v7.0.0
Features
- Drop Python 3.9 support and add Python 3.14
(
22941ac)
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
Bug Fixes
-
semantic-release: Enable CHANGELOG.md generation
(
fb9693b)
Continuous Integration
-
stale: Fix permission for stale action and allow manual run
(
9357a37)
Documentation
-
pull_mirror: Fix incorrect start() method usage example
(
2acac19)
Features
-
api: Add content_ref and dry_run_ref parameters to ProjectCiLintManager (
e8d2538) -
users: Implement 'skip_confirmation' in users 'emails' creation (
2981730)
v6.4.0
Features
-
users: Implement missing arguments in users 'list' (
99923d4) -
users: Sort 'user list' arguments against documentation (
99923d4)
v6.3.0
Features
-
Add sync method to force remote mirror updates (
f3c6678) -
api: Add missing ProjectJob list filters (
5fe0e71) -
api: Add missing ProjectPackageManager list filters (
b1696be) -
users: Implement support for 'admins' in administrators 'list' (
aaed51c)
v6.2.0
Build System
-
release: Use correct python-semantic-release/publish-action
(
2f20634)
Continuous Integration
-
stale: Improve formatting of stale message (
0ef20d1) -
stale: Increase
operations-per-runto 500 (326e1a4)
Features
-
api: Add ListMixin to ProjectIssueDiscussionNoteManager (
f908f0e) -
api: Add ListMixin to ProjectMergeRequestDiscussionNoteManager (
865339a)
v6.1.0
Chores
- Update to mypy 1.16.0 and resolve issues found
(
f734c58)
Documentation
- Update CONTRIBUTING.rst with policy on issue management
(
45dda50)
Features
-
api: Add listing user contributed projects (
98c1307) -
api: Add support for project tag list filters (
378a836) -
const: Add PLANNER_ACCESS constant (
ba6f174) -
groups: Add protectedbranches to group class (#3164,
bfd31a8)
v6.0.0
Chores
-
Add reformat code commit to .git-blame-ignore-revs (
a6ac939) -
Reformat code with skip_magic_trailing_comma = true (
2100aa4) -
Remove trivial get methods in preparation for generic Get mixin (
edd01a5) -
Upgrade to sphinx 8.2.1 and resolve issues (
d0b5ae3) -
ci: Replace docs artifact with readthedocs previews (
193c5de)
Documentation
-
Use get_all keyword arg instead of all in docstrings (
f62dda7) -
Use list(get_all=True) in documentation examples (
f36614f) -
api-usage: Fix GitLab API links to the publicly accessible URLs (
f55fa15) -
api-usage-graphql: Fix the example graphql query string (
8dbdd7e) -
job_token_scope: Fix typo/inconsistency (
203bd92)
Features
-
Adds member role methods (
055557e) -
api: Add iteration_id as boards create attribute (#3191,
938b0d9) -
api: Add support for adding instance deploy keys (
22be96c) -
api: Add support for avatar removal (
5edd2e6) -
api: Add support for token self-rotation (
da40e09) -
api: ListMixin.list typing overload (
6eee494) -
api: Make RESTManager generic on RESTObject class (
91c4f18) -
api: Make RESTObjectList typing generic (
befba35) -
settings: Implement support for 'silent_mode_enabled' (
a9163a9)
Refactoring
- Use more python3.9 syntax
(
4e90c11)
Testing
-
functional: Switch to new runner registration API
(
cbc613d)
v5.6.0
Features
-
group: Add support for group level MR approval rules
(
304bdd0)
v5.5.0
Chores
-
Add deprecation warning for mirror_pull functions (
7f6fd5c) -
Relax typing constraints for response action (
f430078) -
tests: Catch deprecation warnings (
0c1af08)
Documentation
Features
-
functional: Add pull mirror test (
3b31ade) -
projects: Add pull mirror class (
2411bff) -
unit: Add pull mirror tests (
5c11203)
v5.4.0
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 igor.ponomarev@collabora.com
-
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
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>
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 igor.ponomarev@collabora.com
-
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:
- If
streamed=Falseanditerator=Falsereturnbytes. This is the default argument values therefore it should be first as it will be used to lookup default arguments. 2. Ifiterator=TruereturnIterator[Any]. This can be combined with bothstreamed=Trueandstreamed=False. 3. Ifstreamed=Trueanditerator=FalsereturnNone. In this caseactionargument can be set to a callable that acceptsbytes.
Signed-off-by: Igor Ponomarev igor.ponomarev@collabora.com
-
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 igor.ponomarev@collabora.com
v5.3.1
Bug Fixes
-
api: Allow configuration of keep_base_url from file (
f4f7d7a) -
registry-protection: Fix api url (
8c1aaa3)
Chores
v5.3.0
Chores
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
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>
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
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
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>
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
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.0.0
Bug Fixes
Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com
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 gauvain@pocentek.net
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.
v4.13.0
Chores
-
deps: Update all non-major dependencies (
c3efb37)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Features
-
api: Add support for project Pages API
(
0ee0e02)
v4.12.2
Bug Fixes
When an error occurs, raise GitlabHeadError in project.files.head() method.
Closes: #3004
v4.12.1
Bug Fixes
-
ci: Do not rely on GitLab.com runner arch variables (#3003,
c848d12) -
files: Correctly raise GitlabGetError in get method (
190ec89)
Chores
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
-
deps: Update gitlab/gitlab-ee docker tag to v17.4.1-ee.0
(
64eed5d)
v4.12.0
Bug Fixes
- fix(api): head requests for projectfilemanager
Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com
Co-authored-by: Nejc Habjan hab.nejc@gmail.com
Chores
pylint 3.3.1 appears to have added "too-many-positional-arguments" check with a value of 5.
I don't disagree with this, but we have many functions which exceed this value. We might think about converting some of positional arguments over to keyword arguments in the future. But that is for another time.
For now disable the check across the project.
-
deps: Update all non-major dependencies (
ae132e7) -
deps: Update all non-major dependencies (
10ee58a) -
deps: Update dependency types-setuptools to v75 (
a2ab54c) -
deps: Update gitlab/gitlab-ee docker tag to v17.3.2-ee.0 (
5cd1ab2) -
deps: Update gitlab/gitlab-ee docker tag to v17.4.0-ee.0 (
8601808)
Features
v4.11.1
Bug Fixes
-
client: Ensure type evaluations are postponed
(
b41b2de)
v4.11.0
Chores
-
deps: Update all non-major dependencies (
fac8bf9) -
deps: Update all non-major dependencies (
88c7529) -
deps: Update dependency types-setuptools to v74 (
bdfaddb) -
pre-commit: Add deps (
fe5e608)
Documentation
-
objects: Fix typo in get latest pipeline
(
b9f5c12)
Features
-
Add a minimal GraphQL client (
d6b1b0a) -
api: Add exclusive GET attrs for /groups/:id/members (
d44ddd2) -
api: Add exclusive GET attrs for /projects/:id/members (
e637808) -
client: Add retry handling to GraphQL client (
8898c38) -
client: Make retries configurable in GraphQL (
145870e)
Refactoring
-
client: Move retry logic into utility
(
3235c48)
v4.10.0
Chores
-
deps: Update all non-major dependencies (
2ade0d9) -
deps: Update all non-major dependencies (
0578bf0) -
deps: Update all non-major dependencies (
31786a6) -
deps: Update dependency myst-parser to v4 (
930d4a2) -
deps: Update dependency sphinx to v8 (
cb65ffb) -
deps: Update dependency types-setuptools to v73 (
d55c045) -
deps: Update gitlab/gitlab-ee docker tag to v17.2.2-ee.0 (
b2275f7) -
deps: Update gitlab/gitlab-ee docker tag to v17.3.0-ee.0 (
e5a46f5) -
deps: Update gitlab/gitlab-ee docker tag to v17.3.1-ee.0 (
3fdd130) -
deps: Update python-semantic-release/upload-to-gh-release digest to
17c75b7(12caaa4) -
release: Track tags for renovate (
d600444)
Documentation
-
faq: Correct the attribute fetching example
(
43a16ac)
There is an example about object attributes in the FAQ. It shows how to properly fetch all attributes of all projects, by using list() followed by a get(id) call.
Unfortunately this example used a wrong variable name, which caused it not to work and which could have made it slightly confusing to readers. This commit fixes that, by changing the variable name.
Now the example uses one variable for two Python objects. As they correspond to the same GitLab object and the intended behavior is to obtain that very object, just with all attributes, this is fine and is probably what readers will find most useful in this context.
Features
-
api: Project/group hook test triggering
(
9353f54)
Add the ability to trigger tests of project and group hooks.
Fixes #2924
Testing
-
cli: Allow up to 30 seconds for a project export
(
bdc155b)
Before we allowed a maximum of around 15 seconds for the project-export. Often times the CI was failing with this value.
Change it to a maximum of around 30 seconds.
v4.9.0
Chores
-
ci: Make pre-commit check happy
(
67370d8)
pre-commit incorrectly wants double back-quotes inside the code section. Rather than fight it, just use single quotes.
-
deps: Update all non-major dependencies (
f95ca26) -
deps: Update all non-major dependencies (
7adc86b) -
deps: Update all non-major dependencies (
e820db0) -
deps: Update dependency types-setuptools to v71 (
d6a7dba) -
deps: Update gitlab/gitlab-ee docker tag to v17.2.1-ee.0 (
d13a656) -
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v38 (
f13968b) -
deps: Update python-semantic-release/upload-to-gh-release digest to
0dcddac(eb5c6f7) -
deps: Update python-semantic-release/upload-to-gh-release digest to
e2355e1(eb18552)
Features
-
snippets: Add support for listing all instance snippets
(
64ae61e)
v4.8.0
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 igor.ponomarev@collabora.com
-
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
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>
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 igor.ponomarev@collabora.com
-
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:
- If
streamed=Falseanditerator=Falsereturnbytes. This is the default argument values therefore it should be first as it will be used to lookup default arguments. 2. Ifiterator=TruereturnIterator[Any]. This can be combined with bothstreamed=Trueandstreamed=False. 3. Ifstreamed=Trueanditerator=FalsereturnNone. In this caseactionargument can be set to a callable that acceptsbytes.
Signed-off-by: Igor Ponomarev igor.ponomarev@collabora.com
-
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 igor.ponomarev@collabora.com
v4.7.0
Bug Fixes
- Add ability to add help to custom_actions
(
9acd2d2)
Now when registering a custom_action can add help text if desired.
Also delete the VerticalHelpFormatter as no longer needed. When the help value is set to None or
some other value, the actions will get printed vertically. Before when the help value was not set
the actions would all get put onto one line.
Chores
- Add a help message for
gitlab project-key enable(1291dbb)
Add some help text for gitlab project-key enable. This both adds help text and shows how to use
the new help feature.
Example:
$ gitlab project-key --help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options: -h, --help show this help message and exit
action: {list,get,create,update,delete,enable} Action to execute on the GitLab resource. list List the GitLab resources get Get a GitLab resource create Create a GitLab resource update Update a GitLab resource delete Delete a GitLab resource enable Enable a deploy key for the project
- Sort CLI behavior-related args to remove
(
9b4b0ef)
Sort the list of CLI behavior-related args that are to be removed.
-
deps: Update all non-major dependencies (
88de2f0) -
deps: Update all non-major dependencies (
a510f43) -
deps: Update all non-major dependencies (
d4fdf90) -
deps: Update all non-major dependencies (
d5de288) -
deps: Update dependency types-setuptools to v70 (
7767514) -
deps: Update gitlab/gitlab-ee docker tag to v17.0.1-ee.0 (
df0ff4c) -
deps: Update gitlab/gitlab-ee docker tag to v17.0.2-ee.0 (
51779c6) -
deps: Update python-semantic-release/upload-to-gh-release digest to
477a404(02a551d) -
deps: Update python-semantic-release/upload-to-gh-release digest to
6b7558f(fd0f0b0)
Features
- Add
--no-mask-credentialsCLI argument (18aa1fc)
This gives the ability to not mask credentials when using the --debug argument.
-
api: Add support for latest pipeline
(
635f5a7)
v4.6.0
Bug Fixes
-
Don't raise
RedirectErrorfor redirectedHEADrequests (8fc13b9) -
Handle large number of approval rules (
ef8f0e1)
Use iterator=True when going through the list of current approval rules. This allows it to handle
more than the default of 20 approval rules.
Closes: #2825
-
cli: Don't require
--idwhen enabling a deploy key (98fc578)
No longer require --id when doing: gitlab project-key enable
Now only the --project-id and --key-id are required.
-
deps: Update minimum dependency versions in pyproject.toml
(
37b5a70)
Update the minimum versions of the dependencies in the pyproject.toml file.
This is related to MR #2878
-
projects: Fix 'import_project' file argument type for typings
(
33fbc14)
Signed-off-by: Adrian DC radian.dc@gmail.com
Chores
- Add an initial .git-blame-ignore-revs
(
74db84c)
This adds the .git-blame-ignore-revs file which allows ignoring certain commits when doing a git blame --ignore-revs
Ignore the commit that requires keyword arguments for register_custom_action()
- Add type info for ProjectFile.content
(
62fa271)
Closes: #2821
- Correct type-hint for
job.trace()(840572e)
Closes: #2808
We no longer support Python versions before 3.8. So it isn't needed anymore.
- Require keyword arguments for register_custom_action
(
7270523)
This makes it more obvious when reading the code what each argument is for.
-
Update commit reference in git-blame-ignore-revs (
d0fd5ad) -
cli: Add ability to not add
_id_attras an argument (2037352)
In some cases we don't want to have _id_attr as an argument.
Add ability to have it not be added as an argument.
-
cli: Add some simple help for the standard operations
(
5a4a940)
Add help for the following standard operations: * list: List the GitLab resources * get: Get a GitLab resource * create: Create a GitLab resource * update: Update a GitLab resource * delete: Delete a GitLab resource
For example: $ gitlab project-key --help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options: -h, --help show this help message and exit
action: list get create update delete enable Action to execute on the GitLab resource. list List the GitLab resources get Get a GitLab resource create Create a GitLab resource update Update a GitLab resource delete Delete a GitLab resource
-
cli: On the CLI help show the API endpoint of resources
(
f1ef565)
This makes it easier for people to map CLI command names to the API.
Looks like this: $ gitlab --help The GitLab resource to manipulate. application API endpoint: /applications application-appearance API endpoint: /application/appearance application-settings API endpoint: /application/settings application-statistics API endpoint: /application/statistics
-
deps: Update all non-major dependencies (
4c7014c) -
deps: Update all non-major dependencies (
ba1eec4) -
deps: Update dependency requests to v2.32.0 [security] (
1bc788c) -
deps: Update gitlab/gitlab-ee docker tag to v17 (
5070d07) -
deps: Update python-semantic-release/upload-to-gh-release digest to
673709c(1b550ac)
Features
- More usernames support for MR approvals
(
12d195a)
I don't think commit a2b8c8c went far enough to enable usernames support. We create and edit a
lot of approval rules based on an external service (similar to CODE_OWNERS), but only have the
usernames available, and currently, have to look up each user to get their user ID to populate
user_ids for .set_approvers() calls. Would very much like to skip the lookup and just send the
usernames, which this change should allow.
See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule
Signed-off-by: Jarod Wilson jarod@redhat.com
Co-authored-by: Cristiano Casella cristiano.casella@seacom.it
Co-authored-by: Nejc Habjan hab.nejc@gmail.com
Co-authored-by: Nejc Habjan hab.nejc@siemens.com
v4.5.0
Bug Fixes
- Consider
scopean ArrayAttribute in PipelineJobManager (c5d0404)
List query params like 'scope' were not being handled correctly for pipeline/jobs endpoint. This change ensures multiple values are appended with '[]', resulting in the correct URL structure.
Signed-off-by: Guilherme Gallo guilherme.gallo@collabora.com
Background: If one queries for pipeline jobs with scope=["failed", "success"]
One gets: GET /api/v4/projects/176/pipelines/1113028/jobs?scope=success&scope=failed
But it is supposed to get: GET /api/v4/projects/176/pipelines/1113028/jobs?scope[]=success&scope[]=failed
The current version only considers the last element of the list argument.
- User.warn() to show correct filename of issue
(
529f1fa)
Previously would only go to the 2nd level of the stack for determining the offending filename and line number. When it should be showing the first filename outside of the python-gitlab source code. As we want it to show the warning for the user of the libraries code.
Update test to show it works as expected.
-
api: Fix saving merge request approval rules
(
b8b3849)
Closes #2548
-
api: Update manual job status when playing it (
9440a32) -
cli: Allow exclusive arguments as optional (#2770,
7ec3189)
- fix(cli): allow exclusive arguments as optional
The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.
-
fix(cli): inform argument parser that options are mutually exclusive
-
fix(cli): use correct exclusive options, add unit test
Closes #2769
-
test: Use different ids for merge request, approval rule, project
(
c23e6bd)
The original bug was that the merge request identifier was used instead of the approval rule
identifier. The test didn't notice that because it used 1 for all identifiers. Make these
identifiers different so that a mixup will become apparent.
Build System
- Add "--no-cache-dir" to pip commands in Dockerfile
(
4ef94c8)
This would not leave cache files in the built docker image.
Additionally, also only build the wheel in the build phase.
On my machine, before this MR, size is 7484539; after this MR, size is 7261771.
Chores
Even though there isn't a Python 3.13 at this time, this is done for the future. tox is already configured to just warn about missing Python versions, but not fail if they don't exist.
- Add tox
labelsto enable running groups of environments (d7235c7)
tox now has a feature of labels which allows running groups of environments using the command tox -m LABEL_NAME. For example tox -m lint which has been setup to run the linters.
Bumped the minimum required version of tox to be 4.0, which was released over a year ago.
- Update
mypyto 1.9.0 and resolve one issue (dd00bfc)
mypy 1.9.0 flagged one issue in the code. Resolve the issue. Current unit tests already check that a
None value returns text/plain. So function is still working as expected.
- Update version of
blackforpre-commit(3501716)
The version of black needs to be updated to be in sync with what is in requirements-lint.txt
-
deps: Update all non-major dependencies (
4f338ae) -
deps: Update all non-major dependencies (
65d0e65) -
deps: Update all non-major dependencies (
1f0343c) -
deps: Update all non-major dependencies (
0e9f4da) -
deps: Update all non-major dependencies (
d5b5fb0) -
deps: Update all non-major dependencies (
14a3ffe) -
deps: Update all non-major dependencies (
3c4dcca) -
deps: Update all non-major dependencies (
04c569a) -
deps: Update all non-major dependencies (
3c4b27e) -
deps: Update all non-major dependencies (
7dc2fa6) -
deps: Update all non-major dependencies (
48726fd) -
deps: Update codecov/codecov-action action to v4 (
d2be1f7) -
deps: Update dependency black to v24 (
f59aee3) -
deps: Update dependency black to v24.3.0 [security] (
f6e8692) -
deps: Update dependency furo to v2024 (
f6fd02d) -
deps: Update dependency jinja2 to v3.1.4 [security] (
8ea10c3) -
deps: Update dependency myst-parser to v3 (
9289189) -
deps: Update dependency pytest to v8 (
253babb) -
deps: Update dependency pytest-cov to v5 (
db32000) -
deps: Update dependency pytest-docker to v3 (
35d2aec) -
deps: Update gitlab/gitlab-ee docker tag to v16 (
ea8c4c2) -
deps: Update gitlab/gitlab-ee docker tag to v16.11.1-ee.0 (
1ed8d6c) -
deps: Update gitlab/gitlab-ee docker tag to v16.11.2-ee.0 (
9be48f0) -
deps: Update python-semantic-release/python-semantic-release action to v9 (
e11d889)
Documentation
- Add FAQ about conflicting parameters
(
683ce72)
We have received multiple issues lately about this. Add it to the FAQ.
- Correct rotate token example
(
c53e695)
Rotate token returns a dict. Change example to print the entire dict.
Closes: #2836
- How to run smoke tests
(
2d1f487)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
- Note how to use the Docker image from within GitLab CI
(
6d4bffb)
Ref: #2823
To correctly format a code block have to use ::
-
README: Tweak GitLab CI usage docs
(
d9aaa99)
Features
- feat(api): allow updating protected branches
Closes #2390
-
cli: Allow skipping initial auth calls (
001e596) -
job_token_scope: Support Groups in job token allowlist API (#2816,
2d1b749)
- feat(job_token_scope): support job token access allowlist API
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
l.dwp.gov.uk> Co-authored-by: Nejc Habjan nejc.habjan@siemens.com
Testing
- Don't use weak passwords
(
c64d126)
Newer versions of GitLab will refuse to create a user with a weak password. In order for us to move to a newer GitLab version in testing use a stronger password for the tests that create a user.
- Remove approve step
(
48a6705)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
- Tidy up functional tests
(
06266ea)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
-
Update api tests for GL 16.10 (
4bef473) -
Make sure we're testing python-gitlab functionality, make sure we're not awaiting on Gitlab Async functions - Decouple and improve test stability
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
-
Update tests for gitlab 16.8 functionality (
f8283ae) -
use programmatic dates for expires_at in tokens tests - set PAT for 16.8 into tests
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
-
functional: Enable bulk import feature flag before test (
b81da2e) -
smoke: Normalize all dist titles for smoke tests (
ee013fe)
v4.4.0
Bug Fixes
-
cli: Support binary files with
@notation (57749d4)
Support binary files being used in the CLI with arguments using the @ notation. For example
--avatar @​/path/to/avatar.png
Also explicitly catch the common OSError exception, which is the parent exception for things like: FileNotFoundError, PermissionError and more exceptions.
Remove the bare exception handling. We would rather have the full traceback of any exceptions that we don't know about and add them later if needed.
Closes: #2752
Chores
-
ci: Add Python 3.13 development CI job
(
ff0c11b)
Add a job to test the development versions of Python 3.13.
-
ci: Align upload and download action versions (
dcca59d) -
deps: Update actions/upload-artifact action to v4 (
7114af3) -
deps: Update all non-major dependencies (
550f935) -
deps: Update all non-major dependencies (
cbc13a6) -
deps: Update all non-major dependencies (
369a595) -
deps: Update dependency flake8 to v7 (
20243c5) -
deps: Update dependency jinja2 to v3.1.3 [security] (
880913b) -
deps: Update pre-commit hook pycqa/flake8 to v7 (
9a199b6)
Features
-
api: Add reviewer_details manager for mergrequest to get reviewers of merge request
(
adbd90c)
Those changes implements 'GET /projects/:id/merge_requests/:merge_request_iid/reviewers' gitlab API call. Naming for call is not reviewers because reviewers atribute already presen in merge request response
-
api: Support access token rotate API (
b13971d) -
api: Support single resource access token get API (
dae9e52)
v4.3.0
Bug Fixes
-
cli: Add ability to disable SSL verification
(
3fe9fa6)
Add a --no-ssl-verify option to disable SSL verification
Closes: #2714
Chores
-
deps: Update actions/setup-python action to v5 (
fad1441) -
deps: Update actions/stale action to v9 (
c01988b) -
deps: Update all non-major dependencies (
d7bdb02) -
deps: Update all non-major dependencies (
9e067e5) -
deps: Update all non-major dependencies (
bb2af7b) -
deps: Update all non-major dependencies (
5ef1b4a) -
deps: Update dependency types-setuptools to v69 (
de11192)
Documentation
- Fix rst link typo in CONTRIBUTING.rst
(
2b6da6e)
Features
-
feat(api): add support for the Draft notes API
-
fix(client): handle empty 204 reponses in PUT requests
v4.2.0
Chores
-
deps: Update all non-major dependencies (
8aeb853) -
deps: Update all non-major dependencies (
9fe2335) -
deps: Update all non-major dependencies (
91e66e9) -
deps: Update all non-major dependencies (
d0546e0) -
deps: Update dessant/lock-threads action to v5 (
f4ce867)
Features
- Add pipeline status as Enum
(
4954bbc)
https://docs.gitlab.com/ee/api/pipelines.html
Added UploadMixin in mixin module Added UploadMixin dependency for Project, ProjectWiki, GroupWiki Added api tests for wiki upload Added unit test for mixin Added docs sections to wikis.rst
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot Sylva instance.
CI configuration couldn't be handle by MR description. A dedicated comment has been posted to control it.
If no checkbox is checked, a default pipeline will be enabled (capm3, or capo if capo label is set)