METADATA 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Metadata-Version: 2.0
  2. Name: backports-abc
  3. Version: 0.5
  4. Summary: A backport of recent additions to the 'collections.abc' module.
  5. Home-page: https://github.com/cython/backports_abc
  6. Author: Stefan Behnel et al.
  7. Author-email: cython-devel@python.org
  8. License: UNKNOWN
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: Python Software Foundation License
  13. Classifier: Operating System :: OS Independent
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 2
  16. Classifier: Programming Language :: Python :: 3
  17. =============
  18. ABC-Backports
  19. =============
  20. Usage:
  21. .. code-block:: python
  22. try:
  23. # ABCs live in "collections.abc" in Python >= 3.3
  24. from collections.abc import Coroutine, Generator
  25. except ImportError:
  26. # fall back to import from "backports_abc"
  27. from backports_abc import Coroutine, Generator
  28. You can also install the ABCs into the stdlib by calling the ``patch()``
  29. function:
  30. .. code-block:: python
  31. import backports_abc
  32. backports_abc.patch()
  33. try:
  34. # ABCs live in "collections.abc" in Python >= 3.3
  35. from collections.abc import Coroutine, Generator
  36. except ImportError:
  37. # fall back to import from "collections" in Python <= 3.2
  38. from backports_abc import Coroutine, Generator
  39. Currently, ``patch()`` provides the following names if missing:
  40. * ``collections.abc.Generator``
  41. * ``collections.abc.Awaitable``
  42. * ``collections.abc.Coroutine``
  43. * ``inspect.isawaitable(obj)``
  44. All of them are also available directly from the ``backports_abc``
  45. module namespace.
  46. In Python 2.x and Python 3.2, it patches the ``collections`` module
  47. instead of the ``collections.abc`` module. Any names that are already
  48. available when importing this module will not be overwritten.
  49. The names that were previously patched by ``patch()`` can be queried
  50. through the mapping in ``backports_abc.PATCHED``.
  51. Changelog
  52. =========
  53. 0.5 (2016-11-12)
  54. ----------------
  55. * support old-style (mro-missing) classes
  56. 0.4 (2015-09-14)
  57. ----------------
  58. * direct wheel building support
  59. * make all names available at the module level instead of requiring patching
  60. 0.3 (2015-07-03)
  61. ----------------
  62. * removed patching of ``inspect.iscoroutine()`` as it is not ABC based
  63. 0.2 (2015-07-03)
  64. ----------------
  65. * require explicit ``backports_abc.patch()`` call to do the patching
  66. (avoids side-effects on import and allows future configuration)
  67. * provide access to patched names through global ``PATCHED`` dict
  68. * add ABC based implementations of inspect.iscoroutine() and
  69. inspect.isawaitable()
  70. 0.1 (2015-06-24)
  71. ----------------
  72. * initial public release
  73. * provided ABCs: Generator, Coroutine, Awaitable