Skip to content

Commit e833566

Browse files
author
Christopher Doris
committed
fix world age issue on Julia 1.12
1 parent c3d563e commit e833566

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/JlWrap/any.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ function pyjlany_setattr(self, k_::Py, v_::Py)
2828
v = pyconvert(Any, v_)
2929
if self isa Module && !isdefined(self, k)
3030
# Fix for https://github.com/JuliaLang/julia/pull/54678
31-
Base.Core.eval(self, Expr(:global, k))
31+
@eval self (global $k = $v)
32+
else
33+
setproperty!(self, k, v)
3234
end
33-
setproperty!(self, k, v)
3435
Py(nothing)
3536
end
3637
pyjl_handle_error_type(::typeof(pyjlany_setattr), self, exc) = pybuiltins.AttributeError

0 commit comments

Comments
 (0)