diff --git a/Cargo.toml b/Cargo.toml index 3f85dbc..d89dab4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,3 +31,7 @@ debug = true [workspace.dependencies] pyo3 = { version = "0.23" } pyo3-build-config = { version = "0.23" } + +[patch.crates-io] +pyo3 = { git = "https://github.com/davidhewitt/pyo3", branch = "config-file-env-var" } +pyo3-build-config = { git = "https://github.com/davidhewitt/pyo3", branch = "config-file-env-var" } diff --git a/crates/jiter/src/py_string_cache.rs b/crates/jiter/src/py_string_cache.rs index a84903e..b5ec424 100644 --- a/crates/jiter/src/py_string_cache.rs +++ b/crates/jiter/src/py_string_cache.rs @@ -208,13 +208,7 @@ pub fn pystring_fast_new<'py>(py: Python<'py>, s: &str, ascii_only: bool) -> Bou /// Faster creation of PyString from an ASCII string, inspired by /// https://github.com/ijl/orjson/blob/3.10.0/src/str/create.rs#L41 -#[cfg(all( - any( - all(target_arch = "x86_64", target_os = "linux"), - all(target_arch = "aarch64", target_os = "macos"), - ), - not(any(PyPy, GraalPy)) -))] +#[cfg(not(any(PyPy, GraalPy)))] unsafe fn pystring_ascii_new<'py>(py: Python<'py>, s: &str) -> Bound<'py, PyString> { // disabled on everything except tier-1 platforms because of a crash in the built wheels from CI, // see https://github.com/pydantic/jiter/pull/175 @@ -229,13 +223,7 @@ unsafe fn pystring_ascii_new<'py>(py: Python<'py>, s: &str) -> Bound<'py, PyStri } // unoptimized version (albeit not that much slower) on other platforms -#[cfg(not(all( - any( - all(target_arch = "x86_64", target_os = "linux"), - all(target_arch = "aarch64", target_os = "macos"), - ), - not(any(PyPy, GraalPy)), -)))] +#[cfg(any(PyPy, GraalPy))] unsafe fn pystring_ascii_new<'py>(py: Python<'py>, s: &str) -> Bound<'py, PyString> { PyString::new(py, s) }