mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-08 03:10:34 +00:00
remove auto-initialize
PyO3 feature and use prepare_freethreaded_python
(#121)
This commit is contained in:
parent
95a0f5f452
commit
9398df6a21
2 changed files with 11 additions and 1 deletions
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
pyo3 = { workspace = true, features = ["auto-initialize"] }
|
||||
pyo3 = { workspace = true }
|
||||
tower-lsp-server = { workspace = true, features = ["proposed"] }
|
||||
|
||||
which = "7.0.1"
|
||||
|
|
|
@ -587,6 +587,8 @@ mod tests {
|
|||
|
||||
let test_env = create_test_env(vec![path1.clone(), path2.clone()]);
|
||||
|
||||
pyo3::prepare_freethreaded_python();
|
||||
|
||||
Python::with_gil(|py| {
|
||||
let initial_sys_path = get_sys_path(py)?;
|
||||
let initial_len = initial_sys_path.len();
|
||||
|
@ -618,6 +620,8 @@ mod tests {
|
|||
fn test_activate_empty_sys_path() -> PyResult<()> {
|
||||
let test_env = create_test_env(vec![]);
|
||||
|
||||
pyo3::prepare_freethreaded_python();
|
||||
|
||||
Python::with_gil(|py| {
|
||||
let initial_sys_path = get_sys_path(py)?;
|
||||
|
||||
|
@ -642,6 +646,8 @@ mod tests {
|
|||
|
||||
let test_env = create_test_env(vec![path1.clone(), path2.clone()]);
|
||||
|
||||
pyo3::prepare_freethreaded_python();
|
||||
|
||||
Python::with_gil(|py| {
|
||||
let initial_sys_path = get_sys_path(py)?;
|
||||
let initial_len = initial_sys_path.len();
|
||||
|
@ -689,6 +695,8 @@ mod tests {
|
|||
|
||||
let test_env = create_test_env(vec![valid_path.clone(), non_utf8_path.clone()]);
|
||||
|
||||
pyo3::prepare_freethreaded_python();
|
||||
|
||||
Python::with_gil(|py| {
|
||||
let initial_sys_path = get_sys_path(py)?;
|
||||
let initial_len = initial_sys_path.len();
|
||||
|
@ -747,6 +755,8 @@ mod tests {
|
|||
|
||||
let test_env = create_test_env(vec![valid_path.clone(), non_utf8_path.clone()]);
|
||||
|
||||
pyo3::prepare_freethreaded_python();
|
||||
|
||||
Python::with_gil(|py| {
|
||||
let initial_sys_path = get_sys_path(py)?;
|
||||
let initial_len = initial_sys_path.len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue