File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11import re
2- from concurrent .futures import ThreadPoolExecutor
32from typing import Dict , List , cast
43
54from .base import Retrievable
@@ -17,5 +16,11 @@ def retrieve_uri(uri: str) -> Retrievable:
1716
1817
1918def retrieve_uris (uris : List [str ]) -> List [Retrievable ]:
20- with ThreadPoolExecutor (max_workers = len (uris )) as executor :
21- return [obj for obj in executor .map (retrieve_uri , uris )]
19+ # Changed the implementation to use a simple for loop instead of
20+ # ThreadPoolExecutor. The list of URIs is small, so the performance
21+ # difference is negligible. Additionally, using ThreadPoolExecutor
22+ # caused issues with VCR tests, as the recordings were not retrieved
23+ # in the correct order, leading to unexpected HTTP calls instead of
24+ # using the mocked recordings.
25+
26+ return [retrieve_uri (uri ) for uri in uris ]
You can’t perform that action at this time.
0 commit comments