Blame SOURCES/0001-accept-positional-arguments-for-python.dependency.patch

26d557
From a51e8ddfdc246dd3a03edb18712136c38829799f Mon Sep 17 00:00:00 2001
26d557
From: Paolo Bonzini <pbonzini@redhat.com>
26d557
Date: Wed, 2 Nov 2022 10:06:40 +0100
26d557
Subject: [PATCH 1/9] accept positional arguments for python.dependency
26d557
Content-Type: text/plain
26d557
26d557
Partial revert of upstream commit 1f7ab2f0100.
26d557
26d557
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
26d557
---
26d557
 mesonbuild/modules/python.py | 6 +++++-
26d557
 1 file changed, 5 insertions(+), 1 deletion(-)
26d557
26d557
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
26d557
index 6728cd401..39967cbae 100644
26d557
--- a/mesonbuild/modules/python.py
26d557
+++ b/mesonbuild/modules/python.py
26d557
@@ -576,8 +576,12 @@ class PythonInstallation(ExternalProgramHolder):
26d557
     @disablerIfNotFound
26d557
     @permittedKwargs(permitted_dependency_kwargs | {'embed'})
26d557
     @FeatureNewKwargs('python_installation.dependency', '0.53.0', ['embed'])
26d557
-    @noPosargs
26d557
     def dependency_method(self, args: T.List['TYPE_var'], kwargs: 'TYPE_kwargs') -> 'Dependency':
26d557
+        if args:
26d557
+            mlog.warning('python_installation.dependency() does not take any '
26d557
+                         'positional arguments. It always returns a Python '
26d557
+                         'dependency. This will become an error in the future.',
26d557
+                         location=self.interpreter.current_node)
26d557
         disabled, required, feature = extract_required_kwarg(kwargs, self.subproject)
26d557
         if disabled:
26d557
             mlog.log('Dependency', mlog.bold('python'), 'skipped: feature', mlog.bold(feature), 'disabled')
26d557
-- 
26d557
2.38.1
26d557