Finalize Python runtime while shutting down Julia#603
Finalize Python runtime while shutting down Julia#603stevengj merged 4 commits intoJuliaPy:masterfrom
Conversation
| ispynull(o::PyObject) = o.o == PyPtr_NULL | ||
|
|
||
| function pydecref_(o::Union{PyPtr,PyObject}) | ||
| function pydecref_(o::Union{PyPtr,PyObject}) :: Nothing |
There was a problem hiding this comment.
We don't use the return value anywhere. So why not return nothing always?
There was a problem hiding this comment.
It seems better to return something potentially useful (o), so that the result can be chained with some other function. Also, this way it mirrors pyincref. Why not just return o always?
|
There is a segfault in Julia 0.7... https://travis-ci.org/JuliaPy/PyCall.jl/jobs/447533492#L767 |
|
...which is apparently solved by going to non-closure (non- |
|
Re #603 (comment): I changed the return type of |
Basically icorporates changes introduced in JuliaPy#603
* Fix Segfault during finalization Basically icorporates changes introduced in #603 * Fix typo
|
While resolving merge conflicts for #517, I found that the "atexit" tests from this PR are failing due to me having a |
|
How does your startup.jl file affect the test? |
|
It failed because it couldn't find out = read(`$(Base.julia_cmd()) -e $script`, String)doesn't take care of setting the currently used environment. |
|
I should have used |
|
Should I simply fix it in #517? |
|
I'd appreciate if you do it. |
|
Done. |
closes JuliaPy/pyjulia#208
It's a bit scary to play with the shutdown process of two GCs. But it seems to work in simple tests...