Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

compatibility.py 758B

1 year ago
123456789101112131415161718192021222324252627282930313233
  1. from __future__ import annotations
  2. import asyncio
  3. import sys
  4. from typing import Any, Dict
  5. __all__ = ["asyncio_timeout", "loop_if_py_lt_38"]
  6. if sys.version_info[:2] >= (3, 8):
  7. def loop_if_py_lt_38(loop: asyncio.AbstractEventLoop) -> Dict[str, Any]:
  8. """
  9. Helper for the removal of the loop argument in Python 3.10.
  10. """
  11. return {}
  12. else:
  13. def loop_if_py_lt_38(loop: asyncio.AbstractEventLoop) -> Dict[str, Any]:
  14. """
  15. Helper for the removal of the loop argument in Python 3.10.
  16. """
  17. return {"loop": loop}
  18. if sys.version_info[:2] >= (3, 11):
  19. from asyncio import timeout as asyncio_timeout # noqa: F401
  20. else:
  21. from .async_timeout import timeout as asyncio_timeout # noqa: F401