- 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) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elastic-transport?expand=0&rev=27
This commit is contained in:
commit
3318949a91
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
BIN
elastic-transport-python-8.13.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
elastic-transport-python-8.13.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
elastic-transport-python-8.15.1.tar.gz
Normal file
3
elastic-transport-python-8.15.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9bc0aa1b94cc0761efeceac5f0ba1d7dd19bf8b5571d863ca49c6b2f212db75c
|
||||
size 76741
|
106
python-elastic-transport.changes
Normal file
106
python-elastic-transport.changes
Normal file
@ -0,0 +1,106 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 5 10:45:51 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- 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 07:55:47 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Skip some failing tests with pytest 8.x.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 09:45:48 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- 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 04:24:39 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- 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 08:17:35 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add requests232.patch to fix compatibility with new requests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 17 13:29:03 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- update to 8.13.0
|
||||
* Support the HTTPX client with asyncio
|
||||
* Added optional orjson serializer support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 20 14:03:15 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 8.12.0:
|
||||
* Fix basic auth built from percent-encoded URLs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 14 10:21:02 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- 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 17:07:21 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- 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 12:00:12 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Update python-urllib3 minimum requirement to build with latest
|
||||
python-urllib3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:24:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:41:03 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 5 12:09:29 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Disable broken test with latest urllib3 release
|
||||
gh#elastic/elastic-transport-python#96
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 27 19:15:33 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- Update to 8.4.0
|
||||
* Added method for clients to use default ports for URL scheme.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 18 16:43:36 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- 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.
|
92
python-elastic-transport.spec
Normal file
92
python-elastic-transport.spec
Normal file
@ -0,0 +1,92 @@
|
||||
#
|
||||
# spec file for package python-elastic-transport
|
||||
#
|
||||
# Copyright (c) 2024 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.15.1
|
||||
Release: 0
|
||||
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)"
|
||||
# gh#elastic/elastic-transport-python#96
|
||||
donttest="$donttest or test_url_to_node_config[https://[::1]:0/-https://[::1]:0-]"
|
||||
# pytest 8.x failures
|
||||
donttest="$donttest or test_sniff_before_requests"
|
||||
donttest="$donttest or test_sniff_on_node_failure"
|
||||
donttest="$donttest or test_sniffed_nodes_added_to_pool"
|
||||
# Fails in 3.12 with DeprecationWarning
|
||||
donttest="$donttest or test_simple_request"
|
||||
# Flaky test
|
||||
donttest="$donttest or test_decimal_serialization[OrjsonSerializer]"
|
||||
%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
|
59
remove-mock.patch
Normal file
59
remove-mock.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 20d207e59f17f9539af12626e2f832f9ad094025 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
Date: Mon, 20 May 2024 11:51:43 +1000
|
||||
Subject: [PATCH] Remove last uses of mock
|
||||
|
||||
The node tests still relied on the external mock library for mocking,
|
||||
whereas other tests have transitioned to unittest.mock. Since we support
|
||||
Python 3.7 and greater, we can remove that requirement and pull them in
|
||||
line too.
|
||||
---
|
||||
setup.py | 1 -
|
||||
tests/node/test_http_requests.py | 2 +-
|
||||
tests/node/test_http_urllib3.py | 2 +-
|
||||
3 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c145012..17370a7 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -63,7 +63,6 @@
|
||||
"pytest-asyncio",
|
||||
"pytest-httpserver",
|
||||
"trustme",
|
||||
- "mock",
|
||||
"requests",
|
||||
"aiohttp",
|
||||
"httpx",
|
||||
diff --git a/tests/node/test_http_requests.py b/tests/node/test_http_requests.py
|
||||
index 2ff7bc0..3a99854 100644
|
||||
--- a/tests/node/test_http_requests.py
|
||||
+++ b/tests/node/test_http_requests.py
|
||||
@@ -18,10 +18,10 @@
|
||||
import gzip
|
||||
import ssl
|
||||
import warnings
|
||||
+from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
-from mock import Mock, patch
|
||||
from requests.auth import HTTPBasicAuth
|
||||
|
||||
from elastic_transport import NodeConfig, RequestsHttpNode
|
||||
diff --git a/tests/node/test_http_urllib3.py b/tests/node/test_http_urllib3.py
|
||||
index fad11e7..25bd920 100644
|
||||
--- a/tests/node/test_http_urllib3.py
|
||||
+++ b/tests/node/test_http_urllib3.py
|
||||
@@ -19,10 +19,10 @@
|
||||
import re
|
||||
import ssl
|
||||
import warnings
|
||||
+from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
import urllib3
|
||||
-from mock import Mock, patch
|
||||
from urllib3.response import HTTPHeaderDict
|
||||
|
||||
from elastic_transport import NodeConfig, TransportError, Urllib3HttpNode
|
Loading…
Reference in New Issue
Block a user