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

add a work-around to make the examples work on win+py3.6/3.7 #106

Merged
merged 8 commits into from
Oct 23, 2020

Conversation

shadeofblue
Copy link
Contributor

@shadeofblue shadeofblue commented Oct 22, 2020

backwards-compatible port of #105 which only fixes the examples but doesn't make the work-around part of the library

@shadeofblue shadeofblue requested a review from azawlocki October 22, 2020 09:30
Copy link
Contributor

@azawlocki azawlocki left a comment

Choose a reason for hiding this comment

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

Please at least use a more descriptive name for the new function.

@@ -86,6 +86,8 @@ async def worker(ctx: WorkContext, tasks):
parser.set_defaults(log_file="blender-yapapi.log")
args = parser.parse_args()

utils.asyncio_fix()

enable_default_logger(log_file=args.log_file)
loop = asyncio.get_event_loop()
Copy link
Contributor

Choose a reason for hiding this comment

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

As a quick fix we may also consider:

if sys.platform == 'win32' and sys.version_info < (3, 8):
    asyncio.set_event_loop(asyncio.ProactorEventLoop())

instead of calling utils.asyncio_fix()

Copy link
Contributor

Choose a reason for hiding this comment

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

If we decide to go with a separate function in utils, I think the name needs to be improved to be more descriptive (e.g.: asyncio_windows_fix or even windows_event_loop_fix)

@azawlocki azawlocki requested a review from filipgolem October 23, 2020 10:10
@@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"

[tool.poetry]
name = "yapapi"
version = "0.3.0"
version = "0.3.1-alpha.0"
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 release it as 0.3.1.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, let's make pre-release first for 0.3.1-alpha.0, then bump the version to 0.3.1 and do a release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@filipgolem @azawlocki actually, if, despite my opinion to the contrary, we didn't update the library itself, imvho, it didn't even require a release ...

@azawlocki azawlocki self-requested a review October 23, 2020 13:04
@azawlocki azawlocki merged commit 96f841b into b0.3 Oct 23, 2020
@azawlocki azawlocki deleted the 0.3-winpy3.6-fix branch October 23, 2020 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants