## Description of the problem, including code/CLI snippet Lazy objects with name containing http encoded character (like "/") can not be deleted. ## Expected Behavior ``` p = gitlab.projects.get(1) b = p.branches.get("foo/bar", lazy=True) # The name shall contain http encoded char like "/" b.delete() ``` Branch shall be deleted ## Actual Behavior `b.delete()` will raise an exception 404 ## Specifications - python-gitlab version: v2.7.1 - API version you are using (v3/v4): v4 ## Suggestion https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/utils.py#L60 `clean_str_id` seems to be called on an already encoded name. "foo/bar" -> "foo%2Fbar" -> "foo%252Fbar"
Activity
[-]Object deletion with from lazy get[/-][+]Object deletion from lazy get[/+]nejch commentedon Jun 3, 2021
Related to #1356
nejch commentedon Jan 13, 2022
Fixed in #1819 and tested in functional tests now at https://github.com/python-gitlab/python-gitlab/blob/main/tests/functional/api/test_lazy_objects.py#L30-L35.