pyclass warning on update pyo3
還沒有人認領這個 Issue。
評估
研究方向
該警告指向 src/lib.rs 第 767 行,即 Python 綁定 crate(microbiorust-py)中的一個 #[pyclass] 屬性。執行 cargo build 或 cargo test 重現問題,然後檢查該 crate 中每個 #[pyclass] 是否有衍生 Clone 的型別。依照警告的建議加入 from_py_object 或 skip_from_py_object,並根據 Python 是否需要把該型別傳回 Rust 為每個型別分別選擇。當建置不再出現棄用警告且測試仍然通過時,即完成。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
Updated pyo3 to 0.29.0 after receiving alert
warning: use of deprecated associated constant pyo3::impl_::deprecated::HasAutomaticFromPyObject::<true>::MSG: The FromPyObject implementation for #[pyclass] types which implement Clone is changing to an opt-in option. Use #[pyclass(from_py_object)] to opt-in to the FromPyObject derive now, or #[pyclass(skip_from_py_object)] to skip the FromPyObject implementation.
--> src/lib.rs:767:1
|
767 | #[pyclass]
| ^^^^^^^^^^
To Reproduce
Steps to reproduce the behavior:
git clone microBioRust
cd microbiorust-py
maturin develop --release
or
cargo test
Expected behavior
tests are all passing in pytest and in cargo test but receiving deprecation warning
Desktop (please complete the following information):
Mac OSX
Additional context
Add any other context about the problem here.
- 主要語言
- Rust
- 星號
- 38
- 分支
- 15
- 平均合併
- 21 小時 33 分鐘
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
LCrossman/microBioRust 的其他 Issue
-
good first issue
難度 2/5 1-3 小時 新手友好度 75/100
LCrossman/microBioRust#57 ·
-
Lack of Feature Type in FeatureAttributes可能已有人在做 @LCrossman 於 1 天前認領。 未關閉
LCrossman/microBioRust#60 · 已指派 1 人 ·
-
難度 4/5 3-5 天 新手友好度 45/100
LCrossman/microBioRust#59 ·
-
難度 4/5 3-5 天 新手友好度 45/100
LCrossman/microBioRust#51 ·
-
legacy manual annotation format rare error missing last codon in pseudogene after genbank! parse未關閉
難度 3/5 半天 新手友好度 40/100
LCrossman/microBioRust#50 ·
查看 LCrossman/microBioRust 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
riverqueue/river#1576 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
stadelmanma/fitparse-rs#64 ·