diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
commit | 2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch) | |
tree | 8c816148bcbd22757d892089c989ae614eae4f5a /dev-python/botocore/files | |
parent | 0f558761aa2dee1017b4751e4017205e015a9560 (diff) |
gentoo resync : 09.07.2022
Diffstat (limited to 'dev-python/botocore/files')
-rw-r--r-- | dev-python/botocore/files/botocore-1.26.0-py311.patch | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/dev-python/botocore/files/botocore-1.26.0-py311.patch b/dev-python/botocore/files/botocore-1.26.0-py311.patch deleted file mode 100644 index 8caa8765c008..000000000000 --- a/dev-python/botocore/files/botocore-1.26.0-py311.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 46a3d92e29a03f547d85861bb6e21281b6a42e60 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sat, 14 May 2022 19:38:23 +0200 -Subject: [PATCH] Replace deprecated inspect.formatargspec() with - inspect.signature() - -Originally submitted by Hugo van Kemenade as #2507. Modified by me -to remove the first positional parameter like the old code did. ---- - botocore/docs/method.py | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) - -diff --git a/botocore/docs/method.py b/botocore/docs/method.py -index 0f7c60f6c..44c97d6e4 100644 ---- a/botocore/docs/method.py -+++ b/botocore/docs/method.py -@@ -11,6 +11,7 @@ - # ANY KIND, either express or implied. See the License for the specific - # language governing permissions and limitations under the License. - import inspect -+import types - - from botocore.docs.example import ( - RequestExampleDocumenter, -@@ -101,14 +102,18 @@ def document_custom_signature( - :param exclude: The names of the parameters to exclude from - documentation. - """ -- argspec = inspect.getfullargspec(method) -- signature_params = inspect.formatargspec( -- args=argspec.args[1:], -- varargs=argspec.varargs, -- varkw=argspec.varkw, -- defaults=argspec.defaults, -- ) -- signature_params = signature_params.lstrip('(') -+ signature = inspect.signature(method) -+ # "raw" class methods are FunctionType and they include "self" param -+ # object methods are MethodType and they skip the "self" param -+ if isinstance(method, types.FunctionType): -+ self_param = next(iter(signature.parameters)) -+ self_kind = signature.parameters[self_param].kind -+ # safety check that we got the right parameter -+ assert self_kind == inspect.Parameter.POSITIONAL_OR_KEYWORD -+ new_params = signature.parameters.copy() -+ del new_params[self_param] -+ signature = signature.replace(parameters=new_params.values()) -+ signature_params = str(signature).lstrip('(') - signature_params = signature_params.rstrip(')') - section.style.start_sphinx_py_method(name, signature_params) - --- -2.35.1 - |