Skip to content

Commit 3366cb8

Browse files
authored
Workaround py03 doc failure (#6941)
1 parent 68f7830 commit 3366cb8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

arrow/src/pyarrow.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
/*
19+
Workaround https://github.com/PyO3/pyo3/issues/4743
20+
21+
Newer versions of Rust signal an error on older py03 versions. This is fixed in 0.23.0
22+
but we need to work around for 0.22.x in arrow's 53.x line
23+
24+
warning: unexpected `cfg` condition value: `gil-refs`
25+
--> arrow/src/pyarrow.rs:80:1
26+
|
27+
80 | import_exception!(pyarrow, ArrowException);
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
|
30+
= note: expected values for `feature` are: `arrow-csv`, `arrow-ipc`, `arrow-json`, `chrono-tz`, `csv`, `default`, `ffi`, `force_validate`, `ipc`, `ipc_compression`, `json`, `prettyprint`, `pyarrow`, `pyo3`, `rand`, and `test_utils`
31+
= note: using a cfg inside a macro will use the cfgs from the destination crate and not the ones from the defining crate
32+
= help: try referring to `$crate::impl_exception_boilerplate` crate for guidance on how handle this unexpected cfg
33+
= help: the macro `$crate::impl_exception_boilerplate` may come from an old version of the `pyo3` crate, try updating your dependency with `cargo update -p pyo3`
34+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
35+
= note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `import_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
36+
*/
37+
#![allow(unexpected_cfgs)]
38+
1839
//! Pass Arrow objects from and to PyArrow, using Arrow's
1940
//! [C Data Interface](https://arrow.apache.org/docs/format/CDataInterface.html)
2041
//! and [pyo3](https://docs.rs/pyo3/latest/pyo3/).

0 commit comments

Comments
 (0)