Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.
/ idna-ssl Public archive

Patch ssl.match_hostname for Unicode(idna) domains support

License

Notifications You must be signed in to change notification settings

aio-libs/idna-ssl

Repository files navigation

idna-ssl

info:Patch ssl.match_hostname for Unicode(idna) domains support
https://travis-ci.com/aio-libs/idna-ssl.svg?branch=master

Installation

pip install idna-ssl

Usage

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:
            print(response)


loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Motivation

  • 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

Thanks

The library was donated by Ocean S.A.

Thanks to the company for contribution.

About

Patch ssl.match_hostname for Unicode(idna) domains support

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages