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 2022-10-01 17:42:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-elastic-transport (Old)
and /work/SRC/openSUSE:Factory/.python-elastic-transport.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-elastic-transport"
Sat Oct 1 17:42:14 2022 rev:2 rq:1006512 version:8.4.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-elastic-transport/python-elastic-transport.changes
2022-08-19 17:59:09.128436576 +0200
+++
/work/SRC/openSUSE:Factory/.python-elastic-transport.new.2275/python-elastic-transport.changes
2022-10-01 17:42:20.637581320 +0200
@@ -1,0 +2,6 @@
+Tue Sep 27 19:15:33 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to 8.4.0
+ * Added method for clients to use default ports for URL scheme.
+
+-------------------------------------------------------------------
Old:
----
elastic-transport-python-8.1.2.tar.gz
New:
----
elastic-transport-python-8.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-elastic-transport.spec ++++++
--- /var/tmp/diff_new_pack.eq4dDe/_old 2022-10-01 17:42:21.129582218 +0200
+++ /var/tmp/diff_new_pack.eq4dDe/_new 2022-10-01 17:42:21.133582225 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-elastic-transport
-Version: 8.1.2
+Version: 8.4.0
Release: 0
Summary: Transport classes and utilities shared among Python Elastic
client libraries
License: Apache-2.0
@@ -28,8 +28,8 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: (python-urllib3 >= 1.26.2 with python-urllib3 < 2)
Requires: python-certifi
+Requires: (python-urllib3 >= 1.26.2 with python-urllib3 < 2)
BuildArch: noarch
%if 0%{python_version_nodots} < 37
Requires: python-dataclasses
++++++ elastic-transport-python-8.1.2.tar.gz ->
elastic-transport-python-8.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/.github/workflows/backport.yml
new/elastic-transport-python-8.4.0/.github/workflows/backport.yml
--- old/elastic-transport-python-8.1.2/.github/workflows/backport.yml
1970-01-01 01:00:00.000000000 +0100
+++ new/elastic-transport-python-8.4.0/.github/workflows/backport.yml
2022-08-25 16:46:42.000000000 +0200
@@ -0,0 +1,16 @@
+name: Backport
+on:
+ pull_request:
+ types:
+ - closed
+ - labeled
+
+jobs:
+ backport:
+ runs-on: ubuntu-latest
+ name: Backport
+ steps:
+ - name: Backport
+ uses: tibdex/backport@v1
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/.github/workflows/ci.yml
new/elastic-transport-python-8.4.0/.github/workflows/ci.yml
--- old/elastic-transport-python-8.1.2/.github/workflows/ci.yml 2022-04-19
20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/.github/workflows/ci.yml 2022-08-25
16:46:42.000000000 +0200
@@ -39,7 +39,7 @@
strategy:
fail-fast: false
matrix:
- python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
+ python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
experimental: [false]
runs-on: ubuntu-latest
@@ -67,3 +67,10 @@
run: "nox -rs test-${PYTHON_VERSION%-dev}"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
+ # TEMPORARY for 3.11
+ # https://github.com/aio-libs/aiohttp/issues/6600
+ AIOHTTP_NO_EXTENSIONS: 1
+ # https://github.com/aio-libs/frozenlist/issues/285
+ FROZENLIST_NO_EXTENSIONS: 1
+ # https://github.com/aio-libs/yarl/issues/680
+ YARL_NO_EXTENSIONS: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/elastic-transport-python-8.1.2/CHANGELOG.md
new/elastic-transport-python-8.4.0/CHANGELOG.md
--- old/elastic-transport-python-8.1.2/CHANGELOG.md 2022-04-19
20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/CHANGELOG.md 2022-08-25
16:46:42.000000000 +0200
@@ -1,5 +1,11 @@
# Changelog
+## 8.1.2
+
+### Fixed
+
+- Fixed issue when connecting to an IP address with HTTPS enabled would result
in a `ValueError` for a mismatch between `check_hostname` and `server_hostname`.
+
## 8.1.1
### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/elastic_transport/_node/_http_requests.py
new/elastic-transport-python-8.4.0/elastic_transport/_node/_http_requests.py
---
old/elastic-transport-python-8.1.2/elastic_transport/_node/_http_requests.py
2022-04-19 20:20:56.000000000 +0200
+++
new/elastic-transport-python-8.4.0/elastic_transport/_node/_http_requests.py
2022-08-25 16:46:42.000000000 +0200
@@ -132,7 +132,7 @@
self.session.verify = config.verify_certs
if not config.ssl_show_warn:
- urllib3.disable_warnings() # type: ignore[no-untyped-call]
+ urllib3.disable_warnings()
if (
config.scheme == "https"
@@ -210,7 +210,7 @@
else self.config.request_timeout
}
send_kwargs.update(
- self.session.merge_environment_settings( # type:
ignore[no-untyped-call]
+ self.session.merge_environment_settings( # type: ignore[arg-type]
prepared_request.url, {}, None, None, None
)
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/elastic_transport/_node/_http_urllib3.py
new/elastic-transport-python-8.4.0/elastic_transport/_node/_http_urllib3.py
--- old/elastic-transport-python-8.1.2/elastic_transport/_node/_http_urllib3.py
2022-04-19 20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/elastic_transport/_node/_http_urllib3.py
2022-08-25 16:46:42.000000000 +0200
@@ -118,7 +118,7 @@
category=SecurityWarning,
)
else:
- urllib3.disable_warnings() # type:
ignore[no-untyped-call]
+ urllib3.disable_warnings()
self.pool = pool_class(
config.host,
@@ -222,4 +222,4 @@
"""
Explicitly closes connection
"""
- self.pool.close() # type: ignore[no-untyped-call]
+ self.pool.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/elastic_transport/_version.py
new/elastic-transport-python-8.4.0/elastic_transport/_version.py
--- old/elastic-transport-python-8.1.2/elastic_transport/_version.py
2022-04-19 20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/elastic_transport/_version.py
2022-08-25 16:46:42.000000000 +0200
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-__version__ = "8.1.2"
+__version__ = "8.4.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/elastic_transport/client_utils.py
new/elastic-transport-python-8.4.0/elastic_transport/client_utils.py
--- old/elastic-transport-python-8.1.2/elastic_transport/client_utils.py
2022-04-19 20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/elastic_transport/client_utils.py
2022-08-25 16:46:42.000000000 +0200
@@ -181,23 +181,44 @@
return f"Basic {base64.b64encode((b':'.join(to_bytes(x) for x in
basic_auth))).decode()}"
-def url_to_node_config(url: str) -> NodeConfig:
+def url_to_node_config(
+ url: str, use_default_ports_for_scheme: bool = False
+) -> NodeConfig:
"""Constructs a :class:`elastic_transport.NodeConfig` instance from a URL.
If a username/password are specified in the URL they are converted to an
'Authorization' header.
+
+ :param url: URL to transform into a NodeConfig.
+ :param use_default_ports_for_scheme: If 'True' will resolve default ports
for the given scheme.
"""
try:
- parsed_url = parse_url(url) # type: ignore[no-untyped-call]
+ parsed_url = parse_url(url)
except LocationParseError:
raise ValueError(f"Could not parse URL {url!r}") from None
+ # Only fill in a default port for HTTP and HTTPS
+ # when we know the scheme is one of those two.
+ parsed_port: Optional[int] = parsed_url.port # type: ignore[assignment]
+ if (
+ parsed_url.port is None
+ and parsed_url.scheme is not None
+ and use_default_ports_for_scheme is True
+ ):
+ if parsed_url.scheme == "https":
+ parsed_port = 443
+ elif parsed_url.scheme == "http":
+ parsed_port = 80
+
if any(
component in (None, "")
- for component in (parsed_url.scheme, parsed_url.host, parsed_url.port)
+ for component in (parsed_url.scheme, parsed_url.host, parsed_port)
):
raise ValueError(
"URL must include a 'scheme', 'host', and 'port' component (ie
'https://localhost:9200')"
)
+ assert parsed_url.scheme is not None
+ assert parsed_url.host is not None
+ assert parsed_port is not None
headers = {}
if parsed_url.auth:
@@ -205,11 +226,15 @@
headers["authorization"] = basic_auth_to_header((username, password))
host = parsed_url.host.strip("[]")
- path_prefix = "" if parsed_url.path in (None, "", "/") else parsed_url.path
+ if not parsed_url.path or parsed_url.path == "/":
+ path_prefix = ""
+ else:
+ path_prefix = parsed_url.path
+
return NodeConfig(
scheme=parsed_url.scheme,
host=host,
- port=parsed_url.port,
+ port=parsed_port,
path_prefix=path_prefix,
headers=headers,
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/elastic-transport-python-8.1.2/noxfile.py
new/elastic-transport-python-8.4.0/noxfile.py
--- old/elastic-transport-python-8.1.2/noxfile.py 2022-04-19
20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/noxfile.py 2022-08-25
16:46:42.000000000 +0200
@@ -50,7 +50,7 @@
session.run("mypy", "--strict", "--show-error-codes", "elastic_transport/")
[email protected](python=["3.6", "3.7", "3.8", "3.9", "3.10"])
[email protected](python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
def test(session):
session.install(".[develop]")
session.run(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/elastic-transport-python-8.1.2/tests/test_client_utils.py
new/elastic-transport-python-8.4.0/tests/test_client_utils.py
--- old/elastic-transport-python-8.1.2/tests/test_client_utils.py
2022-04-19 20:20:56.000000000 +0200
+++ new/elastic-transport-python-8.4.0/tests/test_client_utils.py
2022-08-25 16:46:42.000000000 +0200
@@ -198,6 +198,20 @@
)
[email protected](
+ ["url", "port"],
+ [
+ ("http://127.0.0.1", 80),
+ ("http://[::1]", 80),
+ ("HTTPS://localhost", 443),
+ ("https://localhost/url-prefix", 443),
+ ],
+)
+def test_url_to_node_config_use_default_ports_for_scheme(url, port):
+ node_config = url_to_node_config(url, use_default_ports_for_scheme=True)
+ assert node_config.port == port
+
+
def test_url_with_auth_into_authorization():
node_config = url_to_node_config("http://localhost:9200")
assert node_config.headers == {}