Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

106 рядки
2.5 KiB

  1. Metadata-Version: 2.1
  2. Name: contextvars
  3. Version: 2.4
  4. Summary: PEP 567 Backport
  5. Home-page: http://github.com/MagicStack/contextvars
  6. Author: MagicStack Inc
  7. Author-email: hello@magic.io
  8. License: Apache License, Version 2.0
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 3 - Alpha
  11. Classifier: Programming Language :: Python :: 3 :: Only
  12. Classifier: Programming Language :: Python :: 3.6
  13. Classifier: Programming Language :: Python :: 3.5
  14. Classifier: Operating System :: POSIX
  15. Classifier: Operating System :: MacOS :: MacOS X
  16. Classifier: Operating System :: Microsoft :: Windows
  17. Classifier: License :: OSI Approved :: Apache Software License
  18. Classifier: Intended Audience :: Developers
  19. Provides: contextvars
  20. Requires-Dist: immutables (>=0.9)
  21. .. image:: https://travis-ci.org/MagicStack/contextvars.svg?branch=master
  22. :target: https://travis-ci.org/MagicStack/contextvars
  23. PEP 567 Backport
  24. ================
  25. This package implements a backport of Python 3.7 ``contextvars``
  26. module (see PEP 567) for Python 3.6.
  27. **Important:** at this moment this package does not provide an
  28. asyncio event loop with PEP 567 support yet. Stay tuned for updates.
  29. Original "contextvars" Package
  30. ==============================
  31. This package replaces the old "contextvars" PyPI package which
  32. repository is available `here <https://github.com/gawen/contextvars>`_.
  33. Documentation
  34. =============
  35. Read the official ``contextvars`` module documentation here:
  36. https://docs.python.org/3.7/library/contextvars.html
  37. `PEP 567 <https://www.python.org/dev/peps/pep-0567/>`_ also provides
  38. a comprehensive overview of the API and explains all design choices.
  39. Installation
  40. ============
  41. .. code-block:: bash
  42. $ pip install contextvars
  43. Usage
  44. =====
  45. .. code-block:: python
  46. import contextvars
  47. my_var = contextvars.ContextVar('my_var')
  48. # ...
  49. Listing as a Dependency
  50. =======================
  51. The good news is that the standard library always takes the
  52. precedence over site packages, so even if a local ``contextvars``
  53. module is installed, the one from the standard library will be used.
  54. Therefore you can simply list "contextvars" in your
  55. ``requirements.txt`` or ``setup.py`` files.
  56. Another option is to use `"platform specific dependencies"
  57. <http://setuptools.readthedocs.io/en/latest/setuptools.html\
  58. #declaring-platform-specific-dependencies>`_ setuptools feature:
  59. .. code-block:: python
  60. import setuptools
  61. setuptools.setup(
  62. name="Project",
  63. ...
  64. install_requires=[
  65. 'contextvars;python_version<"3.7"'
  66. ]
  67. )
  68. License
  69. =======
  70. Apache 2.0.