Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pyodide/micropip
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 703fc54f71c0d666a10e7aeb0353f1364f56aca7
Choose a base ref
..
head repository: pyodide/micropip
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e01491f5051e8b03752563f18ddd425644e6ecc3
Choose a head ref
Showing with 7 additions and 10 deletions.
  1. +7 −10 micropip/_compat_in_pyodide.py
17 changes: 7 additions & 10 deletions micropip/_compat_in_pyodide.py
Original file line number Diff line number Diff line change
@@ -24,21 +24,18 @@

if IN_BROWSER:

async def _pyfetch(urls: str, **kwargs):
async def _pyfetch(url: str, **kwargs):
if "signal" in kwargs:
return await pyfetch(urls, **kwargs)
return await pyfetch(url, **kwargs)

controller = AbortController.new()
kwargs["signal"] = controller.signal

async def fetch_with_abort():
try:
return await pyfetch(urls, **kwargs)
except CancelledError:
controller.abort()
raise

return await fetch_with_abort()
try:
return await pyfetch(url, **kwargs)
except CancelledError:
controller.abort()
raise

else:
_pyfetch = pyfetch