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 2023-11-13 22:18:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aiohttp-socks (Old)
and /work/SRC/openSUSE:Factory/.python-aiohttp-socks.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aiohttp-socks"
Mon Nov 13 22:18:09 2023 rev:9 rq:1124986 version:0.8.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-aiohttp-socks/python-aiohttp-socks.changes
2023-09-20 13:28:23.320923800 +0200
+++
/work/SRC/openSUSE:Factory/.python-aiohttp-socks.new.17445/python-aiohttp-socks.changes
2023-11-13 22:20:47.743336741 +0100
@@ -1,0 +2,7 @@
+Fri Nov 10 13:35:29 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 0.8.4:
+ * Reimplement proxy chains
+ * Implement another solution to fix issue #27
+
+-------------------------------------------------------------------
Old:
----
aiohttp_socks-0.8.3.tar.gz
New:
----
aiohttp_socks-0.8.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-aiohttp-socks.spec ++++++
--- /var/tmp/diff_new_pack.ndymzS/_old 2023-11-13 22:20:48.263355888 +0100
+++ /var/tmp/diff_new_pack.ndymzS/_new 2023-11-13 22:20:48.267356035 +0100
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-aiohttp-socks
-Version: 0.8.3
+Version: 0.8.4
Release: 0
Summary: SOCKS proxy connector for aiohttp
License: Apache-2.0
++++++ aiohttp_socks-0.8.3.tar.gz -> aiohttp_socks-0.8.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.8.3/PKG-INFO
new/aiohttp_socks-0.8.4/PKG-INFO
--- old/aiohttp_socks-0.8.3/PKG-INFO 2023-09-06 10:36:36.000000000 +0200
+++ new/aiohttp_socks-0.8.4/PKG-INFO 2023-10-03 10:02:53.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: aiohttp_socks
-Version: 0.8.3
+Version: 0.8.4
Summary: Proxy connector for aiohttp
Home-page: https://github.com/romis2012/aiohttp-socks
Author: Roman Snegirev
@@ -13,9 +13,9 @@
## aiohttp-socks
-[](https://travis-ci.com/github/romis2012/aiohttp-socks)
-[](https://coveralls.io/github/romis2012/aiohttp-socks?branch=master)
-[](https://badge.fury.io/py/aiohttp-socks)
+[](https://github.com/romis2012/aiohttp-socks/actions/workflows/ci.yml)
+[](https://codecov.io/gh/romis2012/aiohttp-socks)
+[](https://pypi.python.org/pypi/aiohttp-socks)
<!--
[](https://pepy.tech/project/aiohttp-socks)
-->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.8.3/README.md
new/aiohttp_socks-0.8.4/README.md
--- old/aiohttp_socks-0.8.3/README.md 2022-01-24 09:58:43.000000000 +0100
+++ new/aiohttp_socks-0.8.4/README.md 2023-10-02 11:51:02.000000000 +0200
@@ -1,8 +1,8 @@
## aiohttp-socks
-[](https://travis-ci.com/github/romis2012/aiohttp-socks)
-[](https://coveralls.io/github/romis2012/aiohttp-socks?branch=master)
-[](https://badge.fury.io/py/aiohttp-socks)
+[](https://github.com/romis2012/aiohttp-socks/actions/workflows/ci.yml)
+[](https://codecov.io/gh/romis2012/aiohttp-socks)
+[](https://pypi.python.org/pypi/aiohttp-socks)
<!--
[](https://pepy.tech/project/aiohttp-socks)
-->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.8.3/aiohttp_socks/__init__.py
new/aiohttp_socks-0.8.4/aiohttp_socks/__init__.py
--- old/aiohttp_socks-0.8.3/aiohttp_socks/__init__.py 2023-09-06
10:27:32.000000000 +0200
+++ new/aiohttp_socks-0.8.4/aiohttp_socks/__init__.py 2023-10-03
09:21:39.000000000 +0200
@@ -1,5 +1,5 @@
__title__ = 'aiohttp-socks'
-__version__ = '0.8.3'
+__version__ = '0.8.4'
from python_socks import (
ProxyError,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.8.3/aiohttp_socks/connector.py
new/aiohttp_socks-0.8.4/aiohttp_socks/connector.py
--- old/aiohttp_socks-0.8.3/aiohttp_socks/connector.py 2023-09-06
10:25:58.000000000 +0200
+++ new/aiohttp_socks-0.8.4/aiohttp_socks/connector.py 2023-10-02
14:01:19.000000000 +0200
@@ -1,14 +1,14 @@
+import asyncio
import socket
import typing
-from typing import Iterable
from asyncio import BaseTransport, StreamWriter
+from typing import Iterable
from aiohttp import TCPConnector
from aiohttp.abc import AbstractResolver
from aiohttp.client_proto import ResponseHandler
from python_socks import ProxyType, parse_proxy_url
from python_socks.async_.asyncio.v2 import Proxy
-from python_socks.async_.asyncio.v2 import ProxyChain
class NoResolver(AbstractResolver):
@@ -28,19 +28,17 @@
pass # pragma: no cover
-class RepairedStreamWriter(StreamWriter):
- def __del__(self):
- pass
-
-
-def patch_stream(stream):
+class _ResponseHandler(ResponseHandler):
"""
- Fix issue https://github.com/romis2012/aiohttp-socks/issues/27
+ To fix issue https://github.com/romis2012/aiohttp-socks/issues/27
+ In Python>=3.11.5 we need to keep a reference to the StreamWriter
+ so that the underlying transport is not closed during garbage collection.
+ See StreamWriter.__del__ method (was added in Python 3.11.5)
"""
- stream.writer.__class__ = RepairedStreamWriter
- while hasattr(stream, '_inner'):
- stream = stream._inner # noqa
- stream.writer.__class__ = RepairedStreamWriter
+
+ def __init__(self, loop: asyncio.AbstractEventLoop, writer: StreamWriter):
+ super().__init__(loop)
+ self._writer = writer
class ProxyConnector(TCPConnector):
@@ -68,7 +66,7 @@
# noinspection PyMethodOverriding
async def _wrap_create_connection(self, protocol_factory, host, port, *,
ssl, **kwargs):
- proxy = Proxy.create(
+ proxy = Proxy(
proxy_type=self._proxy_type,
host=self._proxy_host,
port=self._proxy_port,
@@ -92,13 +90,14 @@
)
transport: BaseTransport = stream.writer.transport
- protocol: ResponseHandler = protocol_factory()
+ protocol: ResponseHandler = _ResponseHandler(
+ loop=self._loop,
+ writer=stream.writer,
+ )
transport.set_protocol(protocol)
protocol.connection_made(transport)
- patch_stream(stream)
-
return transport, protocol
@classmethod
@@ -132,19 +131,19 @@
# noinspection PyMethodOverriding
async def _wrap_create_connection(self, protocol_factory, host, port, *,
ssl, **kwargs):
- proxies = []
+ forward = None
+ proxy = None
for info in self._proxy_infos:
- proxy = Proxy.create(
+ proxy = Proxy(
proxy_type=info.proxy_type,
host=info.host,
port=info.port,
username=info.username,
password=info.password,
rdns=info.rdns,
+ forward=forward,
)
- proxies.append(proxy)
-
- proxy = ProxyChain(proxies)
+ forward = proxy
connect_timeout = None
@@ -160,13 +159,14 @@
)
transport: BaseTransport = stream.writer.transport
- protocol: ResponseHandler = protocol_factory()
+ protocol: ResponseHandler = _ResponseHandler(
+ loop=self._loop,
+ writer=stream.writer,
+ )
transport.set_protocol(protocol)
protocol.connection_made(transport)
- patch_stream(stream)
-
return transport, protocol
@classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.8.3/aiohttp_socks.egg-info/PKG-INFO
new/aiohttp_socks-0.8.4/aiohttp_socks.egg-info/PKG-INFO
--- old/aiohttp_socks-0.8.3/aiohttp_socks.egg-info/PKG-INFO 2023-09-06
10:36:36.000000000 +0200
+++ new/aiohttp_socks-0.8.4/aiohttp_socks.egg-info/PKG-INFO 2023-10-03
10:02:53.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: aiohttp-socks
-Version: 0.8.3
+Version: 0.8.4
Summary: Proxy connector for aiohttp
Home-page: https://github.com/romis2012/aiohttp-socks
Author: Roman Snegirev
@@ -13,9 +13,9 @@
## aiohttp-socks
-[](https://travis-ci.com/github/romis2012/aiohttp-socks)
-[](https://coveralls.io/github/romis2012/aiohttp-socks?branch=master)
-[](https://badge.fury.io/py/aiohttp-socks)
+[](https://github.com/romis2012/aiohttp-socks/actions/workflows/ci.yml)
+[](https://codecov.io/gh/romis2012/aiohttp-socks)
+[](https://pypi.python.org/pypi/aiohttp-socks)
<!--
[](https://pepy.tech/project/aiohttp-socks)
-->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/aiohttp_socks-0.8.3/aiohttp_socks.egg-info/requires.txt
new/aiohttp_socks-0.8.4/aiohttp_socks.egg-info/requires.txt
--- old/aiohttp_socks-0.8.3/aiohttp_socks.egg-info/requires.txt 2023-09-06
10:36:36.000000000 +0200
+++ new/aiohttp_socks-0.8.4/aiohttp_socks.egg-info/requires.txt 2023-10-03
10:02:53.000000000 +0200
@@ -1,2 +1,2 @@
aiohttp>=2.3.2
-python-socks[asyncio]<3.0.0,>=2.0.0
+python-socks[asyncio]<3.0.0,>=2.4.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/aiohttp_socks-0.8.3/setup.py
new/aiohttp_socks-0.8.4/setup.py
--- old/aiohttp_socks-0.8.3/setup.py 2022-10-16 08:23:10.000000000 +0200
+++ new/aiohttp_socks-0.8.4/setup.py 2023-10-02 12:04:49.000000000 +0200
@@ -1,46 +1,41 @@
#!/usr/bin/env python
-import codecs
import os
import re
import sys
-try:
- from setuptools import setup
-except ImportError:
- from distutils.core import setup
-
-version = None
-
-with codecs.open(
- os.path.join(os.path.abspath(os.path.dirname(__file__)), 'aiohttp_socks',
'__init__.py'),
- 'r',
- 'latin1',
-) as fp:
- try:
- version = re.findall(r"^__version__ = '([^']+)'\r?$", fp.read(),
re.M)[0]
- except IndexError:
- raise RuntimeError('Unable to determine version.')
+from setuptools import setup
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()
+
+def get_version():
+ here = os.path.dirname(os.path.abspath(__file__))
+ filename = os.path.join(here, 'aiohttp_socks', '__init__.py')
+ contents = open(filename).read()
+ pattern = r"^__version__ = '(.*?)'$"
+ return re.search(pattern, contents, re.MULTILINE).group(1)
+
+
+def get_long_description():
+ with open('README.md', mode='r', encoding='utf8') as f:
+ return f.read()
+
setup(
name='aiohttp_socks',
author='Roman Snegirev',
author_email='[email protected]',
- version=version,
+ version=get_version(),
license='Apache 2',
url='https://github.com/romis2012/aiohttp-socks',
description='Proxy connector for aiohttp',
- long_description=long_description,
+ long_description=get_long_description(),
long_description_content_type='text/markdown',
packages=['aiohttp_socks'],
keywords='asyncio aiohttp socks socks5 socks4 http proxy',
install_requires=[
'aiohttp>=2.3.2',
- 'python-socks[asyncio]>=2.0.0,<3.0.0',
+ 'python-socks[asyncio]>=2.4.3,<3.0.0',
],
)