| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
`from_config` (#2392)
|
| |
|
| |
|
|
|
|
| |
This is mostly relevant for people mocking the API in tests.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This was a quirk only present in GitLab 13.0 and fixed with 13.1.
See
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33714 and
https://gitlab.com/gitlab-org/gitlab/-/issues/218504 for more
context.
|
|
|
|
|
| |
Use the `urlunparse()` function to reconstruct the URL without the
query parameters.
|
| |
|
| |
|
| |
|
|
|
|
| |
Update code so that the `warn_return_any` check passes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Enable the pylint "unused-argument" check and resolve issues it found.
* Quite a few functions were accepting `**kwargs` but not then
passing them on through to the next level. Now pass `**kwargs` to
next level.
* Other functions had no reason to accept `**kwargs`, so remove it
* And a few other fixes.
|
| |
|
|
|
|
|
|
|
| |
A new error was reported when running pylint==2.14.3:
gitlab/client.py:488:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
Fixed this issue.
|
|
|
|
|
| |
Enable the pylint check "redefined-outer-name" and fix the errors
detected.
|
|
|
|
| |
Enable the pylint check "no-self-use" and fix the errors detected.
|
|
|
|
| |
Enable the pylint check "no-else-return" and fix the errors detected.
|
|
|
|
|
| |
Enable the pylint check: "attribute-defined-outside-init" and fix
errors detected.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had
used the `name` argument for `ModuleNotFoundError()`. This basically
is the equivalent of not passing any message to
`ModuleNotFoundError()`. So when the exception was raised it wasn't
very helpful.
Correct that and add a unit-test that shows we get the message we
expect.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`list()`
`as_list=False` is confusing as it doesn't explain what is being
returned. Replace it with `iterator=True` which more clearly explains
to the user that an iterator/generator will be returned.
This maintains backward compatibility with `as_list` but does issue a
DeprecationWarning if `as_list` is set.
|
|\
| |
| | |
fix: avoid passing redundant arguments to API
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Sineaggi/add-chunked-to-list-of-retryable-exceptions
Add ChunkedEncodingError to list of retryable exceptions
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
| |
A common cause of issues filed and questions raised is that a user
will call a `list()` method and only get 20 items. As this is the
default maximum of items that will be returned from a `list()` method.
To help with this we now emit a warning when the result from a
`list()` method is greater-than or equal to 20 (or the specified
`per_page` value) and the user is not using either `all=True`,
`all=False`, `as_list=False`, or `page=X`.
|
| |
|
| |
|
| |
|
|\
| |
| | |
fix: support RateLimit-Reset header
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some endpoints are not returning the `Retry-After` header when
rate-limiting occurrs. In those cases use the `RateLimit-Reset` [1]
header, if available.
Closes: #1889
[1] https://docs.gitlab.com/ee/user/admin_area/settings/user_and_ip_rate_limits.html#response-headers
|
|/ |
|
|
|
|
|
|
|
| |
There are occasions where a GitLab `list()` call does not return the
`x-per-page` header. For example the listing of custom attributes.
Update the type-hints to reflect that.
|
|
|
|
|
|
|
|
| |
The non-keyword arguments were a tiny bit confusing as the destination was
first and the source was second.
Change the order and require key-word only arguments to ensure we
don't silently break anyone.
|
| |
|
|
|
|
|
|
|
|
| |
BREAKING-CHANGE: The gitlab CLI will now accept CLI arguments
and environment variables for its global options in addition
to configuration file options. This may change behavior for
some workflows such as running inside GitLab CI and with
certain environment variables configured.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a query returns more than 10,000 records than the following values
are NOT returned:
x.total_pages
x.total
Modify the code to allow no value to be set for these values. If there
is not a value returned the functions will now return None.
Update unit test so no longer `xfail`
https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers
Closes #1686
|
|\
| |
| | |
fix: stop encoding '.' to '%2E'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Forcing the encoding of '.' to '%2E' causes issues. It also goes
against the RFC:
https://datatracker.ietf.org/doc/html/rfc3986.html#section-2.3
From the RFC:
For consistency, percent-encoded octets in the ranges of ALPHA
(%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E),
underscore (%5F), or tilde (%7E) should not be created by URI
producers...
Closes #1006
Related #1356
Related #1561
BREAKING CHANGE: stop encoding '.' to '%2E'. This could potentially be
a breaking change for users who have incorrectly configured GitLab
servers which don't handle period '.' characters correctly.
|
|/
|
|
|
|
| |
mypy 0.920 now understands the type of
'http.client.HTTPConnection.debuglevel' so we remove the
'type: ignore' comment to make mypy pass
|