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.

84 lines
2.3 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: idna-ssl
  3. Version: 1.1.0
  4. Summary: Patch ssl.match_hostname for Unicode(idna) domains support
  5. Home-page: https://github.com/aio-libs/idna-ssl
  6. Author: Victor Kovtun
  7. Author-email: hellysmile@gmail.com
  8. License: UNKNOWN
  9. Keywords: ssl,Unicode,idna,match_hostname
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 4 - Beta
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Programming Language :: Python :: 3.3
  17. Classifier: Programming Language :: Python :: 3.4
  18. Classifier: Programming Language :: Python :: 3.5
  19. Classifier: Programming Language :: Python :: 3.6
  20. Classifier: Programming Language :: Python :: 3.7
  21. Requires-Dist: idna (>=2.0)
  22. idna-ssl
  23. ========
  24. :info: Patch ssl.match_hostname for Unicode(idna) domains support
  25. .. image:: https://travis-ci.com/aio-libs/idna-ssl.svg?branch=master
  26. :target: https://travis-ci.com/aio-libs/idna-ssl
  27. .. image:: https://img.shields.io/pypi/v/idna_ssl.svg
  28. :target: https://pypi.python.org/pypi/idna_ssl
  29. .. image:: https://codecov.io/gh/aio-libs/idna-ssl/branch/master/graph/badge.svg
  30. :target: https://codecov.io/gh/aio-libs/idna-ssl
  31. Installation
  32. ------------
  33. .. code-block:: shell
  34. pip install idna-ssl
  35. Usage
  36. -----
  37. .. code-block:: python
  38. from idna_ssl import patch_match_hostname # noqa isort:skip
  39. patch_match_hostname() # noqa isort:skip
  40. import asyncio
  41. import aiohttp
  42. URL = 'https://цфоут.мвд.рф/news/item/8065038/'
  43. async def main():
  44. async with aiohttp.ClientSession() as session:
  45. async with session.get(URL) as response:
  46. print(response)
  47. loop = asyncio.get_event_loop()
  48. loop.run_until_complete(main())
  49. Motivation
  50. ----------
  51. * Here is 100% backward capability
  52. * Related aiohttp `issue <https://github.com/aio-libs/aiohttp/issues/949>`_
  53. * Related Python `bug <https://bugs.python.org/issue31872>`_
  54. * Related Python `pull request <https://github.com/python/cpython/pull/3462>`_
  55. * It is fixed (by January 27 2018) in upcoming Python 3.7, but `IDNA2008 <https://tools.ietf.org/html/rfc5895>`_ is still broken
  56. Thanks
  57. ------
  58. The library was donated by `Ocean S.A. <https://ocean.io/>`_
  59. Thanks to the company for contribution.