-
Notifications
You must be signed in to change notification settings - Fork 55
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
windows py38 and py39 #139
base: main
Are you sure you want to change the base?
Conversation
# patch c.f. tornadoweb/tornado#2608 (comment) asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # python-3.8.x
the type ignore should be made os dependent
Patch asyncio
# requires = | ||
# tox-factor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left-over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left-over?
Yes, this can go
# requires =
# tox-factor
subprocess._cleanup = _cleanup # type: ignore | ||
subprocess._active = None # type:ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy will raise an error for py39 since these methods aren't implemented anymore.
platform = | ||
win: win|msys | ||
linux: linux|darwin | ||
allowlist_externals = | ||
win: powershell | ||
linux: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wildcard usage like nbclient*.whl
is quite difficult to get into windows, even the gh windows runners have the bash installed. It's all about what is replaced within the quotes. So, what I did here was to distangle Windows and POSIX like systems. tox
will check the platform via sys.platform
and select the correct environment. Via that it also runs, e.g., on Windows 10 systems, where there is not a bash installed in general.
It might be a bit blown up to get this one whl
file into pip install
but I haven't found another way.
linux: bash -c 'python -m pip install -U --force-reinstall {distdir}/nbclient*.whl' | ||
linux: bash -c 'python -m pip install -U --force-reinstall --no-deps {distdir}/nbclient*.tar.gz' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to use /bin/bash
anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bash should be in the path. Even cleaner would be to use just sh
linux: sh -c 'python -m pip install -U --force-reinstall {distdir}/nbclient*.whl'
etc.
Thanks a lot @juhuebner, I made some comments mainly for me to understand better your changes. |
python version check >= (3, 8) Co-authored-by: David Brochart <[email protected]>
fixes #85, fixes #125
forgot to squash my dev branch ;)
poss.