From 84b85b140b2c655b54499e210d75c6d050accc65 Mon Sep 17 00:00:00 2001 From: Christopher Doris Date: Thu, 16 Oct 2025 13:27:58 +0100 Subject: [PATCH 1/6] require python 3.10 --- .github/workflows/tests.yml | 2 +- CondaPkg.toml | 2 +- README.md | 2 +- docs/src/index.md | 2 +- docs/src/releasenotes.md | 1 + pyproject.toml | 2 +- src/C/context.jl | 4 ++-- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b83210cb..2973a3c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -66,7 +66,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - pyversion: ["3", "3.9"] + pyversion: ["3", "3.10"] juliaexe: ["@JuliaPkg"] include: - os: ubuntu-latest diff --git a/CondaPkg.toml b/CondaPkg.toml index 08aaf949..60d769c2 100644 --- a/CondaPkg.toml +++ b/CondaPkg.toml @@ -10,7 +10,7 @@ version = "<=julia" [deps.python] build = "**cpython**" -version = ">=3.9,<4" +version = ">=3.10,<4" [dev.deps] matplotlib = "" diff --git a/README.md b/README.md index 1b49cbf9..fade1d0b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala - Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python. - Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa. - Beautiful stack-traces. -- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.9 upwards and Python 3.9 upwards. +- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.9 upwards and Python 3.10 upwards. ⭐ If you like this, a GitHub star would be lovely thank you. ⭐ diff --git a/docs/src/index.md b/docs/src/index.md index 2dca5e6b..2f44a626 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -7,4 +7,4 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala - Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python. - Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa. - Beautiful stack-traces. -- Works anywhere: tested on Windows, MacOS and Linux, 32- and 64-bit, Julia Julia 1.9 upwards and Python 3.9 upwards. +- Works anywhere: tested on Windows, MacOS and Linux, 32- and 64-bit, Julia Julia 1.9 upwards and Python 3.10 upwards. diff --git a/docs/src/releasenotes.md b/docs/src/releasenotes.md index 445d8b58..63134ae5 100644 --- a/docs/src/releasenotes.md +++ b/docs/src/releasenotes.md @@ -1,6 +1,7 @@ # Release Notes ## Unreleased +* Minimum supported Python version is now 3.10. * Showing `Py` now respects the `compact` option - output is limited to a single line of at most the display width. * Bug fixes. diff --git a/pyproject.toml b/pyproject.toml index 0a646f05..c2775527 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -requires-python = ">=3.9, <4" +requires-python = ">=3.10, <4" dependencies = ["juliapkg >=0.1.21, <0.2"] [dependency-groups] diff --git a/src/C/context.jl b/src/C/context.jl index 8d2714c5..3118f7fa 100644 --- a/src/C/context.jl +++ b/src/C/context.jl @@ -236,8 +236,8 @@ function init_context() error("Cannot parse version from version string: $(repr(verstr))") end CTX.version = VersionNumber(vermatch.match) - v"3.9" ≤ CTX.version < v"4" || error( - "Only Python 3.9+ is supported, this is Python $(CTX.version) at $(CTX.exe_path===missing ? "unknown location" : CTX.exe_path).", + v"3.10" ≤ CTX.version < v"4" || error( + "Only Python 3.10+ is supported, this is Python $(CTX.version) at $(CTX.exe_path===missing ? "unknown location" : CTX.exe_path).", ) @debug "Initialized PythonCall.jl" CTX.is_embedded CTX.is_initialized CTX.exe_path CTX.lib_path CTX.lib_ptr CTX.pyprogname CTX.pyhome CTX.version From 8663c49768c136494551617b839ace19efc87850 Mon Sep 17 00:00:00 2001 From: Christopher Doris Date: Thu, 16 Oct 2025 13:30:37 +0100 Subject: [PATCH 2/6] require julia 1.10 --- .github/workflows/tests.yml | 2 +- Project.toml | 2 +- README.md | 2 +- docs/src/index.md | 2 +- pysrc/juliacall/juliapkg-dev.json | 2 +- pysrc/juliacall/juliapkg.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2973a3c7..db580f50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: matrix: arch: [x64] # x86 unsupported by MicroMamba os: [ubuntu-latest, windows-latest, macos-latest] - jlversion: ['1','1.9'] + jlversion: ['1','1.10'] pythonexe: ['@CondaPkg'] include: - arch: x64 diff --git a/Project.toml b/Project.toml index 5eb3baf0..8dd63ae8 100644 --- a/Project.toml +++ b/Project.toml @@ -29,7 +29,7 @@ Tables = "1" Test = "1" TestItemRunner = "0 - 999" UnsafePointers = "1" -julia = "1.9" +julia = "1.10" [extensions] PyCallExt = "PyCall" diff --git a/README.md b/README.md index fade1d0b..aa8e8fb3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala - Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python. - Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa. - Beautiful stack-traces. -- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.9 upwards and Python 3.10 upwards. +- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.10 upwards and Python 3.10 upwards. ⭐ If you like this, a GitHub star would be lovely thank you. ⭐ diff --git a/docs/src/index.md b/docs/src/index.md index 2f44a626..22efa41d 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -7,4 +7,4 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala - Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python. - Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa. - Beautiful stack-traces. -- Works anywhere: tested on Windows, MacOS and Linux, 32- and 64-bit, Julia Julia 1.9 upwards and Python 3.10 upwards. +- Works anywhere: tested on Windows, MacOS and Linux, 32- and 64-bit, Julia Julia 1.10 upwards and Python 3.10 upwards. diff --git a/pysrc/juliacall/juliapkg-dev.json b/pysrc/juliacall/juliapkg-dev.json index 144c0090..982c5f69 100644 --- a/pysrc/juliacall/juliapkg-dev.json +++ b/pysrc/juliacall/juliapkg-dev.json @@ -1,5 +1,5 @@ { - "julia": "~1.9, ^1.10.3", + "julia": "^1.10.3", "packages": { "PythonCall": { "uuid": "6099a3de-0909-46bc-b1f4-468b9a2dfc0d", diff --git a/pysrc/juliacall/juliapkg.json b/pysrc/juliacall/juliapkg.json index 5139c558..6357b1b8 100644 --- a/pysrc/juliacall/juliapkg.json +++ b/pysrc/juliacall/juliapkg.json @@ -1,5 +1,5 @@ { - "julia": "~1.9, ^1.10.3", + "julia": "^1.10.3", "packages": { "PythonCall": { "uuid": "6099a3de-0909-46bc-b1f4-468b9a2dfc0d", From 9184d1e3ed3060e4cf92a3e20d7139c1a3e47c39 Mon Sep 17 00:00:00 2001 From: Christopher Doris Date: Thu, 16 Oct 2025 13:35:57 +0100 Subject: [PATCH 3/6] document the julia/python version support policy --- docs/src/faq.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/src/faq.md b/docs/src/faq.md index c36e4aab..a31dff7b 100644 --- a/docs/src/faq.md +++ b/docs/src/faq.md @@ -108,3 +108,11 @@ using PythonCall np = pyimport("numpy") ``` + +## What versions of Python and Julia do you support? + +Each release of PythonCall and JuliaCall will support and require: +- Any currently supported version of Python, [see here](https://devguide.python.org/versions/). Currently 3.10+. +- The current Julia LTS version and newer, [see here](https://julialang.org/downloads/#long_term_support_release). Currently 1.10+. + +Only the latest patch release within each minor version is supported. From d6c4fb76446ff02cf2646a6560413edaea74d3a7 Mon Sep 17 00:00:00 2001 From: Christopher Doris Date: Thu, 16 Oct 2025 13:36:52 +0100 Subject: [PATCH 4/6] update release notes --- docs/src/releasenotes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/releasenotes.md b/docs/src/releasenotes.md index 63134ae5..dcbf7f75 100644 --- a/docs/src/releasenotes.md +++ b/docs/src/releasenotes.md @@ -2,8 +2,10 @@ ## Unreleased * Minimum supported Python version is now 3.10. +* Minimum supported Julia version is now 1.10. * Showing `Py` now respects the `compact` option - output is limited to a single line of at most the display width. +* Support policy now documented in the FAQ. * Bug fixes. ## 0.9.28 (2025-09-17) From f6296017927f0ea6c6e46e21e45607b2a0b13a5c Mon Sep 17 00:00:00 2001 From: Christopher Doris Date: Thu, 16 Oct 2025 13:44:10 +0100 Subject: [PATCH 5/6] document that multi-threading support is experimental --- docs/src/juliacall.md | 4 ++++ docs/src/pythoncall.md | 4 ++++ src/GIL/GIL.jl | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/docs/src/juliacall.md b/docs/src/juliacall.md index 4279e242..2f389e07 100644 --- a/docs/src/juliacall.md +++ b/docs/src/juliacall.md @@ -140,6 +140,10 @@ be configured in two ways: ## [Multi-threading](@id py-multi-threading) +!!! warning + + Multi-threading support is experimental and can change without notice. + From v0.9.22, JuliaCall supports multi-threading in Julia and/or Python, with some caveats. diff --git a/docs/src/pythoncall.md b/docs/src/pythoncall.md index 44153a70..5bc610ff 100644 --- a/docs/src/pythoncall.md +++ b/docs/src/pythoncall.md @@ -415,6 +415,10 @@ See [Installing Python packages](@ref python-deps). ## [Multi-threading](@id jl-multi-threading) +!!! warning + + Multi-threading support is experimental and can change without notice. + From v0.9.22, PythonCall supports multi-threading in Julia and/or Python, with some caveats. diff --git a/src/GIL/GIL.jl b/src/GIL/GIL.jl index 427a2791..f4b386ce 100644 --- a/src/GIL/GIL.jl +++ b/src/GIL/GIL.jl @@ -4,6 +4,10 @@ Handling the Python Global Interpreter Lock. See [`lock`](@ref), [`@lock`](@ref), [`unlock`](@ref) and [`@unlock`](@ref). + +!!! warning + + Multi-threading support is experimental and can change without notice. """ module GIL @@ -32,6 +36,10 @@ threads. Since the main Julia thread holds the GIL by default, you will need to [`unlock`](@ref) the GIL before using this function. See [`@lock`](@ref) for the macro form. + +!!! warning + + This function is experimental. Its semantics may be changed without notice. """ function lock(f) state = C.PyGILState_Ensure() @@ -52,6 +60,10 @@ threads. Since the main Julia thread holds the GIL by default, you will need to [`@unlock`](@ref) the GIL before using this function. The macro equivalent of [`lock`](@ref). + +!!! warning + + This macro is experimental. Its semantics may be changed without notice. """ macro lock(expr) quote @@ -74,6 +86,10 @@ Python code. That other thread can be a Julia thread, which must lock the GIL us [`lock`](@ref). See [`@unlock`](@ref) for the macro form. + +!!! warning + + This function is experimental. Its semantics may be changed without notice. """ function unlock(f) state = C.PyEval_SaveThread() @@ -94,6 +110,10 @@ Python code. That other thread can be a Julia thread, which must lock the GIL us [`@lock`](@ref). The macro equivalent of [`unlock`](@ref). + +!!! warning + + This macro is experimental. Its semantics may be changed without notice. """ macro unlock(expr) quote From 7e4aea962a29959708cc3669a3c113c10fe08216 Mon Sep 17 00:00:00 2001 From: Christopher Doris Date: Thu, 16 Oct 2025 13:55:00 +0100 Subject: [PATCH 6/6] add conda install instructions --- docs/src/juliacall.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/juliacall.md b/docs/src/juliacall.md index 2f389e07..26182add 100644 --- a/docs/src/juliacall.md +++ b/docs/src/juliacall.md @@ -7,6 +7,11 @@ It's as simple as pip install juliacall ``` +If you prefer Conda, there is a community effort to also release this on conda-forge: +```bash +conda install conda-forge::pyjuliapkg +``` + Developers may wish to clone the repo (https://github.com/JuliaPy/PythonCall.jl) directly and pip install the module in editable mode. You should add `"dev":true, "path":"../.."` to `pysrc/juliacall/juliapkg.json` to ensure you use the development version of PythonCall