Async version of URL parsing
(self, url: str)
| 467 | raise PackageParsingError(f"Error fetching package index from {url}: {e}") |
| 468 | |
| 469 | async def parse_from_url_async(self, url: str) -> PackageIndex: |
| 470 | """Async version of URL parsing""" |
| 471 | try: |
| 472 | print(f"Fetching package index from: {url}") |
| 473 | async with httpx.AsyncClient(timeout=self.timeout) as client: |
| 474 | response = await client.get(url) |
| 475 | response.raise_for_status() |
| 476 | json_str = response.text |
| 477 | |
| 478 | return self.parse_package_index(json_str) |
| 479 | |
| 480 | except KeyboardInterrupt as ki: |
| 481 | handle_keyboard_interrupt(ki) |
| 482 | raise |
| 483 | except Exception as e: |
| 484 | raise PackageParsingError(f"Error fetching package index from {url}: {e}") |
| 485 | |
| 486 | |
| 487 | # Package Manager Configuration |
nothing calls this directly
no test coverage detected