| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Commit b6447211754e126f64e12fc735ad74fe557b7fb4 inadvertently
introduced a possible breaking change as it added a new argument
`iterator` and added it in between existing (potentially positional) arguments.
This moves the `iterator` argument to the end of the argument list and
requires it to be a keyword-only argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat(downloads): allow streaming downloads access to response iterator
Allow access to the underlying response iterator when downloading in
streaming mode by specifying `iterator=True`.
Update type annotations to support this change.
* docs(api-docs): add iterator example to artifact download
Document the usage of the `iterator=True` option when downloading
artifacts
* test(packages): add tests for streaming downloads
|
|
|
|
|
| |
Enable the pylint check: "attribute-defined-outside-init" and fix
errors detected.
|
|
|
|
|
|
| |
Move the `validate_attrs` function to be inside the `RequiredOptional`
class. It makes sense for it to be part of the class as it is working
on data related to the class.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix board lists (#2037)
add exclusive tuple to RequiredOptional data class to support for
mutually exclusive attributes
consolidate _check_missing_create_attrs and _check_missing_update_attrs
from mixins.py into _validate_attrs in utils.py
change _create_attrs in board list manager classes from
required=('label_ld',) to
exclusive=('label_id','asignee_id','milestone_id')
closes https://github.com/python-gitlab/python-gitlab/issues/1897
|
|
|
|
|
|
| |
By having `RequiredOptional` in the `gitlab.base` module it makes it
difficult with circular imports. Move it to the `gitlab.types`
module which has no dependencies on any other gitlab module.
|
| |
|
| |
|
|
|
|
|
|
| |
Create return type-hints for `RESTObject.get_id()` and
`RESTObject.encoded_id`. Previously was saying they return Any. Be
more precise in saying they can return either: None, str, or int.
|
|
|
|
|
|
| |
utils.EncodedId() has basically the same functionalityy of using
utils._url_encode(). So remove utils._url_encode() as we don't need
it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure all usage of the ID in the URL path is encoded. Normally it
isn't an issue as most IDs are integers or strings which don't contain
a slash ('/'). But when the ID is a string with a slash character it
will break things.
Add a test case that shows this fixes wikis issue with subpages which
use the slash character.
Closes: #1079
|
|
|
|
|
|
|
|
|
|
| |
We were using `str.replace()` calls to take care of URL encoding
issues.
Switch them to use our `utils._url_encode()` function which itself uses
`urllib.parse.quote()`
Closes: #1356
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ProjectFile.decode() returns 'bytes' and not 'str'.
Update the method's doc-string and add a type-hint.
ProjectFile.decode() returns the result of a call to
base64.b64decode()
The docs for that function state it returns 'bytes':
https://docs.python.org/3/library/base64.html#base64.b64decode
Fixes: #1403
|
|
|
|
|
|
| |
Convert _create_attrs and _update_attrs to use a NamedTuple
(RequiredOptional) to help with code readability. Update all code to
use the NamedTuple.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In gitlab/v4/objects/*.py remove usage of:
* from gitlab.base import *
* from gitlab.mixins import *
Change them to:
* from gitlab.base import CLASS_NAME
* from gitlab.mixins import CLASS_NAME
Programmatically update code to explicitly import needed classes only.
After the change the output of:
$ flake8 gitlab/v4/objects/*py | grep 'REST\|Mixin'
Is empty. Before many messages about unable to determine if it was a
valid name.
|
| |
|
|
|