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 2026-08-19 17:58:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aiohttp-socks (Old)
and /work/SRC/openSUSE:Factory/.python-aiohttp-socks.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aiohttp-socks"
Wed Aug 19 17:58:52 2026 rev:15 rq:1371906 version:0.12.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-aiohttp-socks/python-aiohttp-socks.changes
2026-01-22 15:19:29.315505873 +0100
+++
/work/SRC/openSUSE:Factory/.python-aiohttp-socks.new.1258/python-aiohttp-socks.changes
2026-08-19 18:00:56.127623881 +0200
@@ -1,0 +2,8 @@
+Wed Aug 19 06:01:35 UTC 2026 - Jiri Slaby <[email protected]>
+
+- update to 0.12.0:
+ * Dropped support for Python 3.8.
+ * Bumped python-socks upper bound to <4.0.0.
+ * The entire codebase is now strictly type-annotated and fully compliant
with mypy.
+
+-------------------------------------------------------------------
Old:
----
aiohttp_socks-0.11.0.tar.gz
New:
----
_scmsync.obsinfo
aiohttp_socks-0.12.0.tar.gz
build.specials.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-aiohttp-socks.spec ++++++
--- /var/tmp/diff_new_pack.y5LTDR/_old 2026-08-19 18:00:56.705644662 +0200
+++ /var/tmp/diff_new_pack.y5LTDR/_new 2026-08-19 18:00:56.707644734 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-aiohttp-socks
-Version: 0.11.0
+Version: 0.12.0
Release: 0
Summary: SOCKS proxy connector for aiohttp
License: Apache-2.0
@@ -31,13 +31,11 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-aiohttp >= 2.3.2
-Requires: python-attrs >= 19.2.0
Requires: python-python-socks >= 2.0.0
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module aiohttp >= 2.3.2}
BuildRequires: %{python_module async_timeout}
-BuildRequires: %{python_module attrs >= 1.0.1}
BuildRequires: %{python_module python-socks >= 2.0.0}
# /SECTION
%python_subpackages
++++++ _scmsync.obsinfo ++++++
mtime: 1787119511
commit: 13d415956bf95d7833afd8cbf3ba5f79f0a30c53ce556a914dd5f4ae93387e6b
url: https://src.opensuse.org/jirislaby/d-l-p-python-aiohttp-socks
++++++ aiohttp_socks-0.11.0.tar.gz -> aiohttp_socks-0.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/PKG-INFO
new/aiohttp_socks-0.12.0/PKG-INFO
--- old/aiohttp_socks-0.11.0/PKG-INFO 2025-12-09 14:35:38.220399100 +0100
+++ new/aiohttp_socks-0.12.0/PKG-INFO 2026-08-12 06:42:27.286502600 +0200
@@ -1,9 +1,9 @@
Metadata-Version: 2.4
Name: aiohttp_socks
-Version: 0.11.0
+Version: 0.12.0
Summary: Proxy connector for aiohttp
Author-email: Roman Snegirev <[email protected]>
-License: Apache-2.0
+License-Expression: Apache-2.0
Project-URL: homepage, https://github.com/romis2012/aiohttp-socks
Project-URL: repository, https://github.com/romis2012/aiohttp-socks
Keywords: asyncio,aiohttp,socks,socks5,socks4,http,proxy
@@ -11,7 +11,6 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
@@ -24,12 +23,11 @@
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Intended Audience :: Developers
Classifier: Framework :: AsyncIO
-Classifier: License :: OSI Approved :: Apache Software License
-Requires-Python: >=3.8.0
+Requires-Python: >=3.9.0
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: aiohttp>=3.10.0
-Requires-Dist: python-socks[asyncio]<3.0.0,>=2.4.3
+Requires-Dist: python-socks[asyncio]<4.0.0,>=2.4.3
Dynamic: license-file
## aiohttp-socks
@@ -47,7 +45,7 @@
## Requirements
-- Python >= 3.8
+- Python >= 3.9
- aiohttp >= 3.10.0
- python-socks[asyncio] >= 2.4.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/README.md
new/aiohttp_socks-0.12.0/README.md
--- old/aiohttp_socks-0.11.0/README.md 2025-12-09 13:50:20.000000000 +0100
+++ new/aiohttp_socks-0.12.0/README.md 2026-08-12 06:38:50.678477800 +0200
@@ -13,7 +13,7 @@
## Requirements
-- Python >= 3.8
+- Python >= 3.9
- aiohttp >= 3.10.0
- python-socks[asyncio] >= 2.4.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/aiohttp_socks/__init__.py
new/aiohttp_socks-0.12.0/aiohttp_socks/__init__.py
--- old/aiohttp_socks-0.11.0/aiohttp_socks/__init__.py 2025-12-09
14:31:38.000000000 +0100
+++ new/aiohttp_socks-0.12.0/aiohttp_socks/__init__.py 2026-08-12
06:40:07.280832500 +0200
@@ -1,38 +1,36 @@
-__title__ = 'aiohttp-socks'
-__version__ = '0.11.0'
+__title__ = "aiohttp-socks"
+__version__ = "0.12.0"
from python_socks import ProxyType
-from ._errors import (
- ProxyError,
- ProxyTimeoutError,
- ProxyConnectionError,
-)
-
-from .connector import ProxyConnector, ChainProxyConnector, ProxyInfo
-from .utils import open_connection, create_connection
-
from ._deprecated import (
- SocksVer,
- SocksConnector,
SocksConnectionError,
+ SocksConnector,
SocksError,
+ SocksVer,
+)
+from ._errors import (
+ ProxyConnectionError,
+ ProxyError,
+ ProxyTimeoutError,
)
+from .connector import ChainProxyConnector, ProxyConnector, ProxyInfo
+from .utils import create_connection, open_connection
__all__ = (
- '__title__',
- '__version__',
- 'ProxyConnector',
- 'ChainProxyConnector',
- 'ProxyInfo',
- 'ProxyType',
- 'ProxyError',
- 'ProxyConnectionError',
- 'ProxyTimeoutError',
- 'open_connection',
- 'create_connection',
- 'SocksVer',
- 'SocksConnector',
- 'SocksError',
- 'SocksConnectionError',
+ "ChainProxyConnector",
+ "ProxyConnectionError",
+ "ProxyConnector",
+ "ProxyError",
+ "ProxyInfo",
+ "ProxyTimeoutError",
+ "ProxyType",
+ "SocksConnectionError",
+ "SocksConnector",
+ "SocksError",
+ "SocksVer",
+ "__title__",
+ "__version__",
+ "create_connection",
+ "open_connection",
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/aiohttp_socks/_deprecated.py
new/aiohttp_socks-0.12.0/aiohttp_socks/_deprecated.py
--- old/aiohttp_socks-0.11.0/aiohttp_socks/_deprecated.py 2020-11-30
05:28:14.000000000 +0100
+++ new/aiohttp_socks-0.12.0/aiohttp_socks/_deprecated.py 2026-08-05
05:24:37.603981300 +0200
@@ -1,37 +1,36 @@
+# ruff: noqa: ANN001,ANN202,ANN204,ANN206,ANN003
import warnings
-from python_socks import (
- ProxyError,
- ProxyConnectionError,
- ProxyType
-)
+from python_socks import ProxyConnectionError, ProxyError, ProxyType
from .connector import ProxyConnector
-class SocksVer(object):
+class SocksVer:
SOCKS4 = 1
SOCKS5 = 2
def _warn_about_connector():
- warnings.warn('SocksConnector is deprecated. '
- 'Use ProxyConnector instead.', DeprecationWarning,
- stacklevel=3)
+ 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
+ _warn_about_connector()
- if 'proxy_type' in kwargs: # from_url
+ 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
+ _warn_about_connector()
return super().from_url(url, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/aiohttp_socks/_errors.py
new/aiohttp_socks-0.12.0/aiohttp_socks/_errors.py
--- old/aiohttp_socks-0.11.0/aiohttp_socks/_errors.py 2025-12-09
13:26:16.000000000 +0100
+++ new/aiohttp_socks-0.12.0/aiohttp_socks/_errors.py 2026-08-05
05:27:04.901801800 +0200
@@ -1,3 +1,6 @@
+from __future__ import annotations
+
+
class ProxyTimeoutError(Exception):
pass
@@ -7,6 +10,6 @@
class ProxyError(Exception):
- def __init__(self, message, error_code=None):
+ def __init__(self, message: str, error_code: int | None = None) -> None:
super().__init__(message)
self.error_code = error_code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/aiohttp_socks/connector.py
new/aiohttp_socks-0.12.0/aiohttp_socks/connector.py
--- old/aiohttp_socks-0.11.0/aiohttp_socks/connector.py 2025-12-09
13:32:17.000000000 +0100
+++ new/aiohttp_socks-0.12.0/aiohttp_socks/connector.py 2026-08-11
16:41:08.926293400 +0200
@@ -1,17 +1,23 @@
+from __future__ import annotations
+
import asyncio
import socket
+from collections.abc import Iterable
from ssl import SSLContext
-from typing import Any, Iterable, NamedTuple, Optional, List, Tuple
+from typing import TYPE_CHECKING, Any, NamedTuple
from aiohttp import ClientConnectorError, TCPConnector
from aiohttp.abc import AbstractResolver, ResolveResult
from aiohttp.client_proto import ResponseHandler
+if TYPE_CHECKING: # pragma: no cover
+ from aiohttp import AddrInfoType, ClientRequest, ClientTimeout
+
import python_socks
from python_socks import ProxyType, parse_proxy_url
from python_socks.async_.asyncio.v2 import Proxy
-from ._errors import ProxyConnectionError, ProxyTimeoutError, ProxyError
+from ._errors import ProxyConnectionError, ProxyError, ProxyTimeoutError
class NoResolver(AbstractResolver):
@@ -19,20 +25,20 @@
self,
host: str,
port: int = 0,
- family: socket.AddressFamily = socket.AF_INET, # pylint:
disable=no-member
- ) -> List[ResolveResult]:
+ family: socket.AddressFamily = socket.AF_INET,
+ ) -> list[ResolveResult]:
return [
{
- 'hostname': host,
- 'host': host,
- 'port': port,
- 'family': family,
- 'proto': 0,
- 'flags': 0,
+ "hostname": host,
+ "host": host,
+ "port": port,
+ "family": family,
+ "proto": 0,
+ "flags": 0,
}
]
- async def close(self):
+ async def close(self) -> None:
pass # pragma: no cover
@@ -54,20 +60,20 @@
class _BaseProxyConnector(TCPConnector):
async def _wrap_create_connection(
self,
- *args,
- addr_infos,
- req,
- timeout,
- client_error=ClientConnectorError,
- **kwargs,
- ) -> Tuple[asyncio.Transport, ResponseHandler]:
+ *args: Any, # noqa: ARG002
+ addr_infos: list[AddrInfoType],
+ req: ClientRequest, # noqa: ARG002
+ timeout: ClientTimeout,
+ client_error: type[Exception] = ClientConnectorError, # noqa: ARG002
+ **kwargs: Any,
+ ) -> tuple[asyncio.Transport, ResponseHandler]:
try:
host: str = addr_infos[0][4][0]
port: int = addr_infos[0][4][1]
except IndexError as e: # pragma: no cover
- raise ValueError('Invalid arg: `addr_infos`') from e
+ raise ValueError("Invalid arg: `addr_infos`") from e
- ssl: Optional[SSLContext] = kwargs.get('ssl') # type: ignore
+ ssl: SSLContext | None = kwargs.get("ssl")
try:
return await self._connect_via_proxy(
host=host,
@@ -86,9 +92,9 @@
self,
host: str,
port: int,
- ssl: Optional[SSLContext] = None,
- timeout: Optional[float] = None,
- ) -> Tuple[asyncio.Transport, ResponseHandler]:
+ ssl: SSLContext | None = None,
+ timeout: float | None = None,
+ ) -> tuple[asyncio.Transport, ResponseHandler]:
raise NotImplementedError
@@ -98,13 +104,13 @@
host: str,
port: int,
proxy_type: ProxyType = ProxyType.SOCKS5,
- username: Optional[str] = None,
- password: Optional[str] = None,
- rdns: Optional[bool] = None,
- proxy_ssl: Optional[SSLContext] = None,
+ username: str | None = None,
+ password: str | None = None,
+ rdns: bool | None = None, # noqa: FBT001
+ proxy_ssl: SSLContext | None = None,
**kwargs: Any,
) -> None:
- kwargs['resolver'] = NoResolver()
+ kwargs["resolver"] = NoResolver()
super().__init__(**kwargs)
self._proxy_type = proxy_type
@@ -119,9 +125,9 @@
self,
host: str,
port: int,
- ssl: Optional[SSLContext] = None,
- timeout: Optional[float] = None,
- ) -> Tuple[asyncio.Transport, ResponseHandler]:
+ ssl: SSLContext | None = None,
+ timeout: float | None = None,
+ ) -> tuple[asyncio.Transport, ResponseHandler]:
proxy = Proxy(
proxy_type=self._proxy_type,
host=self._proxy_host,
@@ -139,7 +145,7 @@
timeout=timeout,
)
- transport: asyncio.Transport = stream.writer.transport
+ transport = stream.writer.transport
protocol: ResponseHandler = _ResponseHandler(
loop=self._loop,
writer=stream.writer,
@@ -148,10 +154,10 @@
transport.set_protocol(protocol)
protocol.connection_made(transport)
- return transport, protocol
+ return transport, protocol # type:ignore[return-value]
@classmethod
- def from_url(cls, url: str, **kwargs: Any) -> 'ProxyConnector':
+ def from_url(cls, url: str, **kwargs: Any) -> ProxyConnector:
proxy_type, host, port, username, password = parse_proxy_url(url)
return cls(
proxy_type=proxy_type,
@@ -167,14 +173,14 @@
proxy_type: ProxyType
host: str
port: int
- username: Optional[str] = None
- password: Optional[str] = None
- rdns: Optional[bool] = None
+ username: str | None = None
+ password: str | None = None
+ rdns: bool | None = None
class ChainProxyConnector(_BaseProxyConnector):
- def __init__(self, proxy_infos: Iterable[ProxyInfo], **kwargs):
- kwargs['resolver'] = NoResolver()
+ def __init__(self, proxy_infos: Iterable[ProxyInfo], **kwargs: Any) ->
None:
+ kwargs["resolver"] = NoResolver()
super().__init__(**kwargs)
self._proxy_infos = proxy_infos
@@ -183,9 +189,9 @@
self,
host: str,
port: int,
- ssl: Optional[SSLContext] = None,
- timeout: Optional[float] = None,
- ) -> Tuple[asyncio.Transport, ResponseHandler]:
+ ssl: SSLContext | None = None,
+ timeout: float | None = None,
+ ) -> tuple[asyncio.Transport, ResponseHandler]:
forward = None
proxy = None
for info in self._proxy_infos:
@@ -209,7 +215,7 @@
timeout=timeout,
)
- transport: asyncio.Transport = stream.writer.transport
+ transport = stream.writer.transport
protocol: ResponseHandler = _ResponseHandler(
loop=self._loop,
writer=stream.writer,
@@ -218,10 +224,10 @@
transport.set_protocol(protocol)
protocol.connection_made(transport)
- return transport, protocol
+ return transport, protocol # type:ignore[return-value]
@classmethod
- def from_urls(cls, urls: Iterable[str], **kwargs: Any) ->
'ChainProxyConnector':
+ def from_urls(cls, urls: Iterable[str], **kwargs: Any) ->
ChainProxyConnector:
infos = []
for url in urls:
proxy_type, host, port, username, password = parse_proxy_url(url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/aiohttp_socks/utils.py
new/aiohttp_socks-0.12.0/aiohttp_socks/utils.py
--- old/aiohttp_socks-0.11.0/aiohttp_socks/utils.py 2022-10-16
08:57:36.000000000 +0200
+++ new/aiohttp_socks-0.12.0/aiohttp_socks/utils.py 2026-08-05
05:21:57.414068700 +0200
@@ -1,3 +1,4 @@
+# ruff: noqa: ANN001,ANN201,ANN003,PLR0913
import asyncio
import warnings
@@ -11,7 +12,7 @@
port=None,
*,
proxy_type=ProxyType.SOCKS5,
- proxy_host='127.0.0.1',
+ proxy_host="127.0.0.1",
proxy_port=1080,
username=None,
password=None,
@@ -20,20 +21,22 @@
**kwargs,
):
warnings.warn(
- 'open_connection is deprecated. '
- 'Use https://github.com/romis2012/python-socks directly instead.',
+ "open_connection is deprecated. "
+ "Use https://github.com/romis2012/python-socks directly instead.",
DeprecationWarning,
stacklevel=2,
)
if host is None or port is None:
- raise ValueError('host and port must be specified') # pragma: no cover
+ 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_type, proxy_host, proxy_port, username, password =
parse_proxy_url(
+ proxy_url
+ )
proxy = Proxy.create(
proxy_type=proxy_type,
@@ -58,7 +61,7 @@
port=None,
*,
proxy_type=ProxyType.SOCKS5,
- proxy_host='127.0.0.1',
+ proxy_host="127.0.0.1",
proxy_port=1080,
username=None,
password=None,
@@ -67,23 +70,25 @@
**kwargs,
):
warnings.warn(
- 'create_connection is deprecated. '
- 'Use https://github.com/romis2012/python-socks directly instead.',
+ "create_connection is deprecated. "
+ "Use https://github.com/romis2012/python-socks directly instead.",
DeprecationWarning,
stacklevel=2,
)
if protocol_factory is None:
- raise ValueError('protocol_factory must be specified') # pragma: no
cover
+ 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
+ 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_type, proxy_host, proxy_port, username, password =
parse_proxy_url(
+ proxy_url
+ )
proxy = Proxy.create(
proxy_type=proxy_type,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/aiohttp_socks.egg-info/PKG-INFO
new/aiohttp_socks-0.12.0/aiohttp_socks.egg-info/PKG-INFO
--- old/aiohttp_socks-0.11.0/aiohttp_socks.egg-info/PKG-INFO 2025-12-09
14:35:38.000000000 +0100
+++ new/aiohttp_socks-0.12.0/aiohttp_socks.egg-info/PKG-INFO 2026-08-12
06:42:27.275502400 +0200
@@ -1,9 +1,9 @@
Metadata-Version: 2.4
Name: aiohttp_socks
-Version: 0.11.0
+Version: 0.12.0
Summary: Proxy connector for aiohttp
Author-email: Roman Snegirev <[email protected]>
-License: Apache-2.0
+License-Expression: Apache-2.0
Project-URL: homepage, https://github.com/romis2012/aiohttp-socks
Project-URL: repository, https://github.com/romis2012/aiohttp-socks
Keywords: asyncio,aiohttp,socks,socks5,socks4,http,proxy
@@ -11,7 +11,6 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
@@ -24,12 +23,11 @@
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Intended Audience :: Developers
Classifier: Framework :: AsyncIO
-Classifier: License :: OSI Approved :: Apache Software License
-Requires-Python: >=3.8.0
+Requires-Python: >=3.9.0
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: aiohttp>=3.10.0
-Requires-Dist: python-socks[asyncio]<3.0.0,>=2.4.3
+Requires-Dist: python-socks[asyncio]<4.0.0,>=2.4.3
Dynamic: license-file
## aiohttp-socks
@@ -47,7 +45,7 @@
## Requirements
-- Python >= 3.8
+- Python >= 3.9
- aiohttp >= 3.10.0
- python-socks[asyncio] >= 2.4.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/aiohttp_socks-0.11.0/aiohttp_socks.egg-info/requires.txt
new/aiohttp_socks-0.12.0/aiohttp_socks.egg-info/requires.txt
--- old/aiohttp_socks-0.11.0/aiohttp_socks.egg-info/requires.txt
2025-12-09 14:35:38.000000000 +0100
+++ new/aiohttp_socks-0.12.0/aiohttp_socks.egg-info/requires.txt
2026-08-12 06:42:27.276502600 +0200
@@ -1,2 +1,2 @@
aiohttp>=3.10.0
-python-socks[asyncio]<3.0.0,>=2.4.3
+python-socks[asyncio]<4.0.0,>=2.4.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/pyproject.toml
new/aiohttp_socks-0.12.0/pyproject.toml
--- old/aiohttp_socks-0.11.0/pyproject.toml 2025-11-10 09:42:18.000000000
+0100
+++ new/aiohttp_socks-0.12.0/pyproject.toml 2026-08-12 06:17:26.372889000
+0200
@@ -1,23 +1,22 @@
[build-system]
-requires = ['setuptools']
-build-backend = 'setuptools.build_meta'
+requires = ["setuptools >= 77.0"]
+build-backend = "setuptools.build_meta"
[project]
-name = 'aiohttp_socks'
-license = { text = 'Apache-2.0' }
-description = 'Proxy connector for aiohttp'
-readme = 'README.md'
-authors = [{ name = 'Roman Snegirev', email = '[email protected]' }]
-keywords = ['asyncio', 'aiohttp', 'socks', 'socks5', 'socks4', 'http', 'proxy']
-requires-python = ">=3.8.0"
-dependencies = ['aiohttp>=3.10.0', 'python-socks[asyncio]>=2.4.3,<3.0.0']
-dynamic = ['version']
+name = "aiohttp_socks"
+license = "Apache-2.0"
+description = "Proxy connector for aiohttp"
+readme = "README.md"
+authors = [{ name = "Roman Snegirev", email = "[email protected]" }]
+keywords = ["asyncio", "aiohttp", "socks", "socks5", "socks4", "http", "proxy"]
+requires-python = ">=3.9.0"
+
+dynamic = ["version"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
@@ -30,25 +29,79 @@
"Topic :: Internet :: WWW/HTTP",
"Intended Audience :: Developers",
"Framework :: AsyncIO",
- "License :: OSI Approved :: Apache Software License",
+]
+
+dependencies = ["aiohttp>=3.10.0", "python-socks[asyncio]>=2.4.3,<4.0.0"]
+
+[dependency-groups]
+dev = [
+ "anyio>=4.12.1",
+ "pytest>=8.4.2",
+ "pytest-asyncio>=1.2.0",
+ "pytest-cov>=7.1.0",
+ "tiny-proxy>=0.3.0",
+ "trustme>=1.2.1",
+ "starlette>=0.49.3",
+ "uvicorn>=0.39.0",
+ "yarl>=1.22.0",
+ "mypy>=1.19.1",
+ "ruff>=0.16.1",
]
[project.urls]
-homepage = 'https://github.com/romis2012/aiohttp-socks'
-repository = 'https://github.com/romis2012/aiohttp-socks'
+homepage = "https://github.com/romis2012/aiohttp-socks"
+repository = "https://github.com/romis2012/aiohttp-socks"
[tool.setuptools.dynamic]
-version = { attr = 'aiohttp_socks.__version__' }
+version = { attr = "aiohttp_socks.__version__" }
[tool.setuptools.packages.find]
-include = ['aiohttp_socks*']
+include = ["aiohttp_socks*"]
+
+[tool.pytest.ini_options]
+asyncio_mode = "strict"
+
-[tool.black]
+[tool.mypy]
+allow_redefinition = true
+disable_error_code = ["import-untyped", "no-redef"]
+
+[tool.ruff]
line-length = 89
-target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
-skip-string-normalization = true
-preview = true
-verbose = true
+indent-width = 4
-[tool.pytest.ini_options]
-asyncio_mode = 'strict'
+[tool.ruff.lint]
+select = ["ALL"]
+ignore = [
+ "D",
+ "TD",
+ "CPY001", # missing-copyright-notice (CPY001)
+ "ANN401", # any-type (ANN401)
+ "FA100", # future-rewritable-type-annotation (FA100)
+ "S101", # assert (S101)
+ "COM812", # missing-trailing-comma (COM812),
+ "TRY003", # raise-vanilla-args (TRY003)
+ "EM101", # raw-string-in-exception (EM101)
+ "EM102", # f-string-in-exception (EM102)
+ "RET504", # unnecessary-assign (RET504)
+ "ERA001", # commented-out-code (ERA001)
+ "TC001", # typing-only-first-party-import (TC001)
+ "TC002", # typing-only-third-party-import (TC002)
+ "TC003", # typing-only-standard-library-import (TC003)
+]
+fixable = ["ALL"]
+unfixable = [
+ "RET505", # superfluous-else-return (RET505)
+]
+[tool.ruff.lint.pylint]
+max-args = 8
+
+[tool.ruff.lint.per-file-ignores]
+"tests/*" = [
+ "PLR2004", # magic-value-comparison (PLR2004)
+ "PT011", # pytest-raises-too-broad (PT011)
+ "C416", # unnecessary-comprehension (C416)
+ "T201", # print (T201)
+ "PT007", # pytest-parametrize-values-wrong-type (PT007)
+ "FBT001", # boolean-type-hint-positional-argument (FBT001)
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.11.0/tests/test_connector.py
new/aiohttp_socks-0.12.0/tests/test_connector.py
--- old/aiohttp_socks-0.11.0/tests/test_connector.py 2025-12-09
13:37:38.000000000 +0100
+++ new/aiohttp_socks-0.12.0/tests/test_connector.py 2026-08-07
08:05:51.778668900 +0200
@@ -1,62 +1,72 @@
+from __future__ import annotations
+
import asyncio
import ssl
import aiohttp
-import pytest # noqa
+import pytest
from aiohttp import ClientResponse, TCPConnector
-from yarl import URL # noqa
+from yarl import URL
from aiohttp_socks import (
- ProxyType,
- ProxyConnector,
ChainProxyConnector,
- ProxyInfo,
- ProxyError,
ProxyConnectionError,
+ ProxyConnector,
+ ProxyError,
+ ProxyInfo,
ProxyTimeoutError,
- open_connection,
+ ProxyType,
create_connection,
+ open_connection,
)
from tests.config import (
- TEST_URL_IPV4,
- SOCKS5_IPV4_URL,
- PROXY_HOST_IPV4,
- SOCKS5_PROXY_PORT,
+ HTTP_PROXY_PORT,
+ HTTP_PROXY_URL,
LOGIN,
PASSWORD,
- TEST_URL_IPV4_DELAY,
+ PROXY_HOST_IPV4,
SKIP_IPV6_TESTS,
- SOCKS5_IPV6_URL,
- SOCKS4_URL,
- HTTP_PROXY_URL,
SOCKS4_PROXY_PORT,
- HTTP_PROXY_PORT,
+ SOCKS4_URL,
+ SOCKS5_IPV4_URL,
+ SOCKS5_IPV6_URL,
+ SOCKS5_PROXY_PORT,
+ TEST_URL_IPV4,
+ TEST_URL_IPV4_DELAY,
TEST_URL_IPV4_HTTPS,
)
async def fetch(
connector: TCPConnector,
- url: str,
- timeout=None,
- ssl_context=None,
+ url: str | URL,
+ timeout: float | aiohttp.ClientTimeout | None = None,
+ ssl_context: ssl.SSLContext | None = None,
) -> ClientResponse:
url = URL(url)
- if url.scheme == 'https':
- dest_ssl = ssl_context
- else:
- dest_ssl = None
+ dest_ssl = ssl_context if url.scheme == "https" else None
+
+ if isinstance(timeout, (int, float)):
+ timeout = aiohttp.ClientTimeout(total=timeout)
- async with aiohttp.ClientSession(connector=connector) as session:
- async with session.get(url, ssl=dest_ssl, timeout=timeout) as resp:
+ async with aiohttp.ClientSession(connector=connector) as session: # noqa:
SIM117
+ async with session.get(
+ url,
+ ssl=dest_ssl, # type:ignore[arg-type]
+ timeout=timeout,
+ ) as resp:
return resp
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]('rdns', (True, False))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("rdns", (True, False))
@pytest.mark.asyncio
-async def test_socks5_proxy_ipv4(url, rdns, target_ssl_context):
+async def test_socks5_proxy_ipv4(
+ url: str,
+ rdns: bool,
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ProxyConnector.from_url(SOCKS5_IPV4_URL, rdns=rdns)
res = await fetch(
connector=connector,
@@ -67,13 +77,15 @@
@pytest.mark.asyncio
-async def test_socks5_proxy_with_invalid_credentials(target_ssl_context):
+async def test_socks5_proxy_with_invalid_credentials(
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ProxyConnector(
proxy_type=ProxyType.SOCKS5,
host=PROXY_HOST_IPV4,
port=SOCKS5_PROXY_PORT,
username=LOGIN,
- password=PASSWORD + 'aaa',
+ password=PASSWORD + "aaa",
)
with pytest.raises(ProxyError):
await fetch(
@@ -84,7 +96,7 @@
@pytest.mark.asyncio
-async def test_socks5_proxy_with_timeout(target_ssl_context):
+async def test_socks5_proxy_with_timeout(target_ssl_context: ssl.SSLContext)
-> None:
connector = ProxyConnector(
proxy_type=ProxyType.SOCKS5,
host=PROXY_HOST_IPV4,
@@ -102,7 +114,9 @@
@pytest.mark.asyncio
-async def test_socks5_proxy_with_proxy_connect_timeout(target_ssl_context):
+async def test_socks5_proxy_with_proxy_connect_timeout(
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ProxyConnector.from_url(SOCKS5_IPV4_URL)
timeout = aiohttp.ClientTimeout(total=32, sock_connect=0.001)
with pytest.raises(ProxyTimeoutError):
@@ -115,7 +129,10 @@
@pytest.mark.asyncio
-async def test_socks5_proxy_with_invalid_proxy_port(unused_tcp_port,
target_ssl_context):
+async def test_socks5_proxy_with_invalid_proxy_port(
+ unused_tcp_port: int,
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ProxyConnector(
proxy_type=ProxyType.SOCKS5,
host=PROXY_HOST_IPV4,
@@ -131,10 +148,10 @@
)
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
@pytest.mark.skipif(SKIP_IPV6_TESTS, reason="TravisCI doesn't support ipv6")
@pytest.mark.asyncio
-async def test_socks5_proxy_ipv6(url, target_ssl_context):
+async def test_socks5_proxy_ipv6(url: str, target_ssl_context: ssl.SSLContext)
-> None:
connector = ProxyConnector.from_url(SOCKS5_IPV6_URL)
res = await fetch(
connector=connector,
@@ -144,10 +161,14 @@
assert res.status == 200
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]('rdns', (True, False))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("rdns", (True, False))
@pytest.mark.asyncio
-async def test_socks4_proxy(url, rdns, target_ssl_context):
+async def test_socks4_proxy(
+ url: str,
+ rdns: bool,
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ProxyConnector.from_url(
SOCKS4_URL,
rdns=rdns,
@@ -160,9 +181,9 @@
assert res.status == 200
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
@pytest.mark.asyncio
-async def test_http_proxy(url, target_ssl_context):
+async def test_http_proxy(url: str, target_ssl_context: ssl.SSLContext) ->
None:
connector = ProxyConnector.from_url(HTTP_PROXY_URL)
res = await fetch(
connector=connector,
@@ -172,9 +193,12 @@
assert res.status == 200
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
@pytest.mark.asyncio
-async def test_chain_proxy_from_url(url, target_ssl_context):
+async def test_chain_proxy_from_url(
+ url: str,
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ChainProxyConnector.from_urls(
[SOCKS5_IPV4_URL, SOCKS4_URL, HTTP_PROXY_URL]
)
@@ -186,10 +210,14 @@
assert res.status == 200
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]('rdns', (True, False))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("rdns", (True, False))
@pytest.mark.asyncio
-async def test_chain_proxy_ctor(url, rdns, target_ssl_context):
+async def test_chain_proxy_ctor(
+ url: str,
+ rdns: bool,
+ target_ssl_context: ssl.SSLContext,
+) -> None:
connector = ChainProxyConnector(
[
ProxyInfo(
@@ -224,14 +252,18 @@
assert res.status == 200
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]('rdns', (True, False))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("rdns", (True, False))
@pytest.mark.asyncio
-async def test_socks5_open_connection(url, rdns, target_ssl_context):
+async def test_socks5_open_connection(
+ url: str,
+ rdns: bool,
+ target_ssl_context: ssl.SSLContext,
+) -> None:
url = URL(url)
ssl_context = None
- if url.scheme == 'https':
+ if url.scheme == "https":
ssl_context = target_ssl_context
reader, writer = await open_connection(
@@ -242,28 +274,30 @@
server_hostname=url.host if ssl_context else None,
rdns=rdns,
)
- request = "GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (
- url.path_qs,
- url.host,
+ # fmt:off
+ request = (
+ f"GET {url.path_qs} HTTP/1.1\r\n"
+ f"Host: {url.host}\r\n"
+ f"Connection: close\r\n\r\n"
)
-
+ # fmt:on
writer.write(request.encode())
response = await reader.read(-1)
- assert b'200 OK' in response
+ assert b"200 OK" in response
[email protected]('url', (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]('rdns', (True, False))
[email protected]("url", (TEST_URL_IPV4, TEST_URL_IPV4_HTTPS))
[email protected]("rdns", (True, False))
@pytest.mark.asyncio
async def test_socks5_http_create_connection(
url: str,
rdns: bool,
target_ssl_context: ssl.SSLContext,
-):
+) -> None:
url = URL(url)
ssl_context = None
- if url.scheme == 'https':
+ if url.scheme == "https":
ssl_context = target_ssl_context
event_loop = asyncio.get_running_loop()
@@ -282,11 +316,14 @@
writer = asyncio.StreamWriter(transport, protocol, reader, event_loop)
- request = "GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (
- url.path_qs,
- url.host,
+ # fmt:off
+ request = (
+ f"GET {url.path_qs} HTTP/1.1\r\n"
+ f"Host: {url.host}\r\n"
+ f"Connection: close\r\n\r\n"
)
+ # fmt:on
writer.write(request.encode())
response = await reader.read(-1)
- assert b'200 OK' in response
+ assert b"200 OK" in response
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-08-19 08:05:11.000000000 +0200
@@ -0,0 +1,4 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild