Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-elastic-transport for 
openSUSE:Factory checked in at 2025-01-09 15:05:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-elastic-transport (Old)
 and      /work/SRC/openSUSE:Factory/.python-elastic-transport.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-elastic-transport"

Thu Jan  9 15:05:52 2025 rev:15 rq:1236129 version:8.17.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-elastic-transport/python-elastic-transport.changes
        2024-12-13 22:33:38.934339191 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-elastic-transport.new.1881/python-elastic-transport.changes
      2025-01-09 15:06:33.158093856 +0100
@@ -1,0 +2,8 @@
+Wed Jan  8 09:45:07 UTC 2025 - Daniel Garcia <[email protected]>
+
+- 8.17.0: 
+  * Fix use of SSLContext with sniffing (#199)
+  * Fix enabled_cleanup_closed warning (#202)
+  * Remove unneeded install requirement (#196)
+
+-------------------------------------------------------------------

Old:
----
  elastic-transport-python-8.15.1.tar.gz

New:
----
  elastic-transport-python-8.17.0.tar.gz

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

Other differences:
------------------
++++++ python-elastic-transport.spec ++++++
--- /var/tmp/diff_new_pack.okaJSr/_old  2025-01-09 15:06:33.586111654 +0100
+++ /var/tmp/diff_new_pack.okaJSr/_new  2025-01-09 15:06:33.590111820 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-elastic-transport
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-elastic-transport
-Version:        8.15.1
+Version:        8.17.0
 Release:        0
 Summary:        Transport classes and utilities shared among Python Elastic 
client libraries
 License:        Apache-2.0
@@ -77,6 +77,7 @@
 donttest="$donttest or (TestHttpxAsyncNode and not Creation)"
 # Flaky test
 donttest="$donttest or test_decimal_serialization[OrjsonSerializer]"
+donttest="$donttest or test_sniff_before_requests or 
test_sniffed_nodes_added_to_pool or test_sniff_on_node_failure"
 %pytest -W ignore::DeprecationWarning -k "not ($donttest)"
 
 %files %{python_files}

++++++ elastic-transport-python-8.15.1.tar.gz -> 
elastic-transport-python-8.17.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/.github/workflows/ci.yml 
new/elastic-transport-python-8.17.0/.github/workflows/ci.yml
--- old/elastic-transport-python-8.15.1/.github/workflows/ci.yml        
2024-10-09 13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/.github/workflows/ci.yml        
2025-01-07 09:11:42.000000000 +0100
@@ -3,6 +3,9 @@
 
 on: [push, pull_request]
 
+env:
+  FORCE_COLOR: 1
+
 jobs:
   package:
     runs-on: ubuntu-latest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elastic-transport-python-8.15.1/CHANGELOG.md 
new/elastic-transport-python-8.17.0/CHANGELOG.md
--- old/elastic-transport-python-8.15.1/CHANGELOG.md    2024-10-09 
13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/CHANGELOG.md    2025-01-07 
09:11:42.000000000 +0100
@@ -1,5 +1,12 @@
 # Changelog
 
+## 8.17.0 (2025-01-07)
+
+* Fix use of SSLContext with sniffing 
([#199](https://github.com/elastic/elastic-transport-python/pull/199))
+* Fix enabled_cleanup_closed warning 
([#202](https://github.com/elastic/elastic-transport-python/pull/202))
+* Remove unneeded install requirement 
([#196](https://github.com/elastic/elastic-transport-python/pull/196))
+* Fix aiohttp call type: ignore differently 
([#190](https://github.com/elastic/elastic-transport-python/pull/190))
+
 ## 8.15.1 (2024-10-09)
 
 * Add explicit Python 3.13 support 
([#189](https://github.com/elastic/elastic-transport-python/pull/189))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elastic-transport-python-8.15.1/README.md 
new/elastic-transport-python-8.17.0/README.md
--- old/elastic-transport-python-8.15.1/README.md       2024-10-09 
13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/README.md       2025-01-07 
09:11:42.000000000 +0100
@@ -1,7 +1,7 @@
 # elastic-transport-python
 
-[![PyPI](https://img.shields.io/pypi/v/elastic-transport)](https://pypi.org/elastic-transport)
-[![Python 
Versions](https://img.shields.io/pypi/pyversions/elastic-transport)](https://pypi.org/elastic-transport)
+[![PyPI](https://img.shields.io/pypi/v/elastic-transport)](https://pypi.org/project/elastic-transport)
+[![Python 
Versions](https://img.shields.io/pypi/pyversions/elastic-transport)](https://pypi.org/project/elastic-transport)
 [![PyPI 
Downloads](https://static.pepy.tech/badge/elastic-transport)](https://pepy.tech/project/elastic-transport)
 [![CI 
Status](https://img.shields.io/github/actions/workflow/status/elastic/elastic-transport-python/ci.yml)](https://github.com/elastic/elastic-transport-python/actions)
 
@@ -18,7 +18,7 @@
 ```
 
 Versioning follows the major and minor version of the Elastic Stack version and
-the patch number is incremented for bug fixes within a minor release.          
            |
+the patch number is incremented for bug fixes within a minor release.
 
 ## Documentation
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/elastic_transport/_node/_http_aiohttp.py 
new/elastic-transport-python-8.17.0/elastic_transport/_node/_http_aiohttp.py
--- 
old/elastic-transport-python-8.15.1/elastic_transport/_node/_http_aiohttp.py    
    2024-10-09 13:47:12.000000000 +0200
+++ 
new/elastic-transport-python-8.17.0/elastic_transport/_node/_http_aiohttp.py    
    2025-01-07 09:11:42.000000000 +0100
@@ -22,6 +22,7 @@
 import os
 import re
 import ssl
+import sys
 import warnings
 from typing import Optional, TypedDict, Union
 
@@ -65,6 +66,11 @@
     _AIOHTTP_FIXED_HEAD_BUG = False
 
 
+# Avoid aiohttp enabled_cleanup_closed warning: 
https://github.com/aio-libs/aiohttp/pull/9726
+_NEEDS_CLEANUP_CLOSED_313 = (3, 13, 0) <= sys.version_info < (3, 13, 1)
+_NEEDS_CLEANUP_CLOSED = _NEEDS_CLEANUP_CLOSED_313 or sys.version_info < (3, 
12, 7)
+
+
 class AiohttpHttpNode(BaseAsyncNode):
     """Default asynchronous node class using the ``aiohttp`` library via 
HTTP"""
 
@@ -262,7 +268,7 @@
             connector=aiohttp.TCPConnector(
                 limit_per_host=self._connections_per_node,
                 use_dns_cache=True,
-                enable_cleanup_closed=True,
+                enable_cleanup_closed=_NEEDS_CLEANUP_CLOSED,
                 ssl=self._ssl_context or False,
             ),
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/elastic_transport/_node/_urllib3_chain_certs.py
 
new/elastic-transport-python-8.17.0/elastic_transport/_node/_urllib3_chain_certs.py
--- 
old/elastic-transport-python-8.15.1/elastic_transport/_node/_urllib3_chain_certs.py
 2024-10-09 13:47:12.000000000 +0200
+++ 
new/elastic-transport-python-8.17.0/elastic_transport/_node/_urllib3_chain_certs.py
 2025-01-07 09:11:42.000000000 +0100
@@ -108,7 +108,7 @@
                 if sys.version_info >= (3, 13):
                     fingerprints = [
                         hash_func(cert).digest()
-                        for cert in conn.sock.get_verified_chain()
+                        for cert in conn.sock.get_verified_chain()  # type: 
ignore
                     ]
                 else:
                     # 'get_verified_chain()' and 'Certificate.public_bytes()' 
are private APIs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/elastic_transport/_transport.py 
new/elastic-transport-python-8.17.0/elastic_transport/_transport.py
--- old/elastic-transport-python-8.15.1/elastic_transport/_transport.py 
2024-10-09 13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/elastic_transport/_transport.py 
2025-01-07 09:11:42.000000000 +0100
@@ -540,13 +540,13 @@
 
 def warn_if_varying_node_config_options(node_configs: List[NodeConfig]) -> 
None:
     """Function which detects situations when sniffing may produce incorrect 
configs"""
-    exempt_attrs = {"host", "port", "connections_per_node", "_extras"}
+    exempt_attrs = {"host", "port", "connections_per_node", "_extras", 
"ssl_context"}
     match_attr_dict = None
     for node_config in node_configs:
         attr_dict = {
-            k: v
-            for k, v in dataclasses.asdict(node_config).items()
-            if k not in exempt_attrs
+            field.name: getattr(node_config, field.name)
+            for field in dataclasses.fields(node_config)
+            if field.name not in exempt_attrs
         }
         if match_attr_dict is None:
             match_attr_dict = attr_dict
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/elastic_transport/_version.py 
new/elastic-transport-python-8.17.0/elastic_transport/_version.py
--- old/elastic-transport-python-8.15.1/elastic_transport/_version.py   
2024-10-09 13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/elastic_transport/_version.py   
2025-01-07 09:11:42.000000000 +0100
@@ -15,4 +15,4 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-__version__ = "8.15.1"
+__version__ = "8.17.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elastic-transport-python-8.15.1/setup.cfg 
new/elastic-transport-python-8.17.0/setup.cfg
--- old/elastic-transport-python-8.15.1/setup.cfg       2024-10-09 
13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/setup.cfg       2025-01-07 
09:11:42.000000000 +0100
@@ -3,6 +3,7 @@
 
 [tool:pytest]
 addopts = -vvv --cov-report=term-missing --cov=elastic_transport
+asyncio_default_fixture_loop_scope = "function"
 
 [coverage:report]
 omit = 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elastic-transport-python-8.15.1/setup.py 
new/elastic-transport-python-8.17.0/setup.py
--- old/elastic-transport-python-8.15.1/setup.py        2024-10-09 
13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/setup.py        2025-01-07 
09:11:42.000000000 +0100
@@ -52,7 +52,6 @@
     install_requires=[
         "urllib3>=1.26.2, <3",
         "certifi",
-        "importlib-metadata; python_version<'3.8'",
     ],
     python_requires=">=3.8",
     extras_require={
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/tests/async_/test_async_transport.py 
new/elastic-transport-python-8.17.0/tests/async_/test_async_transport.py
--- old/elastic-transport-python-8.15.1/tests/async_/test_async_transport.py    
2024-10-09 13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/tests/async_/test_async_transport.py    
2025-01-07 09:11:42.000000000 +0100
@@ -18,6 +18,7 @@
 import asyncio
 import random
 import re
+import ssl
 import sys
 import time
 import warnings
@@ -505,13 +506,21 @@
 @pytest.mark.asyncio
 async def test_heterogeneous_node_config_warning_with_sniffing():
     with warnings.catch_warnings(record=True) as w:
+        # SSLContext objects cannot be compared and are thus ignored
+        context = ssl.create_default_context()
         AsyncTransport(
             [
-                NodeConfig("http", "localhost", 80, path_prefix="/a"),
-                NodeConfig("http", "localhost", 81, path_prefix="/b"),
+                NodeConfig(
+                    "https", "localhost", 80, path_prefix="/a", 
ssl_context=context
+                ),
+                NodeConfig(
+                    "https", "localhost", 81, path_prefix="/b", 
ssl_context=context
+                ),
             ],
             sniff_on_start=True,
-            sniff_callback=lambda *_: [],
+            sniff_callback=lambda *_: [
+                NodeConfig("https", "localhost", 80, path_prefix="/a")
+            ],
         )
 
     assert len(w) == 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elastic-transport-python-8.15.1/tests/conftest.py 
new/elastic-transport-python-8.17.0/tests/conftest.py
--- old/elastic-transport-python-8.15.1/tests/conftest.py       2024-10-09 
13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/tests/conftest.py       2025-01-07 
09:11:42.000000000 +0100
@@ -67,7 +67,6 @@
 
 
 @pytest.fixture(scope="session", params=[True, False])
[email protected]("httpbin_node_config")
 def httpbin_cert_fingerprint(request) -> str:
     """Gets the SHA256 fingerprint of the certificate for 'httpbin.org'"""
     sock = socket.create_connection(("httpbin.org", 443))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elastic-transport-python-8.15.1/tests/test_transport.py 
new/elastic-transport-python-8.17.0/tests/test_transport.py
--- old/elastic-transport-python-8.15.1/tests/test_transport.py 2024-10-09 
13:47:12.000000000 +0200
+++ new/elastic-transport-python-8.17.0/tests/test_transport.py 2025-01-07 
09:11:42.000000000 +0100
@@ -17,6 +17,7 @@
 
 import random
 import re
+import ssl
 import threading
 import time
 import warnings
@@ -537,14 +538,19 @@
 
 def test_heterogeneous_node_config_warning_with_sniffing():
     with warnings.catch_warnings(record=True) as w:
+        context = ssl.create_default_context()
         Transport(
             [
-                NodeConfig("http", "localhost", 80, path_prefix="/a"),
-                NodeConfig("http", "localhost", 81, path_prefix="/b"),
+                NodeConfig(
+                    "https", "localhost", 80, path_prefix="/a", 
ssl_context=context
+                ),
+                NodeConfig(
+                    "https", "localhost", 81, path_prefix="/b", 
ssl_context=context
+                ),
             ],
             sniff_on_start=True,
             sniff_callback=lambda *_: [
-                NodeConfig("http", "localhost", 80, path_prefix="/a")
+                NodeConfig("https", "localhost", 80, path_prefix="/a")
             ],
         )
 

Reply via email to