Skip to main content

Patch ssl.match_hostname for Unicode(idna) domains support

Project description

info:Patch ssl.match_hostname for Unicode(idna) domains support


pip install idna-ssl


from idna_ssl import patch_match_hostname  # noqa isort:skip
patch_match_hostname()  # noqa isort:skip

import asyncio

import aiohttp

URL = 'https://цфоут.мвд.рф/news/item/8065038/'

async def main():
    async with aiohttp.ClientSession() as session:
        async with session.get(URL) as response:

loop = asyncio.get_event_loop()


  • Here is 100% backward capability
  • Related aiohttp issue
  • Related Python bug
  • Related Python pull request
  • It is fixed (by January 27 2018) in upcoming Python 3.7, but IDNA2008 is still broken


The library was donated by Ocean S.A.

Thanks to the company for contribution.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for idna_ssl, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size idna-ssl-1.1.0.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page