Skip to content

Commit

Permalink
fix: Add support for py310 (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Oct 5, 2021
1 parent 4f5ffa8 commit c1b4510
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,32 @@ jobs:
# - windows-latest
# - windows-2016
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
include:
- os: ubuntu-latest
python-version: 3.6
python-version: "3.6"
tox_env: py36
- os: ubuntu-latest
python-version: 3.7
python-version: "3.7"
tox_env: py37
- os: ubuntu-latest
python-version: 3.8
python-version: "3.8"
tox_env: py38
- os: ubuntu-latest
python-version: 3.9
python-version: "3.9"
tox_env: py39
- os: ubuntu-latest
python-version: "3.10"
tox_env: py310
- os: macOS-latest
python-version: 3.6
python-version: "3.6"
tox_env: py36
- os: macOS-latest
python-version: 3.9
python-version: "3.10"
tox_env: py39

env:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

Topic :: System :: Systems Administration
Topic :: Utilities
Expand Down
4 changes: 2 additions & 2 deletions src/subprocess_tee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def tee_func(line: bytes, sink: List[str], pipe: Optional[Any]) -> None:
else:
print(line_str)

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

loop = asyncio.get_event_loop()
loop = asyncio.get_event_loop_policy().get_event_loop()
result = loop.run_until_complete(_stream_subprocess(cmd, **kwargs))
# we restore original args to mimic subproces.run()
result.args = args
Expand Down

0 comments on commit c1b4510

Please sign in to comment.