| "stdout": "r,\n *,\n query_data: Optional[Dict[str, Any]] = None,\n post_data: Optional[Union[Dict[str, Any], bytes]] = None,\n raw: bool = False,\n **kwargs: Any,\n ) -> Union[Dict[str, Any], requests.Response]:\n \"\"\"Make a PATCH request to the Gitlab server.\n \n Args:\n path: Path or full URL to query ('/projects' or\n 'http://whatever/v4/api/projecs')\n query_data: Data to send as query parameters\n post_data: Data to send in the body (will be converted to\n json by default)\n raw: If True, do not convert post_data to json\n **kwargs: Extra options to send to the server (e.g. sudo)\n \n Returns:\n The parsed json returned by the server.\n \n Raises:\n GitlabHttpError: When the return code is not 2xx\n GitlabParsingError: If the json data could not be parsed\n \"\"\"\n query_data = query_data or {}\n post_data = post_data or {}\n \n result = self.http_request(\n \"patch\",\n path,\n query_data=query_data,\n post_data=post_data,\n raw=raw,\n **kwargs,\n )\n try:\n> json_result = result.json()\n\ngitlab/client.py:1087: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Response [204]>, kwargs = {}\n\n def json(self, **kwargs):\n r\"\"\"Returns the json-encoded content of a response, if any.\n \n :param \\*\\*kwargs: Optional arguments that ``json.loads`` takes.\n :raises requests.exceptions.JSONDecodeError: If the response body does not\n contain valid json.\n \"\"\"\n \n if not self.encoding and self.content and len(self.content) > 3:\n # No encoding set. JSON RFC 4627 section 3 states we should expect\n # UTF-8, -16 or -32. Detect which one to use; If the detection or\n # decoding fails, fall back to `self.text` (using charset_normalizer to make\n # a best guess).\n encoding = guess_json_utf(self.content)\n if encoding is not None:\n try:\n return complexjson.loads(self.content.decode(encoding), **kwargs)\n except UnicodeDecodeError:\n # Wrong UTF codec detected; usually because it's not UTF-8\n # but some other 8-bit codec. This is an RFC violation,\n # and the server didn't bother to tell us what codec *was*\n # used.\n pass\n except JSONDecodeError as e:\n raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)\n \n try:\n return complexjson.loads(self.text, **kwargs)\n except JSONDecodeError as e:\n # Catch JSON-related errors and raise as requests.JSONDecodeError\n # This aliases json.JSONDecodeError and simplejson.JSONDecodeError\n> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)\nE requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/requests/models.py:978: JSONDecodeError\n\nThe above exception was the direct cause of the following exception:\n\ngl = <gitlab.client.Gitlab object at 0x115adf0d0>\n\n @responses.activate\n def test_patch_request_204(gl):\n url = \"http://localhost/api/v4/projects\"\n responses.add(\n method=responses.PATCH,\n url=url,\n status=204,\n match=helpers.MATCH_EMPTY_QUERY_PARAMS,\n )\n \n> result = gl.http_patch(\"/projects\")\n\ntests/unit/test_gitlab_http_methods.py:813: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <gitlab.client.Gitlab object at 0x115adf0d0>, path = '/projects'\nquery_data = {}, post_data = {}, raw = False, kwargs = {}\nresult = <Response [204]>\n\n def http_patch(\n self,\n path: str,\n *,\n query_data: Optional[Dict[str, Any]] = None,\n post_data: Optional[Union[Dict[str, Any], bytes]] = None,\n raw: bool = False,\n **kwargs: Any,\n ) -> Union[Dict[str, Any], requests.Response]:\n \"\"\"Make a PATCH request to the Gitlab server.\n \n Args:\n path: Path or full URL to query ('/projects' or\n 'http://whatever/v4/api/projecs')\n query_data: Data to send as query parameters\n post_data: Data to send in the body (will be converted to\n json by default)\n raw: If True, do not convert post_data to json\n **kwargs: Extra options to send to the server (e.g. sudo)\n \n Returns:\n The parsed json returned by the server.\n \n Raises:\n GitlabHttpError: When the return code is not 2xx\n GitlabParsingError: If the json data could not be parsed\n \"\"\"\n query_data = query_data or {}\n post_data = post_data or {}\n \n result = self.http_request(\n \"patch\",\n path,\n query_data=query_data,\n post_data=post_data,\n raw=raw,\n **kwargs,\n )\n try:\n json_result = result.json()\n if TYPE_CHECKING:\n assert isinstance(json_result, dict)\n return json_result\n except Exception as e:\n> raise gitlab.exceptions.GitlabParsingError(\n error_message=\"Failed to parse the server message\"\n ) from e\nE gitlab.exceptions.GitlabParsingError: Failed to parse the server message\n\ngitlab/client.py:1092: GitlabParsingError\n=========================== short test summary info ============================\nFAILED tests/unit/test_gitlab_http_methods.py::test_patch_request_204 - gitla...\n1 failed, 992 passed, 3 skipped in 2.58s\n", |