Skip to content

Commit c1b4510

Browse files
authored
fix: Add support for py310 (#49)
1 parent 4f5ffa8 commit c1b4510

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/workflows/tox.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,32 @@ jobs:
107107
# - windows-latest
108108
# - windows-2016
109109
python-version:
110-
- 3.6
111-
- 3.7
112-
- 3.8
113-
- 3.9
110+
- "3.6"
111+
- "3.7"
112+
- "3.8"
113+
- "3.9"
114+
- "3.10"
114115
include:
115116
- os: ubuntu-latest
116-
python-version: 3.6
117+
python-version: "3.6"
117118
tox_env: py36
118119
- os: ubuntu-latest
119-
python-version: 3.7
120+
python-version: "3.7"
120121
tox_env: py37
121122
- os: ubuntu-latest
122-
python-version: 3.8
123+
python-version: "3.8"
123124
tox_env: py38
124125
- os: ubuntu-latest
125-
python-version: 3.9
126+
python-version: "3.9"
126127
tox_env: py39
128+
- os: ubuntu-latest
129+
python-version: "3.10"
130+
tox_env: py310
127131
- os: macOS-latest
128-
python-version: 3.6
132+
python-version: "3.6"
129133
tox_env: py36
130134
- os: macOS-latest
131-
python-version: 3.9
135+
python-version: "3.10"
132136
tox_env: py39
133137

134138
env:

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ classifiers =
4040
Programming Language :: Python :: 3.7
4141
Programming Language :: Python :: 3.8
4242
Programming Language :: Python :: 3.9
43+
Programming Language :: Python :: 3.10
4344

4445
Topic :: System :: Systems Administration
4546
Topic :: Utilities

src/subprocess_tee/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def tee_func(line: bytes, sink: List[str], pipe: Optional[Any]) -> None:
8080
else:
8181
print(line_str)
8282

83-
loop = asyncio.get_event_loop()
83+
loop = asyncio.get_event_loop_policy().get_event_loop()
8484
tasks = []
8585
if process.stdout:
8686
tasks.append(
@@ -135,7 +135,7 @@ def run(args: Union[str, List[str]], **kwargs: Any) -> CompletedProcess:
135135
if kwargs.get("echo", False):
136136
print(f"COMMAND: {cmd}")
137137

138-
loop = asyncio.get_event_loop()
138+
loop = asyncio.get_event_loop_policy().get_event_loop()
139139
result = loop.run_until_complete(_stream_subprocess(cmd, **kwargs))
140140
# we restore original args to mimic subproces.run()
141141
result.args = args

0 commit comments

Comments
 (0)