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

https://travis-ci.com/aio-libs/idna-ssl.svg?branch=master https://img.shields.io/pypi/v/idna_ssl.svg https://codecov.io/gh/aio-libs/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 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.

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-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file idna-ssl-1.1.0.tar.gz.

File metadata

  • Download URL: idna-ssl-1.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for idna-ssl-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a933e3bb13da54383f9e8f35dc4f9cb9eb9b3b78c6b36f311254d6d0d92c6c7c
MD5 dd44ec53bac36e68446766fd8d3835bd
BLAKE2b-256 460307c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page