Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide a fix for asyncio on Windows + Python pre-3.8 #105

Merged
merged 15 commits into from
Nov 16, 2020
Merged

Conversation

shadeofblue
Copy link
Contributor

@shadeofblue shadeofblue commented Oct 22, 2020

  • test
  • enable github actions test run on Python 3.9

fixes: #93

+ test
+ enable github actions test run on Python 3.9
examples/blender/blender.py Outdated Show resolved Hide resolved
Comment on lines 27 to 32
if sys.platform == "win32":

class _WindowsEventPolicy(asyncio.events.BaseDefaultEventLoopPolicy):
_loop_factory = asyncio.windows_events.ProactorEventLoop

asyncio.set_event_loop_policy(_WindowsEventPolicy())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just move those statements to the module level, outside any function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then I'd need more "if sys.platform" etc since this class is not valid under non-Windows platforms ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, unless you mean the same as above - then, again, I'm unsure if this is a good idea to force that upon people ...

tests/test_yapapi.py Outdated Show resolved Hide resolved
@shadeofblue shadeofblue merged commit 78cbad1 into master Nov 16, 2020
@shadeofblue shadeofblue deleted the winpy3.6-fix branch November 16, 2020 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blender.py throws an exception on Python 3.6 / 3.7"
5 participants