You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for hash and Array of hashes data types #1735
I also came across https://gitlab.com/gitlab-org/gitlab/-/issues/358418 which talks about potentially changing the Gitlab API to respect RFC 6570 encoding of parameters like this that was a bit related to this topic.
It really doesn't like those square brackets! It seems like encoding them should be the correct behavior though. Is it the gitlab API that is not following URL encoding standards here?
To run a similar request via cURL, I have to use --globoff in order for it to work:
As a workaround for my particular use case, I am doing the filtering myself by sifting through the approvals response (this API doesn't seem to be supported yet by the library, so using low level method here):
@fletchowns So it seems like requests will always escape the [] characters. While --globoff in curl does not escape those characters. If GitLab requires unescaped characters then it might be very difficult to do this.
This issue was marked stale because it has been open 60 days with
no activity. Please remove the stale label or comment on this
issue. Otherwise, it will be closed in 15 days.
As an open-source project, we rely on community contributions to
address many of the reported issues. Without a proposed fix or
active work towards a solution it is our policy to close inactive
issues. This is documented in CONTRIBUTING.rst
How to keep this issue open:
If you are still experiencing this issue and are willing to
investigate a fix, please comment and let us know.
If you (or someone else) can propose a pull request with a
solution, that would be fantastic.
Any significant update or active discussion indicating progress
will also prevent closure.
We value your input. If you can help provide a fix, we'd be happy
to keep this issue open and support your efforts.
Activity
JohnVillalovos commentedon Jan 6, 2022
So there seems to be some sort of support for
hashhere:python-gitlab/gitlab/utils.py
Lines 47 to 56 in a349793
fletchowns commentedon Aug 24, 2024
Does this issue prevent the ability of using
notcondition in query_parameters? I came across an example that made it seem like it would be supported.For example, when retrieving merge requests that a reviewer has not yet approved, I was thinking it would be something like:
Here's the logs of what is generated by the above attempt:
That does not seem to work though, perhaps due to the encoding of the square brackets? I also tried:
That didn't seem to work either. Is this not currently possible?
The Gitlab UI itself generates query parameters such as the following for it:
I also came across https://gitlab.com/gitlab-org/gitlab/-/issues/358418 which talks about potentially changing the Gitlab API to respect RFC 6570 encoding of parameters like this that was a bit related to this topic.
Thanks for the great library!
JohnVillalovos commentedon Aug 24, 2024
@fletchowns I don't think that will work. Now you might try doing:
{'not[approved_byusernames]': ['some.user']}Maybe that would work but I don't know.
EDIT: Oh I see you attempted that already. So never mind☹️
fletchowns commentedon Aug 24, 2024
Thank you for the suggestion @JohnVillalovos . I had not tried exactly that, but I just tried that as well and it does not seem to work:
Resulting URL from debug logs:
fletchowns commentedon Aug 25, 2024
I tried using http_get as a workaround, but that seemed to have the encoding issue as well:
It really doesn't like those square brackets! It seems like encoding them should be the correct behavior though. Is it the gitlab API that is not following URL encoding standards here?
To run a similar request via cURL, I have to use
--globoffin order for it to work:As a workaround for my particular use case, I am doing the filtering myself by sifting through the approvals response (this API doesn't seem to be supported yet by the library, so using low level method here):
JohnVillalovos commentedon Aug 27, 2024
@fletchowns So it seems like
requestswill always escape the[]characters. While--globoffin curl does not escape those characters. If GitLab requires unescaped characters then it might be very difficult to do this.github-actions commentedon Jul 9, 2025
This issue was marked stale because it has been open 60 days with
no activity. Please remove the stale label or comment on this
issue. Otherwise, it will be closed in 15 days.
As an open-source project, we rely on community contributions to
address many of the reported issues. Without a proposed fix or
active work towards a solution it is our policy to close inactive
issues. This is documented in CONTRIBUTING.rst
How to keep this issue open:
investigate a fix, please comment and let us know.
solution, that would be fantastic.
will also prevent closure.
We value your input. If you can help provide a fix, we'd be happy
to keep this issue open and support your efforts.
This is documented in CONTRIBUTING.rst
https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst
AdrianDC commentedon Sep 6, 2025
The missing support also prevents from adding the
not[type]=valuePython and CLI implementation for Issues list API :Python workarounds are suggested here, but CLI can't be done for now :