Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CondaPkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version = "<=julia"

[deps.python]
build = "**cpython**"
version = ">=3.9,<4"
version = ">=3.10,<4"

[dev.deps]
matplotlib = ""
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Tables = "1"
Test = "1"
TestItemRunner = "0 - 999"
UnsafePointers = "1"
julia = "1.9"
julia = "1.10"

[extensions]
PyCallExt = "PyCall"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. ⭐

Expand Down
8 changes: 8 additions & 0 deletions docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
9 changes: 9 additions & 0 deletions docs/src/juliacall.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 4 additions & 0 deletions docs/src/pythoncall.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 3 additions & 0 deletions docs/src/releasenotes.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pysrc/juliacall/juliapkg-dev.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"julia": "~1.9, ^1.10.3",
"julia": "^1.10.3",
"packages": {
"PythonCall": {
"uuid": "6099a3de-0909-46bc-b1f4-468b9a2dfc0d",
Expand Down
2 changes: 1 addition & 1 deletion pysrc/juliacall/juliapkg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"julia": "~1.9, ^1.10.3",
"julia": "^1.10.3",
"packages": {
"PythonCall": {
"uuid": "6099a3de-0909-46bc-b1f4-468b9a2dfc0d",
Expand Down
4 changes: 2 additions & 2 deletions src/C/context.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions src/GIL/GIL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand All @@ -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()
Expand All @@ -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
Expand Down
Loading