Skip to content

Commit 4763c54

Browse files
authored
Merge pull request #82 from rdeits/rd/fix-win-py8
Fix for Python 3.8 on Windows
2 parents 7e22282 + 1aebe5a commit 4763c54

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/CI.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610
build:
711

8-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
913
strategy:
1014
matrix:
1115
python-version: [3.6, 3.7, 3.8]
16+
os: [ubuntu-latest, windows-latest]
1217

1318
steps:
1419
- uses: actions/checkout@v2

src/meshcat/servers/zmqserver.py

+7
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ def main():
359359
import argparse
360360
import sys
361361
import webbrowser
362+
import platform
363+
import asyncio
364+
365+
# Fix asyncio configuration on Windows for Python 3.8 and above.
366+
# Workaround for https://github.com/tornadoweb/tornado/issues/2608
367+
if sys.version_info >= (3, 8) and platform.system() == 'Windows':
368+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
362369

363370
parser = argparse.ArgumentParser(description="Serve the MeshCat HTML files and listen for ZeroMQ commands")
364371
parser.add_argument('--zmq-url', '-z', type=str, nargs="?", default=None)

0 commit comments

Comments
 (0)