Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
Upgrade to httpcore 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie committed Apr 24, 2019
1 parent aed4c6c commit c91d36a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions requests_async/adapters.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import asyncio
import io
import os
import socket
import ssl
import typing
from http.client import _encode
from urllib.parse import urlparse

import h11
import httpcore
import requests
import urllib3

import httpcore

from .cookies import extract_cookies_to_jar
from .exceptions import ConnectionError, ConnectTimeout, ReadTimeout
from .models import Response
Expand Down Expand Up @@ -53,7 +55,7 @@ async def send(
ssl=ssl,
timeout=timeout,
)
except (httpcore.BadResponse, socket.error) as err:
except socket.error as err:
raise ConnectionError(err, request=request)
except httpcore.ConnectTimeout as err:
raise ConnectTimeout(err, request=request)
Expand Down
3 changes: 2 additions & 1 deletion requests_async/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
import typing
from urllib.parse import unquote, urljoin, urlsplit

import httpcore
import requests

import httpcore

from .adapters import HTTPAdapter
from .sessions import Session

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
httpcore==0.1.*
requests
httpcore==0.2.*
requests==2.*

# Testing
black
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_packages(package):
author_email="[email protected]",
packages=get_packages("requests_async"),
data_files=[("", ["LICENSE.md"])],
install_requires=["requests", "httpcore==0.1.*"],
install_requires=["requests==2.*", "httpcore==0.2.*"],
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
Expand Down

0 comments on commit c91d36a

Please sign in to comment.