{
  "files": ["http_client.py", "test_http_client.py"],
  "edits": [
    {
      "file": "http_client.py",
      "description": "Add default timeout to httpx.Client and wrap request methods to catch and re-raise timeout exceptions without altering public signatures.",
      "code": "import httpx\nfrom httpx import TimeoutException\n\nclass HttpClient:\n    def __init__(self, base_url: str, timeout: float = 10.0):\n        self.client = httpx.Client(base_url=base_url, timeout=timeout)\n\n    def _execute(self, method, path, **kwargs):\n        try:\n            return method(path, **kwargs)\n        except TimeoutException as exc:\n            raise TimeoutError(f\"Request to {path} timed out\") from exc\n\n    def get(self, path: str, **kwargs):\n        return self._execute(self.client.get, path, **kwargs)\n\n    def post(self, path: str, **kwargs):\n        return self._execute(self.client.post, path, **kwargs)\n"
    }
  ],
  "tests": [
    {
      "file": "test_http_client.py",
      "description": "Verify that httpx.TimeoutException is caught and converted to a standard TimeoutError while preserving method signatures.",
      "code": "import pytest\nimport httpx\nfrom httpx import TimeoutException\nfrom http_client import HttpClient\n\ndef test_timeout_exception_handling():\n    def mock_timeout(request):\n        raise TimeoutException(\"Simulated timeout\")\n\n    transport = httpx.MockTransport(mock_timeout)\n    client = HttpClient(base_url=\"http://example.com\", timeout=5.0)\n    client.client = httpx.Client(transport=transport)\n\n    with pytest.raises(TimeoutError, match=\"timed out\"):\n        client.get(\"/api/data\")\n\ndef test_signature_unchanged():\n    def mock_ok(request):\n        return httpx.Response(200, json={\"status\": \"ok\"})\n\n    transport = httpx.MockTransport(mock_ok)\n    client = HttpClient(base_url=\"http://example.com\")\n    client.client = httpx.Client(transport=transport)\n\n    resp = client.get(\"/api/data\", params={\"key\": \"val\"})\n    assert resp.status_code == 200\n    assert resp.json() == {\"status\": \"ok\"}\n"
    }
  ],
  "risks": [
    "Changing the default timeout value may cause previously successful long-running requests to fail.",
    "Converting httpx.TimeoutException to a built-in TimeoutError could break existing exception handling logic that specifically catches httpx exceptions.",
    "Passing timeout via **kwargs in public methods might conflict with the client-level default if not carefully managed.",
    "MockTransport in tests does not simulate actual network latency, so real-world timeout behavior should be validated in integration tests."
  ]
}