Added missing stacklevel warning parameter. (#471)

This commit is contained in:
Carlton Gibson 2023-04-14 14:53:12 +02:00 committed by GitHub
parent b0204165b1
commit 077dd81809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@ if current_reactor is not None:
+ "you can fix this warning by importing daphne.server early in your codebase or "
+ "finding the package that imports Twisted and importing it later on.",
UserWarning,
stacklevel=2,
)
del sys.modules["twisted.internet.reactor"]
asyncioreactor.install(twisted_loop)