- Notifications
You must be signed in to change notification settings - Fork673
Comparing changes
Open a pull request
base repository:python-gitlab/python-gitlab
Uh oh!
There was an error while loading.Please reload this page.
base:v5.3.1
head repository:python-gitlab/python-gitlab
Uh oh!
There was an error while loading.Please reload this page.
compare:v5.4.0
- 20commits
- 47files changed
- 7contributors
Commits on Jan 10, 2025
feat(api): Narrow down return type of download methods using typing.o…
…verloadCurrently the download methods such as `ProjectJob.artifacts` havereturn type set to `Optional[Union[bytes, Iterator[Any]]]` whichmeans 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 thepassed 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 <igor.ponomarev@collabora.com>
Commits on Jan 13, 2025
chore(deps): update gitlab/gitlab-ee docker tag to v17.7.1-ee.0 (#3082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Commits on Jan 15, 2025
fix(api): Make type ignores more specific where possible
Instead of using absolute ignore `# type: ignore` use a morespecific ignores like `# type: ignore[override]`. This might helpin the future where a new bug might be introduced and get ignoredby a general ignore comment but not a more specific one.Signed-off-by: Igor Ponomarev <igor.ponomarev@collabora.com>
Commits on Jan 20, 2025
chore(deps): update mypy to 1.14 and resolve issues
mypy 1.14 has a change to Enum Membership Semantics:https://mypy.readthedocs.io/en/latest/changelog.htmlResolve the issues with Enum and typing, and update mypy to 1.14
Commits on Jan 22, 2025
ci: use gitlab-runner:v17.7.1 for the CI
The `latest` gitlab-runner image does not have the `gitlab-runner`user and it causes our tests to fail.Closes:#3091
chore(test): prevent 'job_with_artifact' fixture running forever
Previously the 'job_with_artifact' fixture could run forever. Now giveit up to 60 seconds to complete before failing.
feat(api): Add argument that appends extra HTTP headers to a request
Currently the only way to manipulate the headers for a requestis to use `Gitlab.headers` attribute. However, this makes itvery concurrently unsafe because the `Gitlab` object can be sharedbetween multiple requests at the same time.Instead add a new keyword argument `extra_headers` which will updatethe headers dictionary with new values just before the request is sent.For example, this can be used to download a part of a artifacts fileusing the `Range` header:https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requestsSigned-off-by: Igor Ponomarev <igor.ponomarev@collabora.com>
fix(files): add optional ref parameter for cli project-file raw (#3032)
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.
pytest has changed the function argument name to `start_path`
chore: resolve DeprecationWarning message in CI run
Catch the DeprecationWarning in our test, as we expect it.
Commits on Jan 23, 2025
chore(ci): set a 30 minute timeout for 'functional' tests
Currently the functional API test takes around 17 minutes to run. Andthe functional CLI test takes around 12 minutes to run.Occasionally a job gets stuck and will sit until the default 360minutes job timeout occurs.Now have a 30 minute timeout for the 'functional' tests.
chore(deps): update gitlab (#3088)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Commits on Jan 27, 2025
feat(api): Narrow down return type of ProjectFileManager.raw using ty…
…ping.overloadThis is equivalent to the changes in44fd9dcbut for `ProjectFileManager.raw` method that I must have missedin the original commit.Signed-off-by: Igor Ponomarev <igor.ponomarev@collabora.com>
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff v5.3.1...v5.4.0
Uh oh!
There was an error while loading.Please reload this page.