Skip to content

Commit 992758d

Browse files
authored
Raise minimum supported Python version to 3.11 (#842)
* Raise minimum supported Python version to 3.11 * Rebuild Conda configuration after restoring CI cache --------- Co-authored-by: Christopher Rowley <github.com/cjdoris>
1 parent ae8f173 commit 992758d

10 files changed

Lines changed: 28 additions & 9 deletions

File tree

‎.github/workflows/register-pypi.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v7
1919
with:
20-
python-version: "3.10"
20+
python-version: "3.11"
2121
- name: Install build
2222
run: >-
2323
python -m

‎.github/workflows/tests.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ jobs:
4141

4242
- uses: julia-actions/cache@v3
4343

44+
# The package cache includes Conda's build configuration, but not its root environment.
45+
- name: Rebuild Conda configuration
46+
shell: julia --color=yes {0}
47+
env:
48+
JULIA_PKG_PRECOMPILE_AUTO: '0'
49+
run: |
50+
using Pkg
51+
Pkg.activate(; temp=true)
52+
Pkg.add("Conda")
53+
Pkg.build("Conda")
54+
4455
- name: Build package
4556
uses: julia-actions/julia-buildpkg@v1
4657
env:
@@ -83,7 +94,7 @@ jobs:
8394
fail-fast: false
8495
matrix:
8596
os: [ubuntu-latest, windows-latest, macos-latest]
86-
pyversion: ['3', '3.10']
97+
pyversion: ['3', '3.11']
8798
juliaexe: ["@JuliaPkg"]
8899
include:
89100
- os: ubuntu-latest

‎AGENTS.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@
99

1010
The majority of tests live in the Julia package; Python tests cover functionality that cannot be exercised from Julia (e.g., JuliaCall-specific behavior). Run both suites—typically Julia first—in whichever order makes sense.
1111

12+
- In restricted sandboxes, both suites need approval to write to the shared caches (`~/.julia` and `~/.cache/uv`).
13+
- `pysrc/juliacall/juliapkg.json` is tracked; restore its original contents after using the development copy for Python tests.
14+
1215
## Meta instructions
16+
- When testing an older Julia version, a local manifest generated by newer Julia can fail on stdlib dependencies. Use a temporary environment with `Pkg.develop(path=pwd()); Pkg.test("PythonCall")` to resolve dependencies for that Julia version.
17+
- CI caches Conda.jl build configuration without its root environment. Rebuild Conda after cache restore before PyCall is built; otherwise Julia 1.10 can fail before tests with "Path to conda environment is not valid".
1318
- When you discover environment quirks, false assumptions, process fixes, or any other generally useful info, update this AGENTS.md so future coding agents have the information.

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## Unreleased
4+
* Minimum supported Python version is now 3.11.
5+
36
## 0.9.37 (2026-10-12)
47
* Compatibility fix with Python 3.15 from conda-forge, which no longer bundles libpython.
58
* Bug fixes.

‎CondaPkg.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version = "<=julia"
99

1010
[deps.python]
1111
build = "**cpython**"
12-
version = ">=3.10,!=3.14.0,!=3.14.1,<4"
12+
version = ">=3.11,!=3.14.0,!=3.14.1,<4"
1313

1414
[deps.libpython]
1515
build = "**bundled-or-separate**"

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala
1414
- 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.
1515
- Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa.
1616
- Beautiful stack-traces.
17-
- Supports modern systems: tested on Windows, MacOS and Linux; 64-bit; Julia 1.10 upwards and Python 3.10 upwards.
17+
- Supports modern systems: tested on Windows, MacOS and Linux; 64-bit; Julia 1.10 upwards and Python 3.11 upwards.
1818

1919
⭐ If you like this, a GitHub star would be lovely thank you. ⭐
2020

‎docs/src/faq.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ np = pyimport("numpy")
112112
## What versions of Python and Julia do you support?
113113

114114
Each release of PythonCall and JuliaCall will support and require:
115-
- Any currently supported version of Python, [see here](https://devguide.python.org/versions/). Currently 3.10+.
115+
- Any currently supported version of Python, [see here](https://devguide.python.org/versions/). Currently 3.11+.
116116
- The current Julia LTS version and newer, [see here](https://julialang.org/downloads/#long_term_support_release). Currently 1.10+.
117117

118118
Only the latest patch release within each minor version is supported.

‎docs/src/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala
77
- 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.
88
- Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa.
99
- Beautiful stack-traces.
10-
- Works anywhere: tested on Windows, MacOS and Linux; 64-bit; Julia 1.10 upwards and Python 3.10 upwards.
10+
- Works anywhere: tested on Windows, MacOS and Linux; 64-bit; Julia 1.10 upwards and Python 3.11 upwards.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ classifiers = [
1212
"License :: OSI Approved :: MIT License",
1313
"Operating System :: OS Independent",
1414
]
15-
requires-python = ">=3.10, <4"
15+
requires-python = ">=3.11, <4"
1616
dependencies = ["juliapkg >=0.1.27, <0.2"]
1717

1818
[dependency-groups]

‎src/C/context.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ function init_context()
323323
error("Cannot parse version from version string: $(repr(verstr))")
324324
end
325325
CTX.version = VersionNumber(vermatch.match)
326-
v"3.10" ≤ CTX.version < v"4" || error(
327-
"Only Python 3.10+ is supported, this is Python $(CTX.version) at $(CTX.exe_path===missing ? "unknown location" : CTX.exe_path).",
326+
v"3.11" ≤ CTX.version < v"4" || error(
327+
"Only Python 3.11+ is supported, this is Python $(CTX.version) at $(CTX.exe_path===missing ? "unknown location" : CTX.exe_path).",
328328
)
329329
CTX.is_free_threaded = occursin("free-threading build", verstr)
330330

0 commit comments

Comments
 (0)