| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Add type-hints to some of the files in gitlab/v4/objects/
* Fix issues detected when adding type-hints
* Changed mypy exclusion to explicitly list the 13 files that have
not yet had type-hints added.
|
| |
|
|
|
|
|
| |
types-requests==2.25.9 changed a type-hint. Update code to handle this
change.
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: John Villalovos <john@sodarock.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
|\
| |
| | |
Improvements to HTTP requests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some arguments to `http_request` were being read
from kwargs, but kwargs is where this function
creates query parameters from, by default. In
the absence of a `query_parameters` param, the
function would construct URLs with query
parameters such as `retry_transient_errors=True`
despite those parameters having no meaning to
the API to which the request was sent.
This change names those arguments that are
specific to `http_request` so that they do not
end up as query parameters read from kwargs.
|
| |
| |
| |
| | |
Fixes #1386
|
|/
|
|
|
|
|
| |
If we want to update email, avatar and do not send email
confirmation change (`skip_reconfirmation` = True), `MultipartEncoder`
will try to encode everything except None and bytes. So it tries to encode bools.
Casting bool's values to their stringified int representation fix it.
|
|
|
|
|
|
|
|
|
|
|
| |
To be safe that we don't assert while running, put the assert
statements, which are used by mypy to check that types are correct,
inside an 'if TYPE_CHECKING:' block.
Also, instead of asserting that the item is a dict, instead assert
that it is not a requests.Response object. Theoretically the JSON
could return as a list or dict, though at this time we are assuming a
dict.
|
|
|
|
|
|
|
|
|
|
| |
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, ...]
|
|
|
|
| |
Was able to figure out better type-hints for gitlab/client.py
|
|
|
|
| |
Adding some initial type-hints to gitlab/client.py
|
|
|
|
|
|
| |
The function _construct_url() was used by the v3 API. All usage of the
function was removed in commit
fe89b949922c028830dd49095432ba627d330186
|
|
|
|
| |
Add an initial mypy test to test gitlab/base.py and gitlab/__init__.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In gitlab/client.py remove usage of:
* from gitlab.const import *
* from gitlab.exceptions import *
Change them to:
* import gitlab.const
* import gitlab.exceptions
Update code to explicitly reference things in gitlab.const and
gitlab.exceptions
A flake8 run no longer lists any undefined variables. Before it listed
possible undefined variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we only support the v4 Gitlab API, explicitly import
gitlab.v4.objects and gitlab.v4.clie instead of dynamically importing
it depending on the API version.
This has the added benefit of mypy being able to type check the Gitlab
__init__() function as currently it will fail if we enable type
checking of __init__() it will fail.
Also, this also helps by not confusing tools like pyinstaller/cx_freeze with
dynamic imports so you don't need hooks for standalone executables. And
according to https://docs.gitlab.com/ee/api/,
"GraphQL co-exists with the current v4 REST API. If we have a v5 API, this
should be a compatibility layer on top of GraphQL."
|
|
Move the classes Gitlab and GitlabList from gitlab/__init__.py to the
newly created gitlab/client.py file.
Update one test case that was depending on requests being defined in
gitlab/__init__.py
|