Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Fix for python 3.7-3.9 #426

Open
wants to merge 5 commits into
base: development
Choose a base branch
from
Open

Conversation

hwms
Copy link

@hwms hwms commented Feb 23, 2020

This import now works on my python 3.9:
from hyper.contrib import HTTP20Adapter

I also needed to:
pip install git+https://github.com/python-hyper/hyper-h2.git -U
pip install git+https://github.com/python-hyper/hyperframe.git -U

which told me that:
ERROR: hyper 0.8.0.dev0 has requirement h2!=2.5.0,<3.0,>=2.4, but you'll have h2 3.2.0 which is incompatible.
ERROR: hyper 0.8.0.dev0 has requirement hyperframe<4.0,>=3.2, but you'll have hyperframe 5.2.0 which is incompatible.

But it works now (at least for me):

Python 3.9.0a3+ (heads/master:1b55b65638, Feb 17 2020, 12:08:41) 
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> import logging;logging.basicConfig();logging.getLogger().setLevel(logging.DEBUG)
>>> import http.client;http.client.HTTPConnection.debuglevel = 1
>>> s = requests.Session()
>>> r = s.get('https://httpbin.org/get')
...
reply: 'HTTP/1.1 200 OK\r\n'
...
>>> from hyper.contrib import HTTP20Adapter
>>> s.mount('https://', HTTP20Adapter())
>>> r = s.get('https://httpbin.org/get')
DEBUG:hyper.http11.connection:Selected protocol: h2
...

Maybe adding logging will help people in the quickstart to see more than a status code, too.

@hwms hwms closed this Feb 23, 2020
@hwms hwms reopened this Feb 23, 2020
@hwms hwms changed the title Fix collections.abc imports for python 3.7. Fix for python 3.7-3.9 Feb 23, 2020
@hwms hwms closed this Feb 23, 2020
@hwms hwms reopened this Feb 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant