Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
idna_ssl.egg-info/ | H | 03-May-2022 | - | 82 | 58 | |
LICENSE | H A D | 30-Mar-2022 | 1.1 KiB | 23 | 18 | |
MANIFEST.in | H A D | 30-Mar-2022 | 96 | 5 | 4 | |
PKG-INFO | H A D | 30-Mar-2022 | 2.7 KiB | 82 | 58 | |
README.rst | H A D | 30-Mar-2022 | 1.5 KiB | 61 | 38 | |
idna_ssl.py | H A D | 30-Mar-2022 | 779 | 41 | 25 | |
setup.cfg | H A D | 30-Mar-2022 | 293 | 16 | 11 | |
setup.py | H A D | 30-Mar-2022 | 1.5 KiB | 54 | 42 |
README.rst
1idna-ssl 2======== 3 4:info: Patch ssl.match_hostname for Unicode(idna) domains support 5 6.. image:: https://travis-ci.com/aio-libs/idna-ssl.svg?branch=master 7 :target: https://travis-ci.com/aio-libs/idna-ssl 8 9.. image:: https://img.shields.io/pypi/v/idna_ssl.svg 10 :target: https://pypi.python.org/pypi/idna_ssl 11 12.. image:: https://codecov.io/gh/aio-libs/idna-ssl/branch/master/graph/badge.svg 13 :target: https://codecov.io/gh/aio-libs/idna-ssl 14 15Installation 16------------ 17 18.. code-block:: shell 19 20 pip install idna-ssl 21 22Usage 23----- 24 25.. code-block:: python 26 27 from idna_ssl import patch_match_hostname # noqa isort:skip 28 patch_match_hostname() # noqa isort:skip 29 30 import asyncio 31 32 import aiohttp 33 34 URL = 'https://цфоут.мвд.рф/news/item/8065038/' 35 36 37 async def main(): 38 async with aiohttp.ClientSession() as session: 39 async with session.get(URL) as response: 40 print(response) 41 42 43 loop = asyncio.get_event_loop() 44 loop.run_until_complete(main()) 45 46Motivation 47---------- 48 49* Here is 100% backward capability 50* Related aiohttp `issue <https://github.com/aio-libs/aiohttp/issues/949>`_ 51* Related Python `bug <https://bugs.python.org/issue31872>`_ 52* Related Python `pull request <https://github.com/python/cpython/pull/3462>`_ 53* It is fixed (by January 27 2018) in upcoming Python 3.7, but `IDNA2008 <https://tools.ietf.org/html/rfc5895>`_ is still broken 54 55Thanks 56------ 57 58The library was donated by `Ocean S.A. <https://ocean.io/>`_ 59 60Thanks to the company for contribution. 61