| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The function sanitize_parameters() was used when the v3 API was in
use. Since v3 API support has been removed there are no more users of
this function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Git refnames are relatively free-form and can contain all sort for
special characters, not just `/` and `#`, see
http://git-scm.com/docs/git-check-ref-format
In particular, Debian's DEP-14 standard for storing packaging in git
repositories mandates the use of the `%` character in tags in some
cases like `debian/2%2.6-21`.
Unfortunately python-gitlab currently only escapes `/` to `%2F` and in
some cases `#` to `%23`. This means that when using the commit API to
retrieve information about the `debian/2%2.6-21` tag only the slash is
escaped before being inserted in the URL path and the `%` is left
untouched, resulting in something like
`/api/v4/projects/123/repository/commits/debian%2F2%2.6-21`. When
urllib3 seees that it detects the invalid `%` escape and then urlencodes
the whole string, resulting in
`/api/v4/projects/123/repository/commits/debian%252F2%252.6-21`, where
the original `/` got escaped twice and produced `%252F`.
To avoid the issue, fully urlencode identifiers and parameters to avoid
the urllib3 auto-escaping in all cases.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
|
|
|
|
|
|
|
|
|
|
| |
Don't allow a partially annotated function definition. Either none of
the function is annotated or all of it must be.
Update code to ensure no-more partially annotated functions.
Update gitlab/cli.py with better type-hints. Changed Tuple[Any, ...]
to Tuple[str, ...]
|
| |
|
| |
|
|
|
|
| |
with HTTP 500
|
| |
|
|
|
|
|
|
| |
Refactor a bit to handle this change, and add unit tests.
Closes #779
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
POST and PUT requests are modified by clients when redirections happen.
A common problem with python-gitlab is a misconfiguration of the server
URL: the http to https redirection breaks some requests.
With this change python-gitlab should detect problematic redirections,
and raise a proper exception instead of failing with a cryptic error.
Closes #565
|
| |
|
| |
|
| |
|
|
Some API calls will download possibly large data, resulting in a high
memory usage and out-of-memory errors. For these API calls use the
requests streaming capabilities and download chunked data. The caller is
responsible of providing a callable to actually store the data.
The default callable just prints the data on stdout.
|