When an exception, whether from a python or ruby function, is encountered within a without_gvl block, PyCall discards the exception and returns nil instead of raising the exception.
For example:
math = PyCall.import_module("math")
math.factorial(-1)
# raises an exception PyCall::PyError: <class 'ValueError'>: factorial() not defined for negative values
PyCall.without_gvl do math.factorial(-1) end
# returns nil without raising an exception
I would expect the exception to be raised when exiting the block.
When an exception, whether from a python or ruby function, is encountered within a without_gvl block, PyCall discards the exception and returns nil instead of raising the exception.
For example:
I would expect the exception to be raised when exiting the block.