diff --git a/src/Core/Py.jl b/src/Core/Py.jl index abddb83e..c01a2977 100644 --- a/src/Core/Py.jl +++ b/src/Core/Py.jl @@ -364,30 +364,21 @@ Base.broadcastable(x::Py) = Ref(x) # comparisons Base.:(==)(x::Py, y::Py) = pyeq(Bool, x, y) -Base.:(!=)(x::Py, y::Py) = pyne(Bool, x, y) Base.:(<=)(x::Py, y::Py) = pyle(Bool, x, y) Base.:(<)(x::Py, y::Py) = pylt(Bool, x, y) -Base.:(>=)(x::Py, y::Py) = pyge(Bool, x, y) -Base.:(>)(x::Py, y::Py) = pygt(Bool, x, y) Base.isless(x::Py, y::Py) = pylt(Bool, x, y) Base.isequal(x::Py, y::Py) = pyeq(Bool, x, y) # we also allow comparison with numbers Base.:(==)(x::Py, y::Number) = pyeq(Bool, x, y) -Base.:(!=)(x::Py, y::Number) = pyne(Bool, x, y) Base.:(<=)(x::Py, y::Number) = pyle(Bool, x, y) Base.:(<)(x::Py, y::Number) = pylt(Bool, x, y) -Base.:(>=)(x::Py, y::Number) = pyge(Bool, x, y) -Base.:(>)(x::Py, y::Number) = pygt(Bool, x, y) Base.isless(x::Py, y::Number) = pylt(Bool, x, y) Base.isequal(x::Py, y::Number) = pyeq(Bool, x, y) Base.:(==)(x::Number, y::Py) = pyeq(Bool, x, y) -Base.:(!=)(x::Number, y::Py) = pyne(Bool, x, y) Base.:(<=)(x::Number, y::Py) = pyle(Bool, x, y) Base.:(<)(x::Number, y::Py) = pylt(Bool, x, y) -Base.:(>=)(x::Number, y::Py) = pyge(Bool, x, y) -Base.:(>)(x::Number, y::Py) = pygt(Bool, x, y) Base.isless(x::Number, y::Py) = pylt(Bool, x, y) Base.isequal(x::Number, y::Py) = pyeq(Bool, x, y) diff --git a/test/GIL.jl b/test/GIL.jl index ca1f6405..57e1fca5 100644 --- a/test/GIL.jl +++ b/test/GIL.jl @@ -3,7 +3,7 @@ # GIL, these can happen in parallel if Julia has at least 2 threads. function threaded_sleep() PythonCall.GIL.unlock() do - Threads.@threads for i = 1:2 + Threads.@threads :static for i = 1:2 PythonCall.GIL.lock() do pyimport("time").sleep(1) end @@ -24,7 +24,7 @@ end # This calls Python's time.sleep(1) twice concurrently. Since sleep() unlocks the # GIL, these can happen in parallel if Julia has at least 2 threads. function threaded_sleep() - PythonCall.GIL.@unlock Threads.@threads for i = 1:2 + PythonCall.GIL.@unlock Threads.@threads :static for i = 1:2 PythonCall.GIL.@lock pyimport("time").sleep(1) end end