aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Lib/inspect.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2025-06-13 00:05:26 +0300
committershadchin <shadchin@yandex-team.com>2025-06-13 00:35:30 +0300
commit796b9088366b10b4cd42885101fc20c0b5709b07 (patch)
treef287eacb0b95ffd7cabf95b16cafb4788645dc38 /contrib/tools/python3/Lib/inspect.py
parentc72bca862651e507d2ff4980ef7f4ff7267a7227 (diff)
downloadydb-796b9088366b10b4cd42885101fc20c0b5709b07.tar.gz
Update Python 3 to 3.12.10
commit_hash:dd2398e159fe1d72ea6b12da52fccc933a41a785
Diffstat (limited to 'contrib/tools/python3/Lib/inspect.py')
-rw-r--r--contrib/tools/python3/Lib/inspect.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/tools/python3/Lib/inspect.py b/contrib/tools/python3/Lib/inspect.py
index b630cb28359..2a8d9b053cc 100644
--- a/contrib/tools/python3/Lib/inspect.py
+++ b/contrib/tools/python3/Lib/inspect.py
@@ -3161,6 +3161,9 @@ class Signature:
break
elif param.name in kwargs:
if param.kind == _POSITIONAL_ONLY:
+ if param.default is _empty:
+ msg = f'missing a required positional-only argument: {param.name!r}'
+ raise TypeError(msg)
# Raise a TypeError once we are sure there is no
# **kwargs param later.
pos_only_param_in_kwargs.append(param)