Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-aiohttp-socks for 
openSUSE:Factory checked in at 2021-02-23 20:21:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aiohttp-socks (Old)
 and      /work/SRC/openSUSE:Factory/.python-aiohttp-socks.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-aiohttp-socks"

Tue Feb 23 20:21:33 2021 rev:3 rq:874461 version:0.5.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-aiohttp-socks/python-aiohttp-socks.changes    
    2020-01-17 16:08:37.516531957 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-aiohttp-socks.new.2378/python-aiohttp-socks.changes
      2021-02-23 20:23:06.323798954 +0100
@@ -1,0 +2,13 @@
+Tue Feb 23 03:56:05 UTC 2021 - Steve Kowalik <[email protected]>
+
+- Update to 0.5.5:
+  * Fix asyncio DeprecationWarning: The loop argument is deprecated
+  * Make deprecated API (SocksConnector etc) available again
+  * Misc fixes, remove deprecated API (SocksConnector etc)
+  * Fix cancellation handling
+  * Improve timeouts handling
+  * First use ipv4 when resolving hostnames
+  * Change the default value of the family parameter to AF_UNSPEC
+  * Make it compatible with aiohttp 2.x again 
+
+-------------------------------------------------------------------

Old:
----
  aiohttp_socks-0.3.4.tar.gz

New:
----
  aiohttp_socks-0.5.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-aiohttp-socks.spec ++++++
--- /var/tmp/diff_new_pack.jNxQkA/_old  2021-02-23 20:23:06.795799372 +0100
+++ /var/tmp/diff_new_pack.jNxQkA/_new  2021-02-23 20:23:06.795799372 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-aiohttp-socks
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,10 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-aiohttp-socks
-Version:        0.3.4
+Version:        0.5.5
 Release:        0
 Summary:        SOCKS proxy connector for aiohttp
 License:        Apache-2.0
-Group:          Development/Languages/Python
 URL:            https://github.com/romis2012/aiohttp-socks
 Source:         
https://files.pythonhosted.org/packages/source/a/aiohttp_socks/aiohttp_socks-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}

++++++ aiohttp_socks-0.3.4.tar.gz -> aiohttp_socks-0.5.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/PKG-INFO 
new/aiohttp_socks-0.5.5/PKG-INFO
--- old/aiohttp_socks-0.3.4/PKG-INFO    2020-01-11 13:30:02.000000000 +0100
+++ new/aiohttp_socks-0.5.5/PKG-INFO    2020-09-22 09:58:19.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: aiohttp_socks
-Version: 0.3.4
+Version: 0.5.5
 Summary: Proxy connector for aiohttp
 Home-page: https://github.com/romis2012/aiohttp-socks
 Author: Roman Snegirev
@@ -12,12 +12,15 @@
         [![Coverage 
Status](https://coveralls.io/repos/github/romis2012/aiohttp-socks/badge.svg?branch=master&_=x)](https://coveralls.io/github/romis2012/aiohttp-socks?branch=master)
         [![PyPI 
version](https://badge.fury.io/py/aiohttp-socks.svg)](https://badge.fury.io/py/aiohttp-socks)
         
-        Proxy connector for [aiohttp](https://github.com/aio-libs/aiohttp). 
-        SOCKS4(a), SOCKS5, HTTP (tunneling), Proxy chains are supported.
+        The `aiohttp-socks` package provides a proxy connector for 
[aiohttp](https://github.com/aio-libs/aiohttp). 
+        Supports SOCKS4(a), SOCKS5, HTTP (tunneling) as well as Proxy chains.
+        It uses [python-socks](https://github.com/romis2012/python-socks) for 
core proxy functionality.
+        
         
         ## Requirements
-        - Python >= 3.5.3
+        - Python >= 3.6
         - aiohttp >= 2.3.2
+        - python-socks[asyncio] >= 1.0.1
         
         ## Installation
         ```
@@ -33,8 +36,6 @@
         
         
         async def fetch(url):
-            # We have added http proxy support, so SocksConnector has been 
deprecated
-            # connector = 
SocksConnector.from_url('socks5://user:[email protected]:1080')
             connector = 
ProxyConnector.from_url('socks5://user:[email protected]:1080')
             
             ### or use ProxyConnector constructor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/README.md 
new/aiohttp_socks-0.5.5/README.md
--- old/aiohttp_socks-0.3.4/README.md   2019-12-23 09:27:52.000000000 +0100
+++ new/aiohttp_socks-0.5.5/README.md   2020-09-20 15:45:02.000000000 +0200
@@ -4,12 +4,15 @@
 [![Coverage 
Status](https://coveralls.io/repos/github/romis2012/aiohttp-socks/badge.svg?branch=master&_=x)](https://coveralls.io/github/romis2012/aiohttp-socks?branch=master)
 [![PyPI 
version](https://badge.fury.io/py/aiohttp-socks.svg)](https://badge.fury.io/py/aiohttp-socks)
 
-Proxy connector for [aiohttp](https://github.com/aio-libs/aiohttp). 
-SOCKS4(a), SOCKS5, HTTP (tunneling), Proxy chains are supported.
+The `aiohttp-socks` package provides a proxy connector for 
[aiohttp](https://github.com/aio-libs/aiohttp). 
+Supports SOCKS4(a), SOCKS5, HTTP (tunneling) as well as Proxy chains.
+It uses [python-socks](https://github.com/romis2012/python-socks) for core 
proxy functionality.
+
 
 ## Requirements
-- Python >= 3.5.3
+- Python >= 3.6
 - aiohttp >= 2.3.2
+- python-socks[asyncio] >= 1.0.1
 
 ## Installation
 ```
@@ -25,8 +28,6 @@
 
 
 async def fetch(url):
-    # We have added http proxy support, so SocksConnector has been deprecated
-    # connector = 
SocksConnector.from_url('socks5://user:[email protected]:1080')
     connector = 
ProxyConnector.from_url('socks5://user:[email protected]:1080')
     
     ### or use ProxyConnector constructor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/__init__.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/__init__.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/__init__.py   2020-01-11 
13:22:42.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/__init__.py   2020-09-22 
09:53:59.000000000 +0200
@@ -1,18 +1,42 @@
-from .proxy import SocksVer, ProxyType
-from .connector import (
-    SocksConnector, ProxyConnector,
-    ChainProxyConnector, ProxyInfo
-)
-from .utils import open_connection, create_connection
-from .proxy.errors import (
-    ProxyError, ProxyConnectionError,
-    SocksError, SocksConnectionError,
-)
-
-__version__ = '0.3.4'
-
-__all__ = ('SocksConnector', 'ProxyConnector', 'ChainProxyConnector',
-           'ProxyInfo', 'SocksVer', 'ProxyType',
-           'ProxyError', 'ProxyConnectionError',
-           'SocksError', 'SocksConnectionError',
-           'open_connection', 'create_connection')
+__title__ = 'aiohttp-socks'
+__version__ = '0.5.5'
+
+from python_socks import (
+    ProxyError,
+    ProxyTimeoutError,
+    ProxyConnectionError,
+    ProxyType
+)
+
+from .connector import (
+    ProxyConnector,
+    ChainProxyConnector,
+    ProxyInfo
+)
+from .utils import open_connection, create_connection
+
+from ._deprecated import (
+    SocksVer,
+    SocksConnector,
+    SocksConnectionError,
+    SocksError
+)
+
+__all__ = (
+    '__title__',
+    '__version__',
+    'ProxyConnector',
+    'ChainProxyConnector',
+    'ProxyInfo',
+    'ProxyType',
+    'ProxyError',
+    'ProxyConnectionError',
+    'ProxyTimeoutError',
+    'open_connection',
+    'create_connection',
+
+    'SocksVer',
+    'SocksConnector',
+    'SocksError',
+    'SocksConnectionError',
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/_deprecated.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/_deprecated.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/_deprecated.py        1970-01-01 
01:00:00.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/_deprecated.py        2020-09-20 
14:19:38.000000000 +0200
@@ -0,0 +1,39 @@
+import warnings
+
+from python_socks import (
+    ProxyError,
+    ProxyConnectionError,
+    ProxyType
+)
+
+from .connector import ProxyConnector
+
+
+class SocksVer(object):
+    SOCKS4 = 1
+    SOCKS5 = 2
+
+
+def _warn_about_connector():
+    warnings.warn('SocksConnector is deprecated. '
+                  'Use ProxyConnector instead.', DeprecationWarning,
+                  stacklevel=3)
+
+
+class SocksConnector(ProxyConnector):
+    def __init__(self, socks_ver=SocksVer.SOCKS5, **kwargs):
+        _warn_about_connector()  # noqa
+
+        if 'proxy_type' in kwargs:  # from_url
+            super().__init__(**kwargs)
+        else:
+            super().__init__(proxy_type=ProxyType(socks_ver), **kwargs)
+
+    @classmethod
+    def from_url(cls, url, **kwargs):
+        _warn_about_connector()  # noqa
+        return super().from_url(url, **kwargs)
+
+
+SocksError = ProxyError
+SocksConnectionError = ProxyConnectionError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/connector.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/connector.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/connector.py  2020-01-11 
13:16:47.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/connector.py  2020-09-20 
14:19:38.000000000 +0200
@@ -1,13 +1,13 @@
 import socket
-import warnings
 from typing import Iterable
 
 import attr
 from aiohttp import TCPConnector
 from aiohttp.abc import AbstractResolver
 
-from .proxy import (ProxyType, SocksVer, ChainProxy,
-                    parse_proxy_url, create_proxy)
+from python_socks import ProxyType, parse_proxy_url
+from python_socks.async_ import ProxyChain
+from python_socks.async_.asyncio import Proxy
 
 
 class NoResolver(AbstractResolver):
@@ -21,61 +21,11 @@
         pass  # pragma: no cover
 
 
-class SocksConnector(TCPConnector):  # pragma: no cover
-    def __init__(self, socks_ver=SocksVer.SOCKS5,
-                 host=None, port=None,
-                 username=None, password=None,
-                 rdns=False, family=socket.AF_INET, **kwargs):
-
-        warnings.warn('SocksConnector is deprecated. '
-                      'Use ProxyConnector instead.', DeprecationWarning,
-                      stacklevel=2)
-        if rdns:
-            kwargs['resolver'] = NoResolver()
-
-        super().__init__(**kwargs)
-
-        self._socks_ver = socks_ver
-        self._socks_host = host
-        self._socks_port = port
-        self._socks_username = username
-        self._socks_password = password
-        self._rdns = rdns
-        self._socks_family = family
-
-    # noinspection PyMethodOverriding
-    async def _wrap_create_connection(self, protocol_factory,
-                                      host, port, **kwargs):
-
-        proxy = create_proxy(
-            loop=self._loop,
-            proxy_type=ProxyType(self._socks_ver),
-            host=self._socks_host, port=self._socks_port,
-            username=self._socks_username, password=self._socks_password,
-            rdns=self._rdns, family=self._socks_family)
-
-        await proxy.connect(host, port)
-
-        return await super()._wrap_create_connection(
-            protocol_factory, None, None, sock=proxy.socket, **kwargs)
-
-    @classmethod
-    def from_url(cls, url, **kwargs):
-        proxy_type, host, port, username, password = parse_proxy_url(url)
-
-        if proxy_type not in (ProxyType.SOCKS4, ProxyType.SOCKS5):
-            raise ValueError('Invalid proxy_type: {}'.format(proxy_type))
-
-        return cls(socks_ver=proxy_type.value, host=host, port=port,
-                   username=username, password=password, **kwargs)
-
-
 class ProxyConnector(TCPConnector):
     def __init__(self, proxy_type=ProxyType.SOCKS5,
                  host=None, port=None,
                  username=None, password=None,
-                 rdns=None, family=None, **kwargs):
-
+                 rdns=None, **kwargs):
         kwargs['resolver'] = NoResolver()
         super().__init__(**kwargs)
 
@@ -85,29 +35,47 @@
         self._proxy_username = username
         self._proxy_password = password
         self._rdns = rdns
-        self._proxy_family = family
 
     # noinspection PyMethodOverriding
     async def _wrap_create_connection(self, protocol_factory,
                                       host, port, **kwargs):
-        # aiohttp calls this method for each http request
-        proxy = create_proxy(
-            loop=self._loop,
+        proxy = Proxy.create(
             proxy_type=self._proxy_type,
-            host=self._proxy_host, port=self._proxy_port,
-            username=self._proxy_username, password=self._proxy_password,
-            rdns=self._rdns, family=self._proxy_family)
+            host=self._proxy_host,
+            port=self._proxy_port,
+            username=self._proxy_username,
+            password=self._proxy_password,
+            rdns=self._rdns,
+            loop=self._loop,
+        )
+
+        connect_timeout = None
 
-        await proxy.connect(host, port)
+        timeout = kwargs.get('timeout')
+        if timeout is not None:
+            connect_timeout = getattr(timeout, 'sock_connect', None)
+
+        sock = await proxy.connect(host, port, timeout=connect_timeout)
 
         return await super()._wrap_create_connection(
-            protocol_factory, None, None, sock=proxy.socket, **kwargs)
+            protocol_factory,
+            None,
+            None,
+            sock=sock,
+            **kwargs
+        )
 
     @classmethod
     def from_url(cls, url, **kwargs):
         proxy_type, host, port, username, password = parse_proxy_url(url)
-        return cls(proxy_type=proxy_type, host=host, port=port,
-                   username=username, password=password, **kwargs)
+        return cls(
+            proxy_type=proxy_type,
+            host=host,
+            port=port,
+            username=username,
+            password=password,
+            **kwargs
+        )
 
 
 @attr.s(frozen=True, slots=True)
@@ -118,7 +86,6 @@
     username = attr.ib(type=str, default=None)
     password = attr.ib(type=str, default=None)
     rdns = attr.ib(type=bool, default=None)
-    family = attr.ib(type=int, default=None)
 
 
 class ChainProxyConnector(TCPConnector):
@@ -133,24 +100,34 @@
                                       host, port, **kwargs):
         proxies = []
         for info in self._proxy_infos:
-            proxy = create_proxy(
+            proxy = Proxy.create(
                 proxy_type=info.proxy_type,
                 host=info.host,
                 port=info.port,
                 username=info.username,
                 password=info.password,
                 rdns=info.rdns,
-                family=info.family,
                 loop=self._loop
             )
             proxies.append(proxy)
 
-        proxy = ChainProxy(proxies)
+        proxy = ProxyChain(proxies)
+
+        connect_timeout = None
+
+        timeout = kwargs.get('timeout')
+        if timeout is not None:
+            connect_timeout = getattr(timeout, 'sock_connect', None)
 
-        await proxy.connect(host, port)
+        sock = await proxy.connect(host, port, timeout=connect_timeout)
 
         return await super()._wrap_create_connection(
-            protocol_factory, None, None, sock=proxy.socket, **kwargs)
+            protocol_factory,
+            None,
+            None,
+            sock=sock,
+            **kwargs
+        )
 
     @classmethod
     def from_urls(cls, urls: Iterable[str], **kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/__init__.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/__init__.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/__init__.py     2019-12-22 
14:45:53.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/__init__.py     1970-01-01 
01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-from .helpers import parse_proxy_url
-from .factory import create_proxy
-from .enums import ProxyType, SocksVer
-
-from .abc import AbstractProxy
-from .http_proxy import HttpProxy
-from .socks4_proxy import Socks4Proxy
-from .socks5_proxy import Socks5Proxy
-from .chain_proxy import ChainProxy
-
-__all__ = ('parse_proxy_url', 'create_proxy',
-           'ProxyType', 'SocksVer', 'AbstractProxy',
-           'HttpProxy', 'Socks4Proxy', 'Socks5Proxy', 'ChainProxy')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/abc.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/abc.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/abc.py  2019-12-22 
16:09:26.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/abc.py  1970-01-01 
01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-class AbstractProxy:
-    async def connect(self, dest_host, dest_port,
-                      _socket=None):  # pragma: no cover
-        raise NotImplementedError()
-
-    @property
-    def socket(self):  # pragma: no cover
-        raise NotImplementedError()
-
-    @property
-    def host(self):  # pragma: no cover
-        raise NotImplementedError()
-
-    @property
-    def port(self):  # pragma: no cover
-        raise NotImplementedError()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/base_proxy.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/base_proxy.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/base_proxy.py   2020-01-11 
12:46:04.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/base_proxy.py   1970-01-01 
01:00:00.000000000 +0100
@@ -1,113 +0,0 @@
-import asyncio
-import socket
-import warnings
-
-from .helpers import is_ipv4_address, is_ipv6_address
-from .mixins import StreamSocketReadWriteMixin, ResolveMixin
-from .errors import ProxyConnectionError, ProxyError
-from .abc import AbstractProxy
-
-
-class BaseProxy(AbstractProxy, StreamSocketReadWriteMixin, ResolveMixin):
-    def __init__(self, loop, proxy_host, proxy_port, family=None):
-        if family is not None:
-            warnings.warn('Parameter family is deprecated '
-                          'and will be ignored.', DeprecationWarning,
-                          stacklevel=2)
-
-        self._loop = loop
-        self._proxy_host = proxy_host
-        self._proxy_port = proxy_port
-        self._dest_host = None
-        self._dest_port = None
-        self._socket = None
-
-    async def connect(self, dest_host, dest_port, _socket=None):
-        self._dest_host = dest_host
-        self._dest_port = dest_port
-
-        if _socket is None:
-            family, host = await self._resolve_proxy_host()
-            self._create_socket(family=family)
-            await self._connect_to_proxy(
-                host=host,
-                port=self._proxy_port
-            )
-        else:
-            self._socket = _socket
-
-        try:
-            await self.negotiate()
-        except ProxyError:
-            self.close()
-            raise
-        except asyncio.CancelledError:  # pragma: no cover
-            if self._can_be_closed_safely():
-                self.close()
-            raise
-
-    async def negotiate(self):  # pragma: no cover
-        raise NotImplementedError()
-
-    def _create_socket(self, family):
-        self._socket = socket.socket(
-            family=family,
-            type=socket.SOCK_STREAM
-        )
-        self._socket.setblocking(False)
-
-    async def _connect_to_proxy(self, host, port):
-        try:
-            await self._loop.sock_connect(
-                sock=self._socket,
-                address=(host, port)
-            )
-        except OSError as e:
-            self.close()
-            msg = 'Can not connect to proxy {}:{} [{}]'.format(
-                host, port, e.strerror)
-            raise ProxyConnectionError(e.errno, msg) from e
-        except asyncio.CancelledError:  # pragma: no cover
-            self.close()
-            raise
-
-    async def _resolve_proxy_host(self):
-        host = self._proxy_host
-        if is_ipv4_address(host):
-            return socket.AF_INET, host
-        if is_ipv6_address(host):
-            return socket.AF_INET6, host
-        return await self.resolve(host=host)
-
-    def _can_be_closed_safely(self):  # pragma: no cover
-        def is_proactor_event_loop():
-            try:
-                from asyncio import ProactorEventLoop
-            except ImportError:
-                return False
-            return isinstance(self._loop, ProactorEventLoop)
-
-        def is_uvloop_event_loop():
-            try:
-                # noinspection PyPackageRequirements
-                from uvloop import Loop
-            except ImportError:
-                return False
-            return isinstance(self._loop, Loop)
-
-        return is_proactor_event_loop() or is_uvloop_event_loop()
-
-    def close(self):
-        self._socket.close()
-
-    @property
-    def socket(self):
-        return self._socket
-
-    @property
-    def host(self):
-        return self._proxy_host
-
-    @property
-    def port(self):
-        return self._proxy_port
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/chain_proxy.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/chain_proxy.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/chain_proxy.py  2019-12-22 
16:26:18.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/chain_proxy.py  1970-01-01 
01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-from typing import Iterable
-
-from .abc import AbstractProxy
-
-
-class ChainProxy:
-    def __init__(self, proxies: Iterable[AbstractProxy]):
-        self._proxies = proxies
-        self._socket = None
-
-    async def connect(self, dest_host, dest_port):
-        curr_socket = None
-        proxies = list(self._proxies)
-
-        length = len(proxies) - 1
-        for i in range(length):
-            await proxies[i].connect(
-                dest_host=proxies[i + 1].host,
-                dest_port=proxies[i + 1].port,
-                _socket=curr_socket
-            )
-            curr_socket = proxies[i].socket
-
-        await proxies[length].connect(
-            dest_host=dest_host,
-            dest_port=dest_port,
-            _socket=curr_socket
-        )
-        curr_socket = proxies[length].socket
-
-        self._socket = curr_socket
-
-    @property
-    def socket(self):
-        return self._socket
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/enums.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/enums.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/enums.py        2019-12-19 
08:16:28.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/enums.py        1970-01-01 
01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-from enum import Enum
-
-
-class SocksVer(object):
-    SOCKS4 = 1
-    SOCKS5 = 2
-
-
-class ProxyType(Enum):
-    SOCKS4 = 1
-    SOCKS5 = 2
-    HTTP = 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/errors.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/errors.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/errors.py       2019-12-22 
13:57:26.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/errors.py       1970-01-01 
01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-class ProxyError(Exception):
-    pass
-
-
-class ProxyConnectionError(OSError):
-    pass
-
-
-SocksError = ProxyError
-SocksConnectionError = ProxyConnectionError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/factory.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/factory.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/factory.py      2020-01-11 
13:08:03.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/factory.py      1970-01-01 
01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-import asyncio
-
-from .enums import ProxyType
-from .http_proxy import HttpProxy
-from .socks4_proxy import Socks4Proxy
-from .socks5_proxy import Socks5Proxy
-
-
-def create_proxy(proxy_type, host, port, username=None, password=None,
-                 rdns=None, family=None, loop=None):
-
-    if loop is None:
-        loop = asyncio.get_event_loop()
-
-    if proxy_type == ProxyType.SOCKS4:
-        return Socks4Proxy(
-            loop=loop, proxy_host=host, proxy_port=port,
-            user_id=username, rdns=rdns)
-
-    if proxy_type == ProxyType.SOCKS5:
-        return Socks5Proxy(
-            loop=loop, proxy_host=host, proxy_port=port,
-            username=username, password=password, rdns=rdns, family=family)
-
-    if proxy_type == ProxyType.HTTP:
-        return HttpProxy(
-            loop=loop, proxy_host=host, proxy_port=port,
-            username=username, password=password)
-
-    raise ValueError(
-        'Invalid proxy type: {}'.format(proxy_type))  # pragma: no cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/helpers.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/helpers.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/helpers.py      2019-12-19 
13:09:57.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/helpers.py      1970-01-01 
01:00:00.000000000 +0100
@@ -1,75 +0,0 @@
-import functools
-import re
-from urllib.parse import urlparse, unquote
-
-from .enums import ProxyType
-
-_ipv4_pattern = (r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}'
-                 r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$')
-
-_ipv6_pattern = (
-    r'^(?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}'
-    r'(?:[0-9]{1,3}\.){3}[0-9]{1,3}$)(([0-9A-F]{1,4}:){0,5}|:)'
-    r'((:[0-9A-F]{1,4}){1,5}:|:)|::(?:[A-F0-9]{1,4}:){5})'
-    r'(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}'
-    r'(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-F0-9]{1,4}:){7}'
-    r'[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}$)'
-    r'(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}'
-    r':|:(:[A-F0-9]{1,4}){7})$')
-
-_ipv4_regex = re.compile(_ipv4_pattern)
-_ipv6_regex = re.compile(_ipv6_pattern, flags=re.IGNORECASE)
-_ipv4_regexb = re.compile(_ipv4_pattern.encode('ascii'))
-_ipv6_regexb = re.compile(_ipv6_pattern.encode('ascii'), flags=re.IGNORECASE)
-
-
-def _is_ip_address(regex, regexb, host):
-    if host is None:
-        return False
-    if isinstance(host, str):
-        return bool(regex.match(host))
-    elif isinstance(host, (bytes, bytearray, memoryview)):
-        return bool(regexb.match(host))
-    else:
-        raise TypeError("{} [{}] is not a str or bytes"
-                        .format(host, type(host)))
-
-
-is_ipv4_address = functools.partial(_is_ip_address, _ipv4_regex, _ipv4_regexb)
-is_ipv6_address = functools.partial(_is_ip_address, _ipv6_regex, _ipv6_regexb)
-
-
-def is_ip_address(host):
-    return is_ipv4_address(host) or is_ipv6_address(host)
-
-
-def parse_proxy_url(url):
-    parsed = urlparse(url)
-
-    scheme = parsed.scheme
-    if scheme == 'socks5':
-        proxy_type = ProxyType.SOCKS5
-    elif scheme == 'socks4':
-        proxy_type = ProxyType.SOCKS4
-    elif scheme == 'http':
-        proxy_type = ProxyType.HTTP
-    else:
-        raise ValueError('Invalid scheme component: %s'
-                         % scheme)  # pragma: no cover
-
-    host = parsed.hostname
-    if not host:
-        raise ValueError('Empty host component')  # pragma: no cover
-
-    try:
-        port = parsed.port
-    except (ValueError, TypeError):  # pragma: no cover
-        raise ValueError('Invalid port component')
-
-    try:
-        username, password = (unquote(parsed.username),
-                              unquote(parsed.password))
-    except (AttributeError, TypeError):
-        username, password = '', ''
-
-    return proxy_type, host, port, username, password
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/http_proxy.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/http_proxy.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/http_proxy.py   2020-01-11 
13:08:03.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/http_proxy.py   1970-01-01 
01:00:00.000000000 +0100
@@ -1,65 +0,0 @@
-from aiohttp import BasicAuth
-from aiohttp.http import SERVER_SOFTWARE
-from .errors import ProxyError
-
-from .base_proxy import BaseProxy
-
-CRLF = '\r\n'
-CRLF_B = CRLF.encode('ascii')
-
-
-class HttpProxy(BaseProxy):
-    def __init__(self, loop, proxy_host, proxy_port,
-                 username=None, password=None, family=None):
-        super().__init__(
-            loop=loop,
-            proxy_host=proxy_host,
-            proxy_port=proxy_port,
-            family=family
-        )
-        self._username = username
-        self._password = password
-
-    async def negotiate(self):
-        host = self._dest_host
-        port = self._dest_port
-        login = self._username
-        password = self._password
-
-        # noinspection PyListCreation
-        req = []
-        req.append('CONNECT {}:{} HTTP/1.1'.format(host, port))
-        req.append('Host: {}:{}'.format(host, port))
-        req.append('User-Agent: {}'.format(SERVER_SOFTWARE))
-
-        if login and password:
-            auth = BasicAuth(login, password)
-            req.append('Proxy-Authorization: {}'.format(auth.encode()))
-
-        req.append(CRLF)
-
-        data = CRLF.join(req).encode('ascii')
-
-        await self.write_all(data)
-
-        res = await self.read_all()
-
-        if not res:
-            raise ProxyError('Invalid proxy response')  # pragma: no cover'
-
-        line = res.split(CRLF_B, 1)[0]
-        line = line.decode('utf-8', 'surrogateescape')
-
-        try:
-            version, code, *reason = line.split()
-        except ValueError:  # pragma: no cover
-            raise ProxyError('Invalid status line: {}'.format(line))
-
-        try:
-            status_code = int(code)
-        except ValueError:  # pragma: no cover
-            raise ProxyError('Invalid status code: {}'.format(code))
-
-        if status_code != 200:
-            raise ProxyError(  # pragma: no cover
-                'Proxy server error. Status: {}'.format(status_code))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/mixins.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/mixins.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/mixins.py       2019-12-22 
14:03:26.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/mixins.py       1970-01-01 
01:00:00.000000000 +0100
@@ -1,57 +0,0 @@
-import socket
-from .errors import ProxyError
-
-
-class StreamSocketReadWriteMixin:
-    _loop = None
-    _socket = None
-
-    async def write(self, request):
-        data = bytearray()
-        for item in request:
-            if isinstance(item, int):
-                data.append(item)
-            elif isinstance(item, (bytearray, bytes)):
-                data += item
-            else:
-                raise ValueError('Unsupported request type')
-        await self._loop.sock_sendall(self._socket, data)
-
-    async def write_all(self, data):
-        await self._loop.sock_sendall(self._socket, data)
-
-    async def read(self, n):
-        data = bytearray()
-        while len(data) < n:
-            packet = await self._loop.sock_recv(self._socket, n - len(data))
-            if not packet:
-                raise ProxyError('Connection closed unexpectedly')
-            data += packet
-        return data
-
-    async def read_all(self, buff_size=4096):
-        data = bytearray()
-        while True:
-            packet = await self._loop.sock_recv(self._socket, buff_size)
-            if not packet:
-                break
-            data += packet
-            if len(packet) < buff_size:
-                break
-        return data
-
-
-class ResolveMixin:
-    _loop = None
-
-    async def resolve(self, host, port=0, family=socket.AF_INET):
-        infos = await self._loop.getaddrinfo(
-            host=host, port=port,
-            family=family, type=socket.SOCK_STREAM)
-
-        if not infos:
-            raise OSError('Can`t resolve address {}:{} [{}]'.format(
-                host, port, family))
-
-        family, _, _, _, address = infos[0]
-        return family, address[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/socks4_proxy.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/socks4_proxy.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/socks4_proxy.py 2020-01-11 
13:06:43.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/socks4_proxy.py 1970-01-01 
01:00:00.000000000 +0100
@@ -1,80 +0,0 @@
-import ipaddress
-import socket
-
-from .helpers import is_ipv4_address
-from .base_proxy import BaseProxy
-from .errors import ProxyError
-
-RSV = NULL = 0x00
-SOCKS_VER4 = 0x04
-SOCKS_CMD_CONNECT = 0x01
-SOCKS4_GRANTED = 0x5A
-
-SOCKS4_ERRORS = {
-    0x5B: 'Request rejected or failed',
-    0x5C: 'Request rejected because SOCKS server '
-          'cannot connect to identd on the client',
-    0x5D: 'Request rejected because the client program '
-          'and identd report different user-ids'
-}
-
-
-class Socks4Proxy(BaseProxy):
-    def __init__(self, loop, proxy_host, proxy_port,
-                 user_id=None, rdns=None):
-        super().__init__(
-            loop=loop,
-            proxy_host=proxy_host,
-            proxy_port=proxy_port,
-            family=None
-        )
-
-        if rdns is None:
-            rdns = False
-
-        self._user_id = user_id
-        self._rdns = rdns
-
-    async def negotiate(self):
-        await self._socks_connect()
-
-    async def _socks_connect(self):
-        host, port = self._dest_host, self._dest_port
-        port_bytes = port.to_bytes(2, 'big')
-
-        include_hostname = False
-
-        if is_ipv4_address(host):
-            host_bytes = ipaddress.ip_address(host).packed
-        else:
-            # not IP address, probably a DNS name
-            if self._rdns:
-                # remote resolve (SOCKS4a)
-                include_hostname = True
-                host_bytes = bytes([NULL, NULL, NULL, 0x01])
-            else:
-                # resolve locally
-                _, addr = await self.resolve(host, family=socket.AF_INET)
-                host_bytes = ipaddress.ip_address(addr).packed
-
-        # build and send connect command
-        req = [SOCKS_VER4, SOCKS_CMD_CONNECT, port_bytes, host_bytes]
-
-        if self._user_id:
-            req.append(self._user_id.encode('ascii'))
-
-        req.append(NULL)
-
-        if include_hostname:
-            req += [host.encode('idna'), NULL]
-
-        await self.write(req)
-
-        rsv, code, *_ = await self.read(8)
-
-        if rsv != NULL:  # pragma: no cover
-            raise ProxyError('SOCKS4 proxy server sent invalid data')
-
-        if code != SOCKS4_GRANTED:  # pragma: no cover
-            error = SOCKS4_ERRORS.get(code, 'Unknown error')
-            raise ProxyError('[Errno {0:#04x}]: {1}'.format(code, error))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/socks5_proxy.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/socks5_proxy.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/proxy/socks5_proxy.py 2020-01-11 
13:06:55.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/proxy/socks5_proxy.py 1970-01-01 
01:00:00.000000000 +0100
@@ -1,142 +0,0 @@
-import ipaddress
-import socket
-
-from .helpers import is_ip_address
-from .base_proxy import BaseProxy
-from .errors import ProxyError
-
-RSV = NULL = 0x00
-SOCKS_VER5 = 0x05
-SOCKS5_GRANTED = 0x00
-
-SOCKS_CMD_CONNECT = 0x01
-
-SOCKS5_AUTH_ANONYMOUS = 0x00
-SOCKS5_AUTH_UNAME_PWD = 0x02
-SOCKS5_AUTH_NO_ACCEPTABLE_METHODS = 0xFF
-
-SOCKS5_ATYP_IPv4 = 0x01
-SOCKS5_ATYP_DOMAIN = 0x03
-SOCKS5_ATYP_IPv6 = 0x04
-
-SOCKS5_ERRORS = {
-    0x01: 'General SOCKS server failure',
-    0x02: 'Connection not allowed by ruleset',
-    0x03: 'Network unreachable',
-    0x04: 'Host unreachable',
-    0x05: 'Connection refused',
-    0x06: 'TTL expired',
-    0x07: 'Command not supported, or protocol error',
-    0x08: 'Address type not supported'
-}
-
-
-class Socks5Proxy(BaseProxy):
-    def __init__(self, loop, proxy_host, proxy_port, username=None,
-                 password=None, rdns=None, family=None):
-        super().__init__(
-            loop=loop,
-            proxy_host=proxy_host,
-            proxy_port=proxy_port,
-            family=family
-        )
-
-        if rdns is None:
-            rdns = True
-
-        self._username = username
-        self._password = password
-        self._rdns = rdns
-
-    async def negotiate(self):
-        await self._socks_auth()
-        await self._socks_connect()
-
-    async def _socks_auth(self):
-        # send auth methods
-        if self._username and self._password:
-            auth_methods = [SOCKS5_AUTH_UNAME_PWD, SOCKS5_AUTH_ANONYMOUS]
-        else:
-            auth_methods = [SOCKS5_AUTH_ANONYMOUS]
-
-        req = [SOCKS_VER5, len(auth_methods)] + auth_methods
-
-        await self.write(req)
-
-        ver, auth_method = await self.read(2)
-
-        if ver != SOCKS_VER5:  # pragma: no cover
-            raise ProxyError(
-                'Unexpected SOCKS version number: {}'.format(ver))
-
-        if auth_method == SOCKS5_AUTH_NO_ACCEPTABLE_METHODS:
-            raise ProxyError(
-                'No acceptable authentication methods were offered')
-
-        if auth_method not in auth_methods:
-            raise ProxyError(
-                'Unexpected SOCKS authentication method: {}'.format(
-                    auth_method))
-
-        # authenticate
-        if auth_method == SOCKS5_AUTH_UNAME_PWD:
-            req = [0x01,
-                   len(self._username),
-                   self._username.encode('ascii'),
-                   len(self._password),
-                   self._password.encode('ascii')]
-
-            await self.write(req)
-
-            ver, status = await self.read(2)
-
-            if ver != 0x01:
-                raise ProxyError('Invalid authentication response')
-            if status != SOCKS5_GRANTED:
-                raise ProxyError(
-                    'Username and password authentication failure'
-                )
-
-    async def _socks_connect(self):
-        req_addr = await self._build_addr_request()
-        req = [SOCKS_VER5, SOCKS_CMD_CONNECT, RSV] + req_addr
-
-        await self.write(req)
-
-        ver, err_code, reserved = await self.read(3)
-
-        if ver != SOCKS_VER5:
-            raise ProxyError('Unexpected SOCKS version number: {}'.format(ver))
-
-        if err_code != NULL:
-            raise ProxyError(SOCKS5_ERRORS.get(err_code, 'Unknown error'))
-
-        if reserved != RSV:
-            raise ProxyError('The reserved byte must be 0x00')
-
-        # read all available data (binded address)
-        await self.read_all()
-
-    async def _build_addr_request(self):
-        host = self._dest_host
-        port = self._dest_port
-        port_bytes = port.to_bytes(2, 'big')
-
-        ver_to_byte = {4: SOCKS5_ATYP_IPv4, 6: SOCKS5_ATYP_IPv6}
-
-        # destination address provided is an IPv4 or IPv6 address
-        if is_ip_address(host):
-            ip = ipaddress.ip_address(host)
-            return [ver_to_byte[ip.version], ip.packed, port_bytes]
-
-        # not IP address, probably a DNS name
-        if self._rdns:
-            # resolve remotely
-            host_bytes = host.encode('idna')
-            host_len = len(host_bytes)
-            return [SOCKS5_ATYP_DOMAIN, host_len, host_bytes, port_bytes]
-        else:
-            # resolve locally
-            _, addr = await self.resolve(host, family=socket.AF_UNSPEC)
-            ip = ipaddress.ip_address(addr)
-            return [ver_to_byte[ip.version], ip.packed, port_bytes]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks/utils.py 
new/aiohttp_socks-0.5.5/aiohttp_socks/utils.py
--- old/aiohttp_socks-0.3.4/aiohttp_socks/utils.py      2020-01-11 
13:14:58.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks/utils.py      2020-09-22 
09:43:56.000000000 +0200
@@ -1,65 +1,82 @@
-import asyncio
-
-from .proxy import ProxyType, create_proxy, parse_proxy_url
-
-
-async def open_connection(proxy_url=None, host=None, port=None, *,
-                          proxy_type=ProxyType.SOCKS5,
-                          proxy_host='127.0.0.1', proxy_port=1080,
-                          username=None, password=None, rdns=True,
-                          family=None,
-                          loop=None, **kwargs):
-    if host is None or port is None:
-        raise ValueError('host and port must be specified')  # pragma: no cover
-
-    if loop is None:
-        loop = asyncio.get_event_loop()
-
-    if proxy_url is not None:
-        proxy_type, proxy_host, proxy_port, username, password \
-            = parse_proxy_url(proxy_url)
-
-    proxy = create_proxy(
-        loop=loop,
-        proxy_type=proxy_type, host=proxy_host, port=proxy_port,
-        username=username, password=password, rdns=rdns, family=family)
-
-    await proxy.connect(host, port)
-
-    # noinspection PyTypeChecker
-    return await asyncio.open_connection(
-        loop=loop, host=None, port=None, sock=proxy.socket, **kwargs)
-
-
-async def create_connection(proxy_url=None, protocol_factory=None,
-                            host=None, port=None, *,
-                            proxy_type=ProxyType.SOCKS5,
-                            proxy_host='127.0.0.1', proxy_port=1080,
-                            username=None, password=None, rdns=True,
-                            family=None,
-                            loop=None, **kwargs):
-    if protocol_factory is None:
-        raise ValueError('protocol_factory '
-                         'must be specified')  # pragma: no cover
-
-    if host is None or port is None:
-        raise ValueError('host and port '
-                         'must be specified')  # pragma: no cover
-
-    if loop is None:
-        loop = asyncio.get_event_loop()
-
-    if proxy_url is not None:
-        proxy_type, proxy_host, proxy_port, username, password \
-            = parse_proxy_url(proxy_url)
-
-    proxy = create_proxy(
-        loop=loop,
-        proxy_type=proxy_type, host=proxy_host, port=proxy_port,
-        username=username, password=password, rdns=rdns, family=family)
-
-    await proxy.connect(host, port)
-
-    return await loop.create_connection(
-        protocol_factory=protocol_factory,
-        host=None, port=None, sock=proxy.socket, **kwargs)
+import asyncio
+
+from python_socks import ProxyType, parse_proxy_url
+from python_socks.async_.asyncio import Proxy
+
+
+async def open_connection(proxy_url=None, host=None, port=None, *,
+                          proxy_type=ProxyType.SOCKS5,
+                          proxy_host='127.0.0.1', proxy_port=1080,
+                          username=None, password=None, rdns=True,
+                          loop=None, **kwargs):
+    if host is None or port is None:
+        raise ValueError('host and port must be specified')  # pragma: no cover
+
+    if loop is None:
+        loop = asyncio.get_event_loop()
+
+    if proxy_url is not None:
+        proxy_type, proxy_host, proxy_port, username, password \
+            = parse_proxy_url(proxy_url)
+
+    proxy = Proxy.create(
+        proxy_type=proxy_type,
+        host=proxy_host,
+        port=proxy_port,
+        username=username,
+        password=password,
+        rdns=rdns,
+        loop=loop
+    )
+
+    sock = await proxy.connect(host, port)
+
+    # noinspection PyTypeChecker
+    return await asyncio.open_connection(
+        host=None,
+        port=None,
+        sock=sock,
+        **kwargs
+    )
+
+
+async def create_connection(proxy_url=None, protocol_factory=None,
+                            host=None, port=None, *,
+                            proxy_type=ProxyType.SOCKS5,
+                            proxy_host='127.0.0.1', proxy_port=1080,
+                            username=None, password=None, rdns=True,
+                            loop=None, **kwargs):
+    if protocol_factory is None:
+        raise ValueError('protocol_factory '
+                         'must be specified')  # pragma: no cover
+
+    if host is None or port is None:
+        raise ValueError('host and port '
+                         'must be specified')  # pragma: no cover
+
+    if loop is None:
+        loop = asyncio.get_event_loop()
+
+    if proxy_url is not None:
+        proxy_type, proxy_host, proxy_port, username, password \
+            = parse_proxy_url(proxy_url)
+
+    proxy = Proxy.create(
+        proxy_type=proxy_type,
+        host=proxy_host,
+        port=proxy_port,
+        username=username,
+        password=password,
+        rdns=rdns,
+        loop=loop
+    )
+
+    sock = await proxy.connect(host, port)
+
+    return await loop.create_connection(
+        protocol_factory=protocol_factory,
+        host=None,
+        port=None,
+        sock=sock,
+        **kwargs
+    )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/aiohttp_socks.egg-info/PKG-INFO 
new/aiohttp_socks-0.5.5/aiohttp_socks.egg-info/PKG-INFO
--- old/aiohttp_socks-0.3.4/aiohttp_socks.egg-info/PKG-INFO     2020-01-11 
13:30:02.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks.egg-info/PKG-INFO     2020-09-22 
09:58:19.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: aiohttp-socks
-Version: 0.3.4
+Version: 0.5.5
 Summary: Proxy connector for aiohttp
 Home-page: https://github.com/romis2012/aiohttp-socks
 Author: Roman Snegirev
@@ -12,12 +12,15 @@
         [![Coverage 
Status](https://coveralls.io/repos/github/romis2012/aiohttp-socks/badge.svg?branch=master&_=x)](https://coveralls.io/github/romis2012/aiohttp-socks?branch=master)
         [![PyPI 
version](https://badge.fury.io/py/aiohttp-socks.svg)](https://badge.fury.io/py/aiohttp-socks)
         
-        Proxy connector for [aiohttp](https://github.com/aio-libs/aiohttp). 
-        SOCKS4(a), SOCKS5, HTTP (tunneling), Proxy chains are supported.
+        The `aiohttp-socks` package provides a proxy connector for 
[aiohttp](https://github.com/aio-libs/aiohttp). 
+        Supports SOCKS4(a), SOCKS5, HTTP (tunneling) as well as Proxy chains.
+        It uses [python-socks](https://github.com/romis2012/python-socks) for 
core proxy functionality.
+        
         
         ## Requirements
-        - Python >= 3.5.3
+        - Python >= 3.6
         - aiohttp >= 2.3.2
+        - python-socks[asyncio] >= 1.0.1
         
         ## Installation
         ```
@@ -33,8 +36,6 @@
         
         
         async def fetch(url):
-            # We have added http proxy support, so SocksConnector has been 
deprecated
-            # connector = 
SocksConnector.from_url('socks5://user:[email protected]:1080')
             connector = 
ProxyConnector.from_url('socks5://user:[email protected]:1080')
             
             ### or use ProxyConnector constructor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks.egg-info/SOURCES.txt 
new/aiohttp_socks-0.5.5/aiohttp_socks.egg-info/SOURCES.txt
--- old/aiohttp_socks-0.3.4/aiohttp_socks.egg-info/SOURCES.txt  2020-01-11 
13:30:02.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks.egg-info/SOURCES.txt  2020-09-22 
09:58:19.000000000 +0200
@@ -3,22 +3,11 @@
 README.md
 setup.py
 aiohttp_socks/__init__.py
+aiohttp_socks/_deprecated.py
 aiohttp_socks/connector.py
 aiohttp_socks/utils.py
 aiohttp_socks.egg-info/PKG-INFO
 aiohttp_socks.egg-info/SOURCES.txt
 aiohttp_socks.egg-info/dependency_links.txt
 aiohttp_socks.egg-info/requires.txt
-aiohttp_socks.egg-info/top_level.txt
-aiohttp_socks/proxy/__init__.py
-aiohttp_socks/proxy/abc.py
-aiohttp_socks/proxy/base_proxy.py
-aiohttp_socks/proxy/chain_proxy.py
-aiohttp_socks/proxy/enums.py
-aiohttp_socks/proxy/errors.py
-aiohttp_socks/proxy/factory.py
-aiohttp_socks/proxy/helpers.py
-aiohttp_socks/proxy/http_proxy.py
-aiohttp_socks/proxy/mixins.py
-aiohttp_socks/proxy/socks4_proxy.py
-aiohttp_socks/proxy/socks5_proxy.py
\ No newline at end of file
+aiohttp_socks.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aiohttp_socks-0.3.4/aiohttp_socks.egg-info/requires.txt 
new/aiohttp_socks-0.5.5/aiohttp_socks.egg-info/requires.txt
--- old/aiohttp_socks-0.3.4/aiohttp_socks.egg-info/requires.txt 2020-01-11 
13:30:02.000000000 +0100
+++ new/aiohttp_socks-0.5.5/aiohttp_socks.egg-info/requires.txt 2020-09-22 
09:58:19.000000000 +0200
@@ -1,2 +1,3 @@
 aiohttp>=2.3.2
 attrs>=19.2.0
+python-socks[asyncio]>=1.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiohttp_socks-0.3.4/setup.py 
new/aiohttp_socks-0.5.5/setup.py
--- old/aiohttp_socks-0.3.4/setup.py    2019-12-23 06:35:17.000000000 +0100
+++ new/aiohttp_socks-0.5.5/setup.py    2020-09-20 14:17:57.000000000 +0200
@@ -19,8 +19,8 @@
     except IndexError:
         raise RuntimeError('Unable to determine version.')
 
-if sys.version_info < (3, 5, 3):
-    raise RuntimeError("aiohttp_socks requires Python 3.5.3+")
+if sys.version_info < (3, 6, 0):
+    raise RuntimeError('aiohttp-socks requires Python 3.6+')
 
 with open('README.md') as f:
     long_description = f.read()
@@ -35,10 +35,11 @@
     description='Proxy connector for aiohttp',
     long_description=long_description,
     long_description_content_type='text/markdown',
-    packages=['aiohttp_socks', 'aiohttp_socks.proxy'],
+    packages=['aiohttp_socks'],
     keywords='asyncio aiohttp socks socks5 socks4 http proxy',
     install_requires=[
         'aiohttp>=2.3.2',
         'attrs>=19.2.0',
+        'python-socks[asyncio]>=1.0.1',
     ],
 )

Reply via email to