From 25c98cfc168b9c7e879a452da4ff0f93b1801637 Mon Sep 17 00:00:00 2001 From: lassepe Date: Mon, 18 Mar 2024 14:07:48 +0100 Subject: [PATCH 1/2] Hot fix for #479 --- src/Core/Core.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Core.jl b/src/Core/Core.jl index e2844200..7a0035e5 100644 --- a/src/Core/Core.jl +++ b/src/Core/Core.jl @@ -14,7 +14,7 @@ using ..GC: GC using ..Utils: Utils using Base: @propagate_inbounds, @kwdef using Dates: Date, Time, DateTime, year, month, day, hour, minute, second, millisecond, microsecond, nanosecond -using MacroTools: @capture +using MacroTools: MacroTools, @capture using Markdown: Markdown include("Py.jl") From 7b177a7d96c9ad08ab9e759322eed1fb6d89ca02 Mon Sep 17 00:00:00 2001 From: lassepe Date: Mon, 18 Mar 2024 14:45:11 +0100 Subject: [PATCH 2/2] Add regression test --- test/Core.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Core.jl b/test/Core.jl index 9e06125c..a27acf25 100644 --- a/test/Core.jl +++ b/test/Core.jl @@ -743,6 +743,7 @@ end @test pyeq(Bool, l["x"], 4) # check global code runs in global scope pyexec("global y; y=x+1", g, l) + @test_throws PythonCall.PyException PythonCall.@pyexec (err = PythonCall.Core.pybuiltins.ValueError) => `raise err` @test pyeq(Bool, g["y"], 5) @test !pycontains(l, "y") # check pyeval converts types correctly