# # spec file for package python-elastic-transport # # 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?sle15_python_module_pythons} Name: python-elastic-transport Version: 8.17.0 Release: 1.2 Summary: Transport classes and utilities shared among Python Elastic client libraries License: Apache-2.0 URL: https://github.com/elastic/elastic-transport-python Source: https://github.com/elastic/elastic-transport-python/archive/refs/tags/v%{version}.tar.gz#/elastic-transport-python-%{version}.tar.gz BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-certifi Requires: python-urllib3 BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module aiohttp} BuildRequires: %{python_module certifi} BuildRequires: %{python_module httpx} BuildRequires: %{python_module opentelemetry-api} BuildRequires: %{python_module opentelemetry-sdk} BuildRequires: %{python_module orjson} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest-httpserver} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests} BuildRequires: %{python_module respx} BuildRequires: %{python_module trustme} BuildRequires: %{python_module urllib3} # /SECTION %python_subpackages %description Transport classes and utilities shared among Python Elastic client libraries %prep %autosetup -p1 -n elastic-transport-python-%{version} sed -i '/addopts/d' setup.cfg %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # these tests fail without proper name resolution or online connection to httpbin.org and badssl.com donttest="(test_http_aiohttp and not TestAiohttpHttpNode)" donttest="$donttest or test_tls_versions" donttest="$donttest or test_assert_fingerprint_in_cert_chain" donttest="$donttest or (test_ssl_assert_fingerprint and httpx)" # Fails in 3.12 with DeprecationWarning donttest="$donttest or test_simple_request" # Mocking error with httpx 0.28 / patched respx 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} %doc CHANGELOG.md README.md %license LICENSE %{python_sitelib}/elastic_transport %{python_sitelib}/elastic_transport-%{version}.dist-info %changelog * Wed Jan 8 2025 Daniel Garcia - 8.17.0: * Fix use of SSLContext with sniffing (#199) * Fix enabled_cleanup_closed warning (#202) * Remove unneeded install requirement (#196) * Thu Dec 12 2024 Ben Greiner - Update test runs: pytest 8 is supported, httpx 0.28 creates problems * Thu Dec 5 2024 Daniel Garcia - drop remove-mock.patch, it's part of upstream now. - Update to 8.15.1 * Add explicit Python 3.13 support (#189) - 8.15.0: * Removed call to raise_for_status() when using HttpxAsyncHttpNode to prevent exceptions being raised for 404 responses (#182) * Documented response classes (#175) * Dropped support for Python 3.7 (#179) * Fri Jun 21 2024 Steve Kowalik - Skip some failing tests with pytest 8.x. * Thu Jun 6 2024 Markéta Machová - Update to 8.13.1 * Fixed requests 2.32 compatibility * Fixed TypeError when two nodes are declared dead at the same time * Added TransportApiResponse - Drop merged requests232.patch * Mon May 27 2024 Steve Kowalik - Switch to pyproject macros. - Require pytest 8 or greater. - Add patch remove-mock.patch: * Remove requirement on mock, now as a patch, rather than sed. * Thu May 23 2024 Markéta Machová - Add requests232.patch to fix compatibility with new requests * Fri May 17 2024 Markéta Machová - update to 8.13.0 * Support the HTTPX client with asyncio * Added optional orjson serializer support * Sat Jan 20 2024 Dirk Müller - update to 8.12.0: * Fix basic auth built from percent-encoded URLs * Thu Dec 14 2023 Dirk Müller - update to 8.11.0: * Always set default HTTPS port to 443 * Drop support for Python 3.6 * Include tests in sdist * Fix `__iter__` return type to Iterator * Sat Dec 2 2023 Dirk Müller - update to 8.10.0: * Support urllib3 2.x in addition to urllib3 1.26.x (#121) * Add 409 to `NOT_DEAD_NODE_HTTP_STATUSES` (#120) * Fixed an issue where a large number of consecutive failures to connect to a node would raise an `OverflowError`. * Fixed an issue to ensure that `ApiResponse` can be pickled. * Tue May 9 2023 Daniel Garcia - Update python-urllib3 minimum requirement to build with latest python-urllib3 * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Mon Dec 5 2022 Daniel Garcia - Disable broken test with latest urllib3 release gh#elastic/elastic-transport-python#96 * Tue Sep 27 2022 Yogalakshmi Arunachalam - Update to 8.4.0 * Added method for clients to use default ports for URL scheme. * Thu Aug 18 2022 Ben Greiner - Initial specfile for v8.3.3 - This library was lifted from elasticsearch-py and then transformed to be used across all Elastic services rather than only Elasticsearch.