| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
chore: rename `gitlab/__version__.py` to `gitlab/_version.py`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is confusing to have a `gitlab/__version__.py` because we also
create a variable `gitlab.__version__` which can conflict with
`gitlab/__version__.py`.
For example in `gitlab/const.py` we have to know that
`gitlab.__version__` is a module and not the variable due to the
ordering of imports. But in most other usage `gitlab.__version__` is a
version string.
To reduce confusion make the name of the version file
`gitlab/_version.py`.
|
| |
| |
| |
| |
| |
| | |
Convert from httmock to responses in test_mixins_methods.py
This leaves only one file left to convert
|
|/
|
|
|
|
| |
When doing the functional tests use the new function
`projects.transfer` instead of the deprecated function
`projects.transfer_project()`
|
| |
|
| |
|
|\
| |
| | |
fix: use url-encoded ID in all paths
|
| |
| |
| |
| |
| |
| | |
utils.EncodedId() has basically the same functionalityy of using
utils._url_encode(). So remove utils._url_encode() as we don't need
it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add EncodedId string class. This class returns a URL-encoded string
but ensures it will only URL-encode it once even if recursively
called.
Also added some functional tests of 'lazy' objects to make sure they
work.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
fix: members: use new *All objects for *AllManager managers
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change it so that:
GroupMemberAllManager uses GroupMemberAll object
ProjectMemberAllManager uses ProjectMemberAll object
Create GroupMemberAll and ProjectMemberAll objects that do not support
any Mixin type methods. Previously we were using GroupMember and
ProjectMember which support the `save()` and `delete()` methods but
those methods will not work with objects retrieved using the
`/members/all/` API calls.
`list()` API calls: [1]
GET /groups/:id/members/all
GET /projects/:id/members/all
`get()` API calls: [2]
GET /groups/:id/members/all/:user_id
GET /projects/:id/members/all/:user_id
Closes: #1825
Closes: #848
[1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members
[2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
|
|/
|
|
|
|
|
|
| |
Commit 8da0b758c589f608a6ae4eeb74b3f306609ba36d added the `lazy`
parameter to the services `get()` method but missed then using the
`lazy` parameter when it called `super(...).get(...)`
Closes: #1828
|
|
|
|
| |
See https://docs.gitlab.com/ee/api/group_access_tokens.html
|
| |
|
|\
| |
| | |
chore: add `pprint()` and `pformat()` methods to RESTObject
|
| |
| |
| |
| |
| | |
This is useful in debugging and testing. As can easily print out the
values from an instance in a more human-readable form.
|
|\ \
| | |
| | | |
test: add logging to `tests/functional/conftest.py`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I have found trying to debug issues in the functional tests can be
difficult. Especially when trying to figure out failures in the CI
running on Github.
Add logging to `tests/functional/conftest.py` to have a better
understanding of what is happening during a test run which is useful
when trying to troubleshoot issues in the CI.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The arguments `should_remove_source_branch` and
`merge_when_pipeline_succeeds` are optional arguments. We should not
be setting any default value for them.
https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr
Closes: #1750
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the CLI we need to make sure the components put into the path
portion of the URL are url-encoded. Otherwise they will be interpreted
as part of the path. For example can specify the project ID as a path,
but in the URL it must be url-encoded or it doesn't work.
Also stop adding the components of the path as query parameters in the
URL.
Closes: #783
Closes: #1498
|
|/
|
|
|
| |
Previously c8256a5933d745f70c7eea0a7d6230b51bac0fbc was done to fix
this but it missed two other failures.
|
|
|
|
|
|
|
| |
Add a functional test of test mergerequest.get() and
mergerequest.get(..., lazy=True)
Closes: #1425
|
|
|
|
|
|
|
| |
Add a test case to show that a branch name with a period can be
fetched with a `get()`
Closes: #1715
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Fix functional test failure if config present and configured with
token.
Closes: #1791
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Ensure reset_gitlab() succeeds by waiting to make sure everything has
been deleted as expected. If the timeout is exceeded fail the test.
Not using `wait_for_sidekiq` as it didn't work. During testing I
didn't see any sidekiq processes as being busy even though not
everything was deleted.
|
|\
| |
| | |
chore: skip a functional test if not using >= py3.9
|
| |
| |
| |
| |
| | |
One of the tests requires Python 3.9 or higher to run. Mark the test
to be skipped if running Python less than 3.9.
|
|/
|
|
|
|
|
|
|
|
|
| |
When running with docker-compose on Ubuntu 20.04 I got the error:
$ docker-compose up
ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.gitlab-network value Additional properties are not allowed ('name' was unexpected)
Changing the version in the docker-compose.yml file fro '3' to '3.5'
resolved the issue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Closes #1764
|
|
|
|
|
|
|
|
|
|
|
| |
BREAKING CHANGE: A config file is no longer needed to run
the CLI. python-gitlab will default to https://gitlab.com
with no authentication if there is no config file provided.
python-gitlab will now also only look for configuration
in the provided PYTHON_GITLAB_CFG path, instead of merging
it with user- and system-wide config files. If the
environment variable is defined and the file cannot be
opened, python-gitlab will now explicitly fail.
|
| |
|
|
|
|
| |
It is not yet available upstream.
|
| |
|
|\
| |
| | |
chore: add get() methods for GetWithoutIdMixin based classes
|
| |
| |
| |
| |
| |
| |
| | |
Add the get() methods for the GetWithoutIdMixin based classes.
Update the tests/meta/test_ensure_type_hints.py tests to check to
ensure that the get methods are defined with the correct return type.
|
|/ |
|
|
|
|
|
| |
Add running the unit tests on windows-latest and macos-latest with
Python 3.10.
|
|\
| |
| | |
chore: attempt to be more informative for missing attributes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A commonly reported issue from users on Gitter is that they get an
AttributeError for an attribute that should be present. This is often
caused due to the fact that they used the `list()` method to retrieve
the object and objects retrieved this way often only have a subset of
the full data.
Add more details in the AttributeError message that explains the
situation to users. This will hopefully allow them to resolve the
issue.
Update the FAQ in the docs to add a section discussing the issue.
Closes #1138
|
| |
| |
| |
| |
| | |
Have code use constants from the gitlab.const module instead of from
the top-level gitlab module.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are planning on adding enumerated constants into gitlab/const.py,
but if we do that than they will end up being added to the top-level
gitlab namespace. We really want to get users to start using
`gitlab.const.` to access the constant values in the future.
Add the currently defined constants to a list that should not change.
Use a module level __getattr__ function so that we can deprecate
access to the top-level constants.
Add a unit test which verifies we generate a warning when accessing
the top-level constants.
|
| |
|