Skip to content

Commit fe7c18e

Browse files
authored
bump supported GraalPy version to 24.2 (PyO3#5116)
* bump supported GraalPy version to 24.2 * newsfragment
1 parent c25577f commit fe7c18e

File tree

11 files changed

+23
-29
lines changed

11 files changed

+23
-29
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ jobs:
4949
- name: Install nox
5050
run: python -m pip install --upgrade pip && pip install nox
5151

52-
- if: ${{ startsWith(inputs.python-version, 'graalpy24.1') }}
53-
name: Install GraalPy virtualenv (only GraalPy 24.1)
54-
run: python -m pip install 'git+https://github.com/oracle/graalpython#egg=graalpy_virtualenv_seeder&subdirectory=graalpy_virtualenv_seeder'
55-
5652
- name: Install Rust toolchain
5753
uses: dtolnay/rust-toolchain@master
5854
with:

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ jobs:
269269
"pypy3.9",
270270
"pypy3.10",
271271
"pypy3.11",
272-
"graalpy24.0",
273-
"graalpy24.1",
272+
"graalpy24.2",
274273
]
275274
platform:
276275
[

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Requires Rust 1.63 or greater.
2121
PyO3 supports the following Python distributions:
2222
- CPython 3.7 or greater
2323
- PyPy 7.3 (Python 3.9+)
24-
- GraalPy 24.0 or greater (Python 3.10+)
24+
- GraalPy 24.2 or greater (Python 3.11+)
2525

2626
You can use PyO3 to write a native Python module in Rust, or to embed Python in a Rust binary. The following sections explain each of these in turn.
2727

newsfragments/5116.packaging.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump supported GraalPy version to 24.2.

src/ffi/tests.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ use crate::ffi::{self, *};
22
use crate::types::any::PyAnyMethods;
33
use crate::Python;
44

5-
#[cfg(all(not(Py_LIMITED_API), any(not(PyPy), feature = "macros")))]
5+
#[cfg(all(not(Py_LIMITED_API), any(not(any(PyPy, GraalPy)), feature = "macros")))]
66
use crate::types::PyString;
77

88
#[cfg(not(Py_LIMITED_API))]
99
use crate::{types::PyDict, Bound, PyAny};
10-
#[cfg(not(any(Py_3_12, Py_LIMITED_API)))]
10+
#[cfg(not(any(Py_3_12, Py_LIMITED_API, GraalPy)))]
1111
use libc::wchar_t;
1212

1313
#[cfg(not(Py_LIMITED_API))]
@@ -114,7 +114,7 @@ fn test_timezone_from_offset_and_name() {
114114
}
115115

116116
#[test]
117-
#[cfg(not(Py_LIMITED_API))]
117+
#[cfg(not(any(Py_LIMITED_API, GraalPy)))]
118118
fn ascii_object_bitfield() {
119119
let ob_base: PyObject = unsafe { std::mem::zeroed() };
120120

@@ -167,7 +167,7 @@ fn ascii_object_bitfield() {
167167
}
168168

169169
#[test]
170-
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
170+
#[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
171171
fn ascii() {
172172
Python::with_gil(|py| {
173173
// This test relies on implementation details of PyString.
@@ -208,7 +208,7 @@ fn ascii() {
208208
}
209209

210210
#[test]
211-
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
211+
#[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
212212
fn ucs4() {
213213
Python::with_gil(|py| {
214214
let s = "哈哈🐈";
@@ -253,7 +253,7 @@ fn ucs4() {
253253
#[test]
254254
#[cfg(not(Py_LIMITED_API))]
255255
#[cfg_attr(target_arch = "wasm32", ignore)] // DateTime import fails on wasm for mysterious reasons
256-
#[cfg(not(PyPy))]
256+
#[cfg(not(all(PyPy, not(Py_3_10))))]
257257
fn test_get_tzinfo() {
258258
use crate::types::PyTzInfo;
259259

src/tests/hygiene/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn intern(py: crate::Python<'_>) {
3131
let _bar = crate::intern!(py, stringify!(bar));
3232
}
3333

34-
#[cfg(not(PyPy))]
34+
#[cfg(not(any(PyPy, GraalPy)))]
3535
fn append_to_inittab() {
3636
#[crate::pymodule]
3737
#[pyo3(crate = "crate")]

src/types/mappingproxy.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ mod tests {
420420
});
421421
}
422422

423-
#[cfg(not(PyPy))]
423+
#[cfg(not(any(PyPy, GraalPy)))]
424424
fn abc_mappingproxy(py: Python<'_>) -> Bound<'_, PyMappingProxy> {
425425
let mut map = HashMap::<&'static str, i32>::new();
426426
map.insert("a", 1);
@@ -431,7 +431,7 @@ mod tests {
431431
}
432432

433433
#[test]
434-
#[cfg(not(PyPy))]
434+
#[cfg(not(any(PyPy, GraalPy)))]
435435
fn mappingproxy_keys_view() {
436436
Python::with_gil(|py| {
437437
let mappingproxy = abc_mappingproxy(py);
@@ -441,7 +441,7 @@ mod tests {
441441
}
442442

443443
#[test]
444-
#[cfg(not(PyPy))]
444+
#[cfg(not(any(PyPy, GraalPy)))]
445445
fn mappingproxy_values_view() {
446446
Python::with_gil(|py| {
447447
let mappingproxy = abc_mappingproxy(py);
@@ -451,7 +451,7 @@ mod tests {
451451
}
452452

453453
#[test]
454-
#[cfg(not(PyPy))]
454+
#[cfg(not(any(PyPy, GraalPy)))]
455455
fn mappingproxy_items_view() {
456456
Python::with_gil(|py| {
457457
let mappingproxy = abc_mappingproxy(py);

src/types/string.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ mod tests {
647647
}
648648

649649
#[test]
650-
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
650+
#[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
651651
fn test_string_data_ucs1() {
652652
Python::with_gil(|py| {
653653
let s = PyString::new(py, "hello, world");
@@ -660,7 +660,7 @@ mod tests {
660660
}
661661

662662
#[test]
663-
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
663+
#[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
664664
fn test_string_data_ucs1_invalid() {
665665
Python::with_gil(|py| {
666666
// 0xfe is not allowed in UTF-8.
@@ -686,7 +686,7 @@ mod tests {
686686
}
687687

688688
#[test]
689-
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
689+
#[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
690690
fn test_string_data_ucs2() {
691691
Python::with_gil(|py| {
692692
let s = py.eval(ffi::c_str!("'foo\\ud800'"), None, None).unwrap();
@@ -702,7 +702,7 @@ mod tests {
702702
}
703703

704704
#[test]
705-
#[cfg(all(not(any(Py_LIMITED_API, PyPy)), target_endian = "little"))]
705+
#[cfg(all(not(any(Py_LIMITED_API, PyPy, GraalPy)), target_endian = "little"))]
706706
fn test_string_data_ucs2_invalid() {
707707
Python::with_gil(|py| {
708708
// U+FF22 (valid) & U+d800 (never valid)
@@ -728,7 +728,7 @@ mod tests {
728728
}
729729

730730
#[test]
731-
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
731+
#[cfg(not(any(Py_LIMITED_API, PyPy, GraalPy)))]
732732
fn test_string_data_ucs4() {
733733
Python::with_gil(|py| {
734734
let s = "哈哈🐈";
@@ -741,7 +741,7 @@ mod tests {
741741
}
742742

743743
#[test]
744-
#[cfg(all(not(any(Py_LIMITED_API, PyPy)), target_endian = "little"))]
744+
#[cfg(all(not(any(Py_LIMITED_API, PyPy, GraalPy)), target_endian = "little"))]
745745
fn test_string_data_ucs4_invalid() {
746746
Python::with_gil(|py| {
747747
// U+20000 (valid) & U+d800 (never valid)

tests/test_append_to_inittab.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod module_mod_with_functions {
1919
use super::foo;
2020
}
2121

22-
#[cfg(not(PyPy))]
22+
#[cfg(not(any(PyPy, GraalPy)))]
2323
#[test]
2424
fn test_module_append_to_inittab() {
2525
use pyo3::{append_to_inittab, ffi};

tests/test_inheritance.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,18 @@ mod inheriting_native_type {
182182
use pyo3::exceptions::PyException;
183183
use pyo3::types::PyDict;
184184

185-
#[cfg(not(PyPy))]
185+
#[cfg(not(any(PyPy, GraalPy)))]
186186
#[test]
187187
fn inherit_set() {
188188
use pyo3::types::PySet;
189189

190-
#[cfg(not(PyPy))]
191190
#[pyclass(extends=PySet)]
192191
#[derive(Debug)]
193192
struct SetWithName {
194193
#[pyo3(get, name = "name")]
195194
_name: &'static str,
196195
}
197196

198-
#[cfg(not(PyPy))]
199197
#[pymethods]
200198
impl SetWithName {
201199
#[new]

0 commit comments

Comments
 (0)