PythonCall ecosystem updates

There’s been a lot going on in the world of PythonCall.jl and friends, so I thought I’d give a brief round-up of what’s new from the last year.

Firstly, a reminder of the packages I’m talking about:

  • PythonCall.jl: Interoperability with Python.
  • CondaPkg.jl: Integrates the Conda package manager into Julia. Used by PythonCall for managing Python dependencies.
  • JuliaCall: Python analogue of PythonCall for calling into Julia from Python. (Same repo and docs as PythonCall because they are two interfaces to the same code.)
  • JuliaPkg: Python analogue of CondaPkg, integrating the Julia package manager into Python.

And now for my favourite bits of news, most exciting first:

  1. PythonCall has a new NumpyDates module providing a bridge between Julia Dates and NumPy datetime64/timedelta64. You can now convert datetime64, timedelta64 and arrays of these from NumPy to Julia and back.
  2. CondaPkg now uses Pixi by default instead of MicroMamba, making installs much faster.
  3. In PythonCall, GC is now thread-safe so you can use it in a multi-threaded Julia session, although actual Python calls still need to be made on the main thread.
  4. CondaPkg now has dev dependencies, specified in a new [dev] section in CondaPkg.toml. These are only installed if the corresponding project is a package under development or testing. Especially useful to get dependencies needed for your test suite.
  5. A new JuliaPkg CLI you can use like python -m juliapkg --help.
  6. PythonCall now has functions and macros for handling the GIL. They are very much experimental currently, but with care you can now call PythonCall from different threads.
  7. Pip packages in CondaPkg can now be installed in editable mode.
  8. CondaPkg has new options to specify allowed channels, channel aliases, channel order and channel priority, providing much greater control over where packages are sourced.
  9. JuliaCall has new options to override the Julia executable and project used, making JuliaPkg optional.
  10. In PythonCall now you can use your own Python install relative to your Julia project. Previously you had to specify the absolute path to Python. There’s even a @venv shorthand if it is really a Python venv.
  11. JuliaPkg can now ensure Julia and Python use compatible versions of openssl (CondaPkg already does this.)

There have been a lot of contributors making this happen - thank you all!

29 Likes