Skip to content

Commit b9ee7cd

Browse files
chore(python): Test free-threaded in ci
1 parent a76a426 commit b9ee7cd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/test-python.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
os: [ubuntu-latest]
42-
python-version: ['3.9', '3.12', '3.13']
42+
python-version: ['3.9', '3.12', '3.13', '3.13t']
4343
include:
4444
- os: windows-latest
4545
python-version: '3.13'

crates/polars-python/src/conversion/datetime.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ pub fn datetime_to_py_object<'py>(
5757
.call1((v, tu.to_ascii(), time_zone.as_str()))
5858
} else {
5959
let datetime = utc_datetime.with_timezone(&tz);
60-
datetime.into_pyobject(py)
60+
Ok(datetime.into_pyobject(py)?.into_any())
6161
}
6262
} else if let Ok(tz) = FixedOffset::from_str(time_zone) {
6363
let naive_datetime = timestamp_to_naive_datetime(v, tu);
6464
let datetime = tz.from_utc_datetime(&naive_datetime);
65-
datetime.into_pyobject(py)
65+
Ok(datetime.into_pyobject(py)?.into_any())
6666
} else {
6767
Err(PyPolarsErr::Other(format!("Could not parse timezone: {time_zone}")).into())
6868
}
6969
} else {
70-
timestamp_to_naive_datetime(v, tu).into_pyobject(py)
70+
Ok(timestamp_to_naive_datetime(v, tu).into_pyobject(py)?.into_any())
7171
}
7272
}

py-polars/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn _expr_nodes(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
8484
Ok(())
8585
}
8686

87-
#[pymodule]
87+
#[pymodule(gil_used = false)]
8888
fn polars(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
8989
// Classes
9090
m.add_class::<PySeries>().unwrap();

0 commit comments

Comments
 (0)