Skip to content

Commit c22aadd

Browse files
committed
Merge remote-tracking branch 'origin/master' into mypy
2 parents d7bc9dc + 049acdb commit c22aadd

File tree

6 files changed

+40
-14
lines changed

6 files changed

+40
-14
lines changed

.github/workflows/typeguard.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: typeguard
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
coverage:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Set up Python ${{ matrix.python-version }}
12+
uses: actions/setup-python@v2
13+
with:
14+
python-version: "3.10"
15+
- name: Install dependencies
16+
run: pip install nox
17+
- name: Test with nox
18+
run: nox -e pytest_typeguard

adaptive/runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import itertools
77
import pickle
88
import platform
9+
import sys
910
import time
1011
import traceback
1112
import warnings
@@ -759,9 +760,8 @@ async def _run(self) -> None:
759760
try:
760761
while not self.goal(self.learner):
761762
futures = self._get_futures()
762-
done, _ = await asyncio.wait(
763-
futures, return_when=first_completed, loop=self.ioloop
764-
)
763+
kw = {"loop": self.ioloop} if sys.version_info[:2] < (3, 10) else {}
764+
done, _ = await asyncio.wait(futures, return_when=first_completed, **kw)
765765
self._process_futures(done)
766766
finally:
767767
remaining = self._remove_unfinished()

adaptive/tests/test_runner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def test_stop_after_goal():
106106
OPERATING_SYSTEM == "Windows" and sys.version_info >= (3, 7),
107107
reason="Gets stuck in CI",
108108
)
109+
@pytest.mark.skipif(OPERATING_SYSTEM == "Darwin", reason="Cannot stop ipcluster")
109110
def test_ipyparallel_executor():
110111
from ipyparallel import Client
111112

docs/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ dependencies:
2121
- m2r2=0.3.1
2222
- sphinx_rtd_theme=1.0.0
2323
- ffmpeg=4.3.2
24+
- cloudpickle
25+
- loky

noxfile.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
55
@nox.parametrize("all_deps", [True, False])
66
def pytest(session, all_deps):
7-
if all_deps:
8-
session.install(".[testing,other]")
9-
else:
10-
session.install(".[testing]")
11-
7+
session.install(".[testing,other]" if all_deps else ".[testing]")
128
session.run("coverage", "erase")
9+
session.run("pytest")
10+
1311

14-
if session.python == "3.10":
15-
session.run("pytest", "--typeguard-packages=adaptive")
16-
else:
17-
session.run("pytest")
12+
@nox.session(python="3.10")
13+
def pytest_typeguard(session):
14+
session.install(".[testing,other]")
15+
session.run("coverage", "erase")
16+
session.run("pytest", "--typeguard-packages=adaptive")
1817

1918

2019
@nox.session(python="3.7")

readthedocs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-20.04"
5+
tools:
6+
python: "mambaforge-4.10"
7+
18
conda:
2-
file: docs/environment.yml
3-
formats: []
9+
environment: docs/environment.yml

0 commit comments

Comments
 (0)