Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for python 3.7-3.9 #426

Open
wants to merge 5 commits into
base: development
from
Open

Fix for python 3.7-3.9 #426

wants to merge 5 commits into from

Conversation

@hwms
Copy link

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 force-pushed the hwms:development branch from 118549a to 47c520b Feb 23, 2020
hwms added 2 commits Feb 23, 2020
@hwms hwms force-pushed the hwms:development branch from 718b97c to 2fc8b64 Feb 23, 2020
But travis only has pytest 4.3.1.
@hwms hwms closed this Feb 23, 2020
@hwms hwms reopened this Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.