Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:PSuarezHernandez:bundlenew:SLE12
saltbundlepy-tornado
test_asyncio.ensure_future_fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File test_asyncio.ensure_future_fix.patch of Package saltbundlepy-tornado
diff -urN a/tornado/test/asyncio_test.py b/tornado/test/asyncio_test.py --- a/tornado/test/asyncio_test.py 2018-01-05 06:07:44.000000000 +0300 +++ b/tornado/test/asyncio_test.py 2022-02-03 15:01:36.703142562 +0300 @@ -43,12 +43,7 @@ # Test that we can yield an asyncio future from a tornado coroutine. # Without 'yield from', we must wrap coroutines in ensure_future, # which was introduced during Python 3.4, deprecating the prior "async". - if hasattr(asyncio, 'ensure_future'): - ensure_future = asyncio.ensure_future - else: - ensure_future = asyncio.async - - x = yield ensure_future( + x = yield asyncio.ensure_future( asyncio.get_event_loop().run_in_executor(None, lambda: 42)) self.assertEqual(x, 42)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor