Skip to main content

Patch ssl.match_hostname for Unicode(inda) domains support

Project description

info:

Patch ssl.match_hostname for Unicode(inda) domains support

https://travis-ci.org/wikibusiness/idna_ssl.svg?branch=master https://img.shields.io/pypi/v/idna_ssl.svg https://codecov.io/gh/wikibusiness/idna_ssl/branch/master/graph/badge.svg

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 not fixed yet (by November 2 2017) in python itself

Project details


Download files

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

Source Distribution

idna_ssl-0.0.1.tar.gz (3.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page