{
  "files": [
    "src/httpx_wrapper.py",
    "tests/test_httpx_wrapper.py"
  ],
  "edits": {
    "src/httpx_wrapper.py": "import httpx\nfrom httpx import TimeoutException\n\nclass HttpClientWrapper:\n    def __init__(self, default_timeout: float = 5.0):\n        self.default_timeout = default_timeout\n        self.client = httpx.Client()\n\n    def request(self, method: str, url: str, **kwargs) -> httpx.Response:\n        timeout = kwargs.pop('timeout', self.default_timeout)\n        try:\n            return self.client.request(method, url, timeout=timeout, **kwargs)\n        except TimeoutException as e:\n            raise TimeoutError(f'Request to {url} timed out after {timeout}s') from e\n\n    def close(self):\n        self.client.close()"
  },
  "tests": "import pytest\nfrom unittest.mock import patch, MagicMock\nfrom src.httpx_wrapper import HttpClientWrapper\nfrom httpx import TimeoutException\n\ndef test_request_success():\n    wrapper = HttpClientWrapper(default_timeout=2.0)\n    with patch.object(wrapper.client, 'request', return_value=MagicMock(status_code=200)) as mock_req:\n        resp = wrapper.request('GET', 'http://example.com')\n        mock_req.assert_called_once_with('GET', 'http://example.com', timeout=2.0)\n        assert resp.status_code == 200\n\ndef test_request_custom_timeout():\n    wrapper = HttpClientWrapper(default_timeout=2.0)\n    with patch.object(wrapper.client, 'request', return_value=MagicMock(status_code=200)) as mock_req:\n        wrapper.request('GET', 'http://example.com', timeout=10.0)\n        mock_req.assert_called_once_with('GET', 'http://example.com', timeout=10.0)\n\ndef test_request_timeout_handling():\n    wrapper = HttpClientWrapper(default_timeout=1.0)\n    with patch.object(wrapper.client, 'request', side_effect=TimeoutException('timeout')):\n        with pytest.raises(TimeoutError, match='timed out after 1.0s'):\n            wrapper.request('GET', 'http://example.com')",
  "risks": [
    "Exception type change: Wrapping httpx.TimeoutException in TimeoutError may break existing except blocks expecting the original exception.",
    "Thread safety: httpx.Client is not thread-safe; concurrent requests require separate instances or synchronization.",
    "Default timeout tuning: A hardcoded default may cause failures in high-latency environments or waste resources in low-latency ones.",
    "Missing retry logic: Timeouts currently fail immediately; production systems often require exponential backoff retries.",
    "Async incompatibility: This implementation uses synchronous httpx.Client; async workflows require AsyncClient and await syntax."
  ]
}