File: _asyncio_compat.py

package info (click to toggle)
python-ws4py 0.6.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 676 kB
  • sloc: python: 4,552; makefile: 137; javascript: 96
file content (9 lines) | stat: -rw-r--r-- 249 bytes parent folder | download
1
2
3
4
5
6
7
8
9
"""Provide compatibility over different versions of asyncio."""

import asyncio

if hasattr(asyncio, "async"):
    # Compatibility for Python 3.3 and older
    ensure_future = getattr(asyncio, "async")
else:
    ensure_future = asyncio.ensure_future