diff options
Diffstat (limited to 'dev-python/zeep')
-rw-r--r-- | dev-python/zeep/Manifest | 3 | ||||
-rw-r--r-- | dev-python/zeep/files/zeep-4.1.0-cached-prop.patch | 100 | ||||
-rw-r--r-- | dev-python/zeep/zeep-4.1.0-r1.ebuild (renamed from dev-python/zeep/zeep-4.1.0.ebuild) | 7 |
3 files changed, 108 insertions, 2 deletions
diff --git a/dev-python/zeep/Manifest b/dev-python/zeep/Manifest index d2d696c08a49..647e665c5362 100644 --- a/dev-python/zeep/Manifest +++ b/dev-python/zeep/Manifest @@ -1,3 +1,4 @@ +AUX zeep-4.1.0-cached-prop.patch 3247 BLAKE2B 2ecbafe7bd1dae935dcb6dc0596e68a4d709b04e205cbc58c736fd235e7dc69f66ce5fad86893f1af1d3d77187de92f9f12a7055f8dbbc01c56b273ff500a56c SHA512 36971cc3ab540392cd702edc6cfb8c5db5812f05bcb9e28308c53514e18de2dfd1a29dbac3d6bd53f38f1d315f1a447d974e1a61fb59664bec18567879e080e0 DIST zeep-4.1.0.tar.gz 160333 BLAKE2B d29db92efe048ba854ff14cde062993c3f334cab6cfc122f6db9aa7a1a490c82f93a50ca5028a5f86e316d9ecf567ac40aef10f3e7d8db89376c7d8dea2a2e23 SHA512 acc54f99d21fe401e06418223591bcf8e7f8819e225f892beb0f6e2a1ee359a0da6f9d0aa4212899197c084af37cc56126879b93a22cdad2458e57674bf66ed5 -EBUILD zeep-4.1.0.ebuild 1312 BLAKE2B a24d6d3d7046d0284e9f2f97ef9ab16d060b8bd763c8e725a5cee1cbdb89569433380bd7c1c8c81604c73c24ed6f3d9cad39b0d713fec07e8d84acfaf995b46f SHA512 801f4700513a5d9eadc688276c9f5dee9b76083758d663bc26a7ae8978cf78786795ced33ccbe6ac25c445eac3b5556a11233dc205d8b6e23402d56b487dcef8 +EBUILD zeep-4.1.0-r1.ebuild 1321 BLAKE2B f4597c09cf92a6a9096204c453ef2a3d152748a81c25ff3ddf115c64863677dac46460f57846909a23be7de910b9035aff8c413c0c868d89fa4fb46a9b3a9124 SHA512 a44e8888b3e43d13db40e11e42608be050eae18e2f9f133a4e136d1308ec66afcfd93d2c90f9dd3c9d1383400968996fcdb1b9cfb43593b1d72be990cf134447 MISC metadata.xml 485 BLAKE2B 7bf7fe5fa8c3803d58acb9b572a9b8cf5250f5bb95c95eb385748bd87da46fed52a6c13c48c5c623c61256289b598873c05c7bd24aeac331651708c365974557 SHA512 e4af11481fdcdc75c3e5f31d457707c7ea8baacee3c0e912a93b2d224e60685d821347f6cb7f6f12483e2051043ea25f5560446ef11f210cdd41b13e1e4e1fcc diff --git a/dev-python/zeep/files/zeep-4.1.0-cached-prop.patch b/dev-python/zeep/files/zeep-4.1.0-cached-prop.patch new file mode 100644 index 000000000000..368dca71ad38 --- /dev/null +++ b/dev-python/zeep/files/zeep-4.1.0-cached-prop.patch @@ -0,0 +1,100 @@ +From 25701f0b69ee46914179070b7e8906ea3e521480 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Thu, 11 Nov 2021 08:55:41 +0100 +Subject: [PATCH] Use stdlib functools.cached_property if available + +Python 3.8+ provides a functools.cached_property in the stdlib that is +thread-safe, i.e. equivalent to threaded_cached_property. Use it +instead of adding third-party dependencies whenever available. +--- + setup.py | 2 +- + src/zeep/wsdl/attachments.py | 6 +++++- + src/zeep/xsd/elements/indicators.py | 6 +++++- + src/zeep/xsd/types/any.py | 6 +++++- + src/zeep/xsd/types/complex.py | 6 +++++- + 5 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/setup.py b/setup.py +index cb51ac4..8ef81b6 100755 +--- a/setup.py ++++ b/setup.py +@@ -4,7 +4,7 @@ from setuptools import setup + + install_requires = [ + "attrs>=17.2.0", +- "cached-property>=1.3.0", ++ "cached-property>=1.3.0; python_version<'3.8'", + "isodate>=0.5.4", + "lxml>=4.6.0", + "platformdirs>=1.4.0", +diff --git a/src/zeep/wsdl/attachments.py b/src/zeep/wsdl/attachments.py +index 037e439..075bee5 100644 +--- a/src/zeep/wsdl/attachments.py ++++ b/src/zeep/wsdl/attachments.py +@@ -6,7 +6,11 @@ See https://www.w3.org/TR/SOAP-attachments + + import base64 + +-from cached_property import cached_property ++try: ++ from functools import cached_property ++except ImportError: ++ from cached_property import cached_property ++ + from requests.structures import CaseInsensitiveDict + + +diff --git a/src/zeep/xsd/elements/indicators.py b/src/zeep/xsd/elements/indicators.py +index 40325da..e9ef2c4 100644 +--- a/src/zeep/xsd/elements/indicators.py ++++ b/src/zeep/xsd/elements/indicators.py +@@ -16,7 +16,11 @@ import operator + import typing + from collections import OrderedDict, defaultdict, deque + +-from cached_property import threaded_cached_property ++try: ++ from functools import cached_property as threaded_cached_property ++except ImportError: ++ from cached_property import threaded_cached_property ++ + from lxml import etree + + from zeep.exceptions import UnexpectedElementError, ValidationError +diff --git a/src/zeep/xsd/types/any.py b/src/zeep/xsd/types/any.py +index b4525e4..17f244e 100644 +--- a/src/zeep/xsd/types/any.py ++++ b/src/zeep/xsd/types/any.py +@@ -1,7 +1,11 @@ + import logging + import typing + +-from cached_property import threaded_cached_property ++try: ++ from functools import cached_property as threaded_cached_property ++except ImportError: ++ from cached_property import threaded_cached_property ++ + from lxml import etree + + from zeep.utils import qname_attr +diff --git a/src/zeep/xsd/types/complex.py b/src/zeep/xsd/types/complex.py +index 8141bc1..b2ed9bf 100644 +--- a/src/zeep/xsd/types/complex.py ++++ b/src/zeep/xsd/types/complex.py +@@ -4,7 +4,11 @@ import typing + from collections import OrderedDict, deque + from itertools import chain + +-from cached_property import threaded_cached_property ++try: ++ from functools import cached_property as threaded_cached_property ++except ImportError: ++ from cached_property import threaded_cached_property ++ + from lxml import etree + + from zeep.exceptions import UnexpectedElementError, XMLParseError +-- +2.33.1 + diff --git a/dev-python/zeep/zeep-4.1.0.ebuild b/dev-python/zeep/zeep-4.1.0-r1.ebuild index 579382f9cb1c..e9a0162f28d2 100644 --- a/dev-python/zeep/zeep-4.1.0.ebuild +++ b/dev-python/zeep/zeep-4.1.0-r1.ebuild @@ -18,7 +18,6 @@ IUSE="async" RDEPEND=" >=dev-python/attrs-17.2.0[${PYTHON_USEDEP}] - >=dev-python/cached-property-1.3.0[${PYTHON_USEDEP}] >=dev-python/isodate-0.5.4[${PYTHON_USEDEP}] >=dev-python/lxml-4.6.0[${PYTHON_USEDEP}] >=dev-python/platformdirs-1.4.0[${PYTHON_USEDEP}] @@ -27,6 +26,8 @@ RDEPEND=" >=dev-python/requests-toolbelt-0.7.1[${PYTHON_USEDEP}] dev-python/pytz[${PYTHON_USEDEP}] async? ( >=dev-python/aiohttp-1.0[${PYTHON_USEDEP}] ) +" +BDEPEND=" test? ( dev-python/aiohttp[${PYTHON_USEDEP}] dev-python/aioresponses[${PYTHON_USEDEP}] @@ -41,3 +42,7 @@ RDEPEND=" " distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-cached-prop.patch +) |