-
-
Notifications
You must be signed in to change notification settings - Fork 747
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 support #82
Comments
Certainly the latest version (0.2) should, as there's no platform-specific stuff in there. I don't know if there's any issues or not prior to that (or with 0.2 running under gunicorn) but happy to hear of any issues if you're seeing them |
I have try to run under windows, there some stuff want to modify:
|
Okay, that's easy enough to do: See also MagicStack/uvloop#14 and MagicStack/uvloop#62
Okay, I've disable them in #122 It's possible that we ought to start a new thread on windows specifically to catch signals. |
Released as 0.2.10. It'd be hugely helpful for anyone running on windows to try...
(Use the basic example app in the README to keep everything else simple) And see if:
|
Hey @tomchristie, the installation on Windows fails because I found an ugly workaround of installing Test resultsI tested it on 64-bit Windows 10 Pro 1803 and Anaconda Python 3.6.5
Yes, it works pretty well
Yes, it terminates on Ctrl+C, not without an exception though:
Yes, it is visible in Task Manager and I was able to terminate it from there |
Wonderful, thanks so much! 😎😎😎 So ‘pip install uvicorn’ raises an error then? The Ctrl-C exception looks easy enough to resolve. And thanks again, that’s super-helpful! |
One other installation issue: Currently Getting past that (I cloned and manually deleted the emoji), you’ll hit the uvloop support problem mentioned previously:
|
Some additional information. Running with Python 3.7, httptools does not require me the whole Visual Studio to build. Minimal VS 2017 Build Tools setup (toolkit v14.1, CRT SDK, and Windows 10 SDK) is enough for me to get it working. I didn’t test, but imagine the same would apply for 3.6 (which also supports VSBT 14.1) and 3.5 (VSBT 14.0 should work here). Windows detection is straightforward with modern PEP 508 support. A simple change to the "uvloop; platform_system!='Windows'", And it installs for me 😃 I am not sure what’s the actual requirement of uvloop, but maybe |
I'm glad I could help! |
I’d like the behaviour to be that it’s used by default, but falls back to asyncio gracefully. We’re very close to that now - just need a few tweaks to |
Okay, I think we should be looking much better now! 👍 Version 0.2.13 released, with fixes from #130 Anyone able to give it a whirl? 😄 |
I would strongly recommend using PEP 508 environment markers to specify dependencies instead. This allows for the same effect (in relatively recent Setuptools and pip), prevents the packager from needing to maintain platform-specific artifacts (e.g. wheels), and has immensely better compatibility with the new trend of locking-aware dependency management tools like Pipenv and Poetry. The following should be functionality-wise equivalent to the if-elif-else clause: requirements = [
'click',
'h11',
'websockets>=6.0',
"httptools; platform_system != 'Windows' and 'CYGWIN' not in platform_system and platform_python_implementation != 'PyPy'",
"uvloop; platform_system != 'Windows' and 'CYGWIN' not in platform_system and platform_python_implementation != 'PyPy'",
] |
Presumably things are problematic ATM, as we're importing |
@uranusjr Okay, I could be up for that. Any idea which versions of pip will support it, or if there's likely any other compatibility issues it could introduce? |
The markers were introduced in Setuptools 36.2.0, released 2017-07-13. This version is officially bundled in ensurepip only after 3.6.5, but all major package managers have picked it up long before that. Syntax support shouldn’t be a problem as long as the user updates setuptools (or pip, which implies a setuptools update) in a remotely regular basis. (And there is little reason not to, since setuptools maintains backward compatibility next to forever.) Practically I have yet to see anyone actually complain about this. |
@uranusjr Okay - Are there any reasonably prominent examples of projects using it? (Just so I can make a call on ubiquity of support) Thanks for all this! |
Treating this as a separate issue, at #135 |
I believe we now have functioning windows support from 0.2.14 onwards. |
Running the example in README gives me the following error:
Didn’t look deep but it seems like a circular import problem? |
I think we do now have windows support properly enabled again. (Also any thoughts on CI services that'd allow me to test against this?) |
Can confirm uvicorn now works out of the package as of 0.2.22 🕺 |
Rad! ✨ |
Can uvicorn support windows?
I am develops in windows, and want to use uvicorn.
The text was updated successfully, but these errors were encountered: