I may do something wrong, but in my experience, it does not work when done on the Python side in juliacall:
import juliacall
import datetime
from juliacall import Main as jl
jl.seval("using Dates")
In [5]: juliacall.convert(jl.Second, datetime.timedelta(seconds=1))
In [2]: juliapkg.status()
JuliaPkg Status
/home/bt/workspace/myproject/.venv/julia_env/pyjuliapkg/juliapkg.json (empty project)
Julia 1.10.3 @ /home/bt/bin/julia
Affects: JuliaCall
Describe the bug
https://juliapy.github.io/PythonCall.jl/stable/conversion-to-julia/ explicitly tells that datetime.timedelta conversion to Period types is supported.
I may do something wrong, but in my experience, it does not work when done on the Python side in juliacall:
results in:
and
Your system OS: ubuntu 22.04 LTS Julia version: 1.10.3 Python: 3.10.10 PythonCall: 0.9.20 juliacall: 0.9.20 pip list:
juliapkg.status():