Skip to content

Commit 90f3032

Browse files
authored
Merge pull request #601 from nipype/ci/test-python-3.11
FIX: Enable testing with Python 3.11
2 parents aabee8e + 4bf6ca1 commit 90f3032

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/testpydra.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [macos-latest, ubuntu-latest, windows-latest]
19-
python-version: [3.7, 3.8, 3.9, "3.10"]
19+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
20+
exclude:
21+
- os: 'windows-latest'
22+
python-version: '3.11'
2023
fail-fast: false
2124
runs-on: ${{ matrix.os }}
2225

@@ -30,7 +33,9 @@ jobs:
3033
with:
3134
python-version: ${{ matrix.python-version }}
3235
- name: Update build tools
33-
run: python -m pip install --upgrade pip build
36+
run: |
37+
python -m pip install --upgrade pip
38+
python -m pip install build wheel
3439
3540
- name: Build pydra
3641
run: python -m build

pydra/engine/workers.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ async def fetch_finished(self, futures):
5858
done = set()
5959
try:
6060
done, pending = await asyncio.wait(
61-
futures, return_when=asyncio.FIRST_COMPLETED
61+
[
62+
asyncio.create_task(f) if not isinstance(f, asyncio.Task) else f
63+
for f in futures
64+
],
65+
return_when=asyncio.FIRST_COMPLETED,
6266
)
6367
except ValueError:
6468
# nothing pending!
@@ -105,7 +109,11 @@ async def fetch_finished(self, futures):
105109
try:
106110
self._jobs += len(futures)
107111
done, pending = await asyncio.wait(
108-
futures, return_when=asyncio.FIRST_COMPLETED
112+
[
113+
asyncio.create_task(f) if not isinstance(f, asyncio.Task) else f
114+
for f in futures
115+
],
116+
return_when=asyncio.FIRST_COMPLETED,
109117
)
110118
except ValueError:
111119
# nothing pending!

0 commit comments

Comments
 (0)