Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
gerrit-hooks has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 3: * update_tracker: OK * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Dan Kenigsberg has submitted this change and it was merged. Change subject: tests: inspect.getargspec() is deprecated in py3 .. tests: inspect.getargspec() is deprecated in py3 We do not want to see following warning during running tests: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead In order to replace getargspec with signature we need compatibility object due to significant differences between both functions. Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Signed-off-by: Piotr KliczewskiReviewed-on: https://gerrit.ovirt.org/64313 Continuous-Integration: Jenkins CI Reviewed-by: Irit Goihman Reviewed-by: Dan Kenigsberg --- M tests/api_test.py M tests/schemaValidationTest.py M tests/testlib.py 3 files changed, 52 insertions(+), 5 deletions(-) Approvals: Piotr Kliczewski: Verified Jenkins CI: Passed CI tests Irit Goihman: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Dan Kenigsberg has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 2: Code-Review+2 raising -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Irit Goihman has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Dan Kenigsberg has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Piotr Kliczewski has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 2: Verified+1 Verified by running build on my f23. -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
gerrit-hooks has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Piotr Kliczewski has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64313/1/tests/testlib.py File tests/testlib.py: Line 45: import mock Line 46: mock Line 47: Line 48: try: Line 49: from inspect import getfullargspec as getargspec > gasp. I see in https://docs.python.org/3/library/inspect.html#inspect.getfu signature, is very compatible with get*argspec :/, will explore Line 50: except ImportError: # py2 Line 51: from inspect import getargspec as getargspec Line 52: getargspec Line 53: -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Piotr Kliczewski has uploaded a new change for review. Change subject: tests: inspect.getargspec() is deprecated in py3 .. tests: inspect.getargspec() is deprecated in py3 We do not want to see following warning during running tests: DeprecationWarning: inspect.getargspec() is deprecated Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Signed-off-by: Piotr Kliczewski--- M tests/api_test.py M tests/schemaValidationTest.py M tests/testlib.py 3 files changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/64313/1 diff --git a/tests/api_test.py b/tests/api_test.py index 3c57381..b977415 100644 --- a/tests/api_test.py +++ b/tests/api_test.py @@ -18,12 +18,11 @@ # Refer to the README and COPYING files for full details of the license # -import inspect - from vdsm.common import api from vdsm.common import exception from vdsm.common import response +from testlib import getargspec from testlib import VdsmTestCase as TestCaseBase @@ -31,10 +30,10 @@ def test_preserve_signature(self): vm = FakeVM() -args = inspect.getargspec(vm.fail) +args = getargspec(vm.fail) self.assertEqual(args.args, ['self', 'exc']) self.assertEqual(args.varargs, None) -self.assertEqual(args.keywords, None) +self.assertEqual(getattr(args, 'keywords', None), None) class TestResponse(TestCaseBase): diff --git a/tests/schemaValidationTest.py b/tests/schemaValidationTest.py index fd87724..13df62f 100644 --- a/tests/schemaValidationTest.py +++ b/tests/schemaValidationTest.py @@ -29,6 +29,7 @@ from vdsm.rpc import Bridge from api import vdsmapi +from testlib import getargspec from testlib import VdsmTestCase as TestCaseBase from contextlib import contextmanager @@ -169,12 +170,12 @@ yield class_name, class_obj def _get_args(self, method_obj): -args = inspect.getargspec(method_obj).args +args = getargspec(method_obj).args args.remove('self') return args def _get_default_args(self, method_obj): -argSpec = inspect.getargspec(method_obj) +argSpec = getargspec(method_obj) if argSpec.defaults: return argSpec.args[- len(argSpec.defaults):] else: diff --git a/tests/testlib.py b/tests/testlib.py index c341c24..7c63a38 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -45,6 +45,12 @@ import mock mock +try: +from inspect import getfullargspec as getargspec +except ImportError: # py2 +from inspect import getargspec as getargspec +getargspec + from nose import config from nose import core from nose import result -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
Dan Kenigsberg has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64313/1/tests/testlib.py File tests/testlib.py: Line 45: import mock Line 46: mock Line 47: Line 48: try: Line 49: from inspect import getfullargspec as getargspec gasp. I see in https://docs.python.org/3/library/inspect.html#inspect.getfullargspec that this itself is deprecated in Python 3.5 in favor of https://docs.python.org/3/library/inspect.html#inspect.signature Since Fedora already has 3.5, can we jump ahead? Line 50: except ImportError: # py2 Line 51: from inspect import getargspec as getargspec Line 52: getargspec Line 53: -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: inspect.getargspec() is deprecated in py3
gerrit-hooks has posted comments on this change. Change subject: tests: inspect.getargspec() is deprecated in py3 .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64313 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25a58ea32bf7548a8f27cc217392fd0958cc8b7d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr KliczewskiGerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org