mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-zeep: Update to 4.3.1.
* gnu/packages/patches/python-zeep-Fix-pytest_httpx-test-cases.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove patch. * gnu/packages/python-web.scm (python-zeep): Update to 4.3.1. [source]: Remove patch. [build-system]: Use pyproject-build-system. [arguments]: Add phase 'compatibility; replace custom 'check phase with 'set-HOME phase. [propagated-inputs]: Remove python-cached-property. [native-inputs]: Remove python-aiohttp, python-aioresponses, and python-mock; add nss-certs-for-test, python-coverage, python-flake8, python-flake8-blind-except, python-flake8-debugger, python-isort, python-setuptools, and python-wheel. Change-Id: I0385e304fcb2eeda508bc7d019ca645cf8a36c64
This commit is contained in:
parent
2207089743
commit
4c4fdcaf2d
3 changed files with 25 additions and 92 deletions
|
@ -7,7 +7,7 @@
|
||||||
# Copyright © 2016, 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
|
# Copyright © 2016, 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
|
||||||
# Copyright © 2016, 2017 Rene Saavedra <rennes@openmailbox.org>
|
# Copyright © 2016, 2017 Rene Saavedra <rennes@openmailbox.org>
|
||||||
# Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
|
# Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
|
||||||
# Copyright © 2016-2024 Ricardo Wurmus <rekado@elephly.net>
|
# Copyright © 2016-2025 Ricardo Wurmus <rekado@elephly.net>
|
||||||
# Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
|
# Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
|
||||||
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
|
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
|
||||||
# Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
|
# Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
|
||||||
|
@ -2126,7 +2126,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/python-versioneer-guix-support.patch \
|
%D%/packages/patches/python-versioneer-guix-support.patch \
|
||||||
%D%/packages/patches/python-werkzeug-tests.patch \
|
%D%/packages/patches/python-werkzeug-tests.patch \
|
||||||
%D%/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch \
|
%D%/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch \
|
||||||
%D%/packages/patches/python-zeep-Fix-pytest_httpx-test-cases.patch \
|
|
||||||
%D%/packages/patches/qemu-7.2.4-build-info-manual.patch \
|
%D%/packages/patches/qemu-7.2.4-build-info-manual.patch \
|
||||||
%D%/packages/patches/qemu-build-info-manual.patch \
|
%D%/packages/patches/qemu-build-info-manual.patch \
|
||||||
%D%/packages/patches/qemu-disable-aarch64-migration-test.patch \
|
%D%/packages/patches/qemu-disable-aarch64-migration-test.patch \
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
From 2907848185adcb4e6d8c093db6c617c64cb8c8bf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Georg Sauthoff <mail@gms.tf>
|
|
||||||
Date: Sat, 5 Feb 2022 14:42:10 +0100
|
|
||||||
Subject: [PATCH] Use current pytest_httpx add_response keyword
|
|
||||||
|
|
||||||
The new text keyword was introduced in pytest_httpx 0.14, deprecated
|
|
||||||
in 0.14 and 0.17 and removed in 0.18.
|
|
||||||
|
|
||||||
Thus, an appropriate constraint to that dependency is added.
|
|
||||||
|
|
||||||
FWIW, this fixes the test cases on the upcoming Fedora 36 release.
|
|
||||||
|
|
||||||
See also:
|
|
||||||
- https://github.com/Colin-b/pytest_httpx/blob/develop/CHANGELOG.md#0180---2022-01-17
|
|
||||||
- https://github.com/Colin-b/pytest_httpx/blob/develop/CHANGELOG.md#0140---2021-10-22
|
|
||||||
---
|
|
||||||
setup.py | 2 +-
|
|
||||||
tests/test_async_transport.py | 8 ++++----
|
|
||||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 4cf9073b..58a5c24f 100755
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -29,7 +29,7 @@
|
|
||||||
"freezegun==0.3.15",
|
|
||||||
"pretend==1.0.9",
|
|
||||||
"pytest-cov==2.8.1",
|
|
||||||
- "pytest-httpx",
|
|
||||||
+ "pytest-httpx>=0.14",
|
|
||||||
"pytest-asyncio",
|
|
||||||
"pytest==6.2.5",
|
|
||||||
"requests_mock>=0.7.0",
|
|
||||||
diff --git a/tests/test_async_transport.py b/tests/test_async_transport.py
|
|
||||||
index f5e8d1b0..ee215265 100644
|
|
||||||
--- a/tests/test_async_transport.py
|
|
||||||
+++ b/tests/test_async_transport.py
|
|
||||||
@@ -19,7 +19,7 @@ def test_load(httpx_mock):
|
|
||||||
cache = stub(get=lambda url: None, add=lambda url, content: None)
|
|
||||||
transport = AsyncTransport(cache=cache)
|
|
||||||
|
|
||||||
- httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", data="x")
|
|
||||||
+ httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", text="x")
|
|
||||||
result = transport.load("http://tests.python-zeep.org/test.xml")
|
|
||||||
assert result == b"x"
|
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ def test_load_cache(httpx_mock):
|
|
||||||
cache = InMemoryCache()
|
|
||||||
transport = AsyncTransport(cache=cache)
|
|
||||||
|
|
||||||
- httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", data="x")
|
|
||||||
+ httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", text="x")
|
|
||||||
result = transport.load("http://tests.python-zeep.org/test.xml")
|
|
||||||
assert result == b"x"
|
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ async def test_post(httpx_mock: HTTPXMock):
|
|
||||||
|
|
||||||
envelope = etree.Element("Envelope")
|
|
||||||
|
|
||||||
- httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", data="x")
|
|
||||||
+ httpx_mock.add_response(url="http://tests.python-zeep.org/test.xml", text="x")
|
|
||||||
result = await transport.post_xml(
|
|
||||||
"http://tests.python-zeep.org/test.xml", envelope=envelope, headers={}
|
|
||||||
)
|
|
||||||
@@ -67,7 +67,7 @@ async def test_http_error(httpx_mock: HTTPXMock):
|
|
||||||
transport = AsyncTransport()
|
|
||||||
|
|
||||||
httpx_mock.add_response(
|
|
||||||
- url="http://tests.python-zeep.org/test.xml", data="x", status_code=500
|
|
||||||
+ url="http://tests.python-zeep.org/test.xml", text="x", status_code=500
|
|
||||||
)
|
|
||||||
with pytest.raises(exceptions.TransportError) as exc:
|
|
||||||
transport.load("http://tests.python-zeep.org/test.xml")
|
|
|
@ -9658,27 +9658,29 @@ resources using Web Application Description Language (WADL) files as guides.")
|
||||||
(define-public python-zeep
|
(define-public python-zeep
|
||||||
(package
|
(package
|
||||||
(name "python-zeep")
|
(name "python-zeep")
|
||||||
(version "4.1.0")
|
(version "4.3.1")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "zeep" version))
|
(uri (pypi-uri "zeep" version))
|
||||||
(patches
|
|
||||||
(search-patches "python-zeep-Fix-pytest_httpx-test-cases.patch"))
|
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1ranr4hkjd2kbbhxa3is1qlgkankj3sml5gla6bqs0kbvpmg4rsq"))))
|
(base32 "0vm0asfak0pxfa9i753imcy72hk8gkxbj6pmw185b7dhw7lqalzl"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(replace 'check
|
'(modify-phases %standard-phases
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(add-after 'unpack 'compatibility
|
||||||
(when tests?
|
(lambda _
|
||||||
(setenv "HOME" (getcwd)) ; one test requires write access
|
;; httpx removed the "proxies" keyword. It's now either "mounts"
|
||||||
(invoke "pytest" "-vv")))))))
|
;; or "proxy". See https://github.com/encode/httpx/pull/2879.
|
||||||
|
(substitute* "src/zeep/transports.py"
|
||||||
|
(("proxies=") "proxy="))))
|
||||||
|
;; One test requires write access
|
||||||
|
(add-before 'check 'set-HOME
|
||||||
|
(lambda _ (setenv "HOME" (getcwd)))))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-attrs
|
(list python-attrs
|
||||||
python-cached-property
|
|
||||||
python-isodate
|
python-isodate
|
||||||
python-lxml
|
python-lxml
|
||||||
python-platformdirs
|
python-platformdirs
|
||||||
|
@ -9687,16 +9689,21 @@ resources using Web Application Description Language (WADL) files as guides.")
|
||||||
python-requests-file
|
python-requests-file
|
||||||
python-requests-toolbelt))
|
python-requests-toolbelt))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-aiohttp
|
(list nss-certs-for-test
|
||||||
python-aioresponses
|
python-coverage
|
||||||
|
python-flake8
|
||||||
|
python-flake8-blind-except
|
||||||
|
python-flake8-debugger
|
||||||
python-freezegun
|
python-freezegun
|
||||||
python-mock
|
python-isort
|
||||||
python-pretend
|
python-pretend
|
||||||
python-pytest
|
python-pytest
|
||||||
python-pytest-asyncio
|
python-pytest-asyncio
|
||||||
python-pytest-cov
|
python-pytest-cov
|
||||||
python-pytest-httpx
|
python-pytest-httpx
|
||||||
python-requests-mock))
|
python-requests-mock
|
||||||
|
python-setuptools
|
||||||
|
python-wheel))
|
||||||
(home-page "https://docs.python-zeep.org/en/stable/")
|
(home-page "https://docs.python-zeep.org/en/stable/")
|
||||||
(synopsis "Python SOAP client based on lxml / requests")
|
(synopsis "Python SOAP client based on lxml / requests")
|
||||||
(description "Zeep is a Python SOAP client. Highlights:
|
(description "Zeep is a Python SOAP client. Highlights:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue