Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/JlWrap/any.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function pyjlany_setattr(self, k_::Py, v_::Py)
k = Symbol(pyjl_attr_py2jl(pyconvert(String, k_)))
pydel!(k_)
v = pyconvert(Any, v_)
if VERSION >= v"1.11.0-" && self isa Module && !isdefined(self, k)
# Fix for https://github.com/JuliaLang/julia/pull/54678
Base.Core.eval(self, Expr(:global, k))
end
setproperty!(self, k, v)
Py(nothing)
end
Expand Down
6 changes: 5 additions & 1 deletion test/Aqua.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
# The unbound_args test fails on methods with signature like foo(::Type{Tuple{Vararg{V}}}) where V
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but this is a real unbound_args. V is unbound in Tuple{Vararg{V}} because () is technically a subtype - in which case V has no definition.

Correct signature with bounded V would be Tuple{V,Vararg{V}}

# Seems like a bug.
import Aqua
Aqua.test_all(PythonCall, unbound_args = false)
Aqua.test_all(
PythonCall,
unbound_args = false,
stale_deps = (; ignore = [:REPL])
)
end
Loading