Skip to content

Commit

Permalink
Merge pull request #601 from nipype/ci/test-python-3.11
Browse files Browse the repository at this point in the history
FIX: Enable testing with Python 3.11
  • Loading branch information
effigies authored Nov 29, 2022
2 parents aabee8e + 4bf6ca1 commit 90f3032
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/testpydra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
exclude:
- os: 'windows-latest'
python-version: '3.11'
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -30,7 +33,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Update build tools
run: python -m pip install --upgrade pip build
run: |
python -m pip install --upgrade pip
python -m pip install build wheel
- name: Build pydra
run: python -m build
Expand Down
12 changes: 10 additions & 2 deletions pydra/engine/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ async def fetch_finished(self, futures):
done = set()
try:
done, pending = await asyncio.wait(
futures, return_when=asyncio.FIRST_COMPLETED
[
asyncio.create_task(f) if not isinstance(f, asyncio.Task) else f
for f in futures
],
return_when=asyncio.FIRST_COMPLETED,
)
except ValueError:
# nothing pending!
Expand Down Expand Up @@ -105,7 +109,11 @@ async def fetch_finished(self, futures):
try:
self._jobs += len(futures)
done, pending = await asyncio.wait(
futures, return_when=asyncio.FIRST_COMPLETED
[
asyncio.create_task(f) if not isinstance(f, asyncio.Task) else f
for f in futures
],
return_when=asyncio.FIRST_COMPLETED,
)
except ValueError:
# nothing pending!
Expand Down

0 comments on commit 90f3032

Please sign in to comment.