-
-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix OSError: [WinError 87] The parameter is incorrect (#1454)
* Fix OSError: [WinError 87] The parameter is incorrect * Added use_subprocess to be more generic * Black * Revert "Added use_subprocess to be more generic" This reverts commit d1b5f83 * Removed reload warning * Min diff, not sure where this came from * Min diff 2 * Redo use_subprocess
- Loading branch information
Showing
5 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
def auto_loop_setup(reload: bool = False) -> None: | ||
def auto_loop_setup(use_subprocess: bool = False) -> None: | ||
try: | ||
import uvloop # noqa | ||
except ImportError: # pragma: no cover | ||
from uvicorn.loops.asyncio import asyncio_setup as loop_setup | ||
|
||
loop_setup(reload=reload) | ||
loop_setup(use_subprocess=use_subprocess) | ||
else: # pragma: no cover | ||
from uvicorn.loops.uvloop import uvloop_setup | ||
|
||
uvloop_setup(reload=reload) | ||
uvloop_setup(use_subprocess=use_subprocess) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters