PythonCall.jl icon indicating copy to clipboard operation
PythonCall.jl copied to clipboard

jl.PythonCall.JlWrap.Cjl._pyjlbase_name crash in Python 3.13

Open dpinol opened this issue 6 months ago • 1 comments

Affects: JuliaCall

Describe the bug Just accessing juliacall.Main.PythonCall.JlWrap.Cjl._pyjlbase_name crashes python 3.13.3. It doesn't crash python 3.12. I know it's a private field, but what I actually wanted to do was juliacall.Base.summarysize(juliacall.PythonCall) which crashes due to _pyjlbase_name

from juliacall import Main as jl

jl.PythonCall.JlWrap.Cjl._pyjlbase_name

Your system Please provide detailed information about your system:

  • The operating system: Ubuntu 25.04 (also with Debian GNU/Linux 12 (bookworm))
  • Julia: both 1.10.7 & 1.11.5
  • Python: 3.13.3
  • PythonCall: 0.9.25
  • JuliaCall: 0.9.25. Also with https://github.com/JuliaPy/PythonCall.jl/pull/618 -pip list or conda list and juliapkg.status().
pip list 
Package   Version
--------- -------
filelock  3.18.0
juliacall 0.9.25
juliapkg  0.1.17
pip       25.1.1
semver    3.0.4

  • conda not installed
JuliaPkg Status
/home/dani/.virtualenvs/py13_summary_crash-sjfh94lK/julia_env/pyjuliapkg/juliapkg.json (empty project)
Julia 1.11.5 @ /home/dani/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/bin/julia

dpinol avatar Jun 02 '25 13:06 dpinol

I tried to patch it with jl.Base.setglobal_b(jl.PythonCall.JlWrap.Cjl, jl.Symbol("_pyjlbase_name"), "juliacall.ValueBase"), but I get "invalid redefinition of constant Cjl._pyjlbase_name".

dpinol avatar Jun 02 '25 14:06 dpinol

I think this was another symptom of a bug that was recently fixed - can you try again on latest PythonCall?

cjdoris avatar Aug 30 '25 19:08 cjdoris

I think this was another symptom of a bug that was recently fixed - can you try again on latest PythonCall?

yes, it's now fixed. thanks!

dpinol avatar Sep 17 '25 13:09 dpinol