| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an `asdict()` method that returns a dictionary representation copy
of the Gitlab Object. This is a copy and changes made to it will have
no impact on the Gitlab Object.
The `asdict()` method name was chosen as both the `dataclasses` and
`attrs` libraries have an `asdict()` function which has the similar
purpose of creating a dictionary represenation of an object.
Also add a `to_json()` method that returns a JSON string
representation of the object.
Closes: #1116
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
|
|
|
| |
In the "Getting started with the API" section of the documentation,
use either `as_list=False` or `all=True` in the example usages of the
`list()` method.
Also add a warning about the fact that `list()` by default does not
return all items.
|
| |
|
|
|
| |
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
|
| |
|
|
|
|
|
| |
This is useful in debugging and testing. As can easily print out the
values from an instance in a more human-readable form.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
See issue #1620
|
|
|
|
|
| |
BREAKING CHANGE: python-gitlab will now default to gitlab.com
if no URL is given
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before we raised an error if there was a 301, 302 redirect but only
from an http URL to an https URL. But we didn't raise an error for
any other redirects.
This caused two problems:
1. PUT requests that are redirected get changed to GET requests
which don't perform the desired action but raise no error. This
is because the GET response succeeds but since it wasn't a PUT it
doesn't update. See issue:
https://github.com/python-gitlab/python-gitlab/issues/1432
2. POST requests that are redirected also got changed to GET
requests. They also caused hard to debug tracebacks for the user.
See issue:
https://github.com/python-gitlab/python-gitlab/issues/1477
Correct this by always raising a RedirectError exception and improve
the exception message to let them know what was redirected.
Closes: #1485
Closes: #1432
Closes: #1477
|
|
|
|
|
|
| |
`retry_transient_errors` can now be set through the Gitlab instance and global configuration
Documentation for API usage has been updated and missing tests have been added.
|
| |
|
| |
|
| |
|
|
|
|
| |
Another case of the double slash rewrite.
|
| |
|
|
|
|
| |
Co-Authored-By: Mitar <mitar.git@tnode.com>
|
| |
|
|\
| |
| | |
Update auth docs
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On startup, the `timeout` parameter is loaded from config and stored on
the base gitlab object instance. This instance parameter is used as the
timeout for all API requests (it's passed into the `session` object when
making HTTP calls).
This change allows any API method to specify a `timeout` argument to
`**kwargs` that will override the global timeout value. This was
somewhat needed / helpful for the `import_github` method.
I have also updated the docs accordingly.
|
|
|
|
| |
Fixes #970
|
|
|
|
| |
See https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts for usage
|
|
|
|
| |
Fixes #798
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Provide another way to send data to gitlab with a new `query_parameters`
argument. This parameter can be used to explicitly define the dict of
items to send to the server, so that **kwargs are only used to specify
python-gitlab specific parameters.
Closes #566
Closes #629
|
|
|
|
|
|
|
|
|
| |
When requests are throttled (HTTP response code 429), python-gitlab
assumed that 'Retry-After' existed in the response headers. This is
not always the case and so the request fails due to a KeyError. The
change in this commit adds a rudimentary exponential backoff to the
'http_request' method, which defaults to 10 retries but can be set
to -1 to retry without bound.
|
|
|
|
|
| |
http to https redirection cause problems. Make notes of this in the
docs.
|
| |
|
|
|
|
| |
Closes #579
|
| |
|
| |
|
| |
|
|
|
|
| |
Drop the code, the tests, and update the documentation.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #371
|