diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b83210cb..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 @@ -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/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 1b49cbf9..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.9 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/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. diff --git a/docs/src/index.md b/docs/src/index.md index 2dca5e6b..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.9 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/docs/src/juliacall.md b/docs/src/juliacall.md index 4279e242..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 @@ -140,6 +145,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/docs/src/releasenotes.md b/docs/src/releasenotes.md index 445d8b58..dcbf7f75 100644 --- a/docs/src/releasenotes.md +++ b/docs/src/releasenotes.md @@ -1,8 +1,11 @@ # Release Notes ## 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) 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/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", 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 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