This is an automated email from the ASF dual-hosted git repository. jdanek pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-python.git
The following commit(s) were added to refs/heads/main by this push: new 8cbd8ee QPID-7072: modernize the syntax of exec, before later hopefully replacing it (#8) 8cbd8ee is described below commit 8cbd8ee4521afb5d571b585e9eacaa57e847558b Author: Jiri Daněk <jda...@redhat.com> AuthorDate: Mon Apr 10 21:16:27 2023 +0200 QPID-7072: modernize the syntax of exec, before later hopefully replacing it (#8) --- qpid/concurrency.py | 4 ++-- qpid/spec08.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qpid/concurrency.py b/qpid/concurrency.py index eefe0d4..b9df9f1 100644 --- a/qpid/concurrency.py +++ b/qpid/concurrency.py @@ -23,7 +23,7 @@ def synchronized(meth): args, vargs, kwargs, defs = inspect.getargspec(meth) scope = {} scope["meth"] = meth - exec """ + exec(""" def %s%s: %s %s._lock.acquire() @@ -35,7 +35,7 @@ def %s%s: repr(inspect.getdoc(meth)), args[0], inspect.formatargspec(args, vargs, kwargs, defs, formatvalue=lambda x: ""), - args[0]) in scope + args[0]), scope) return scope[meth.__name__] class Waiter(object): diff --git a/qpid/spec08.py b/qpid/spec08.py index a0047e7..b1d0242 100644 --- a/qpid/spec08.py +++ b/qpid/spec08.py @@ -287,7 +287,7 @@ class Method(Metadata): if self.content: code += ", content" code += ")" - exec code in g, l + exec(code, g, l) return l[name] class Field(Metadata): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org