Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

pyclass warning on update pyo3

オープン 初心者向け
#53 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python, rust
領域
api

調査の方向性

警告は microbiorust-py(Python バインディングのクレート)内の src/lib.rs 767 行目にある #[pyclass] 属性を指しています。cargo build または cargo test を実行して再現させ、そのクレート内の各 #[pyclass] について Clone を derive している型を確認してください。警告の提案に従って 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分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

LCrossman/microBioRust のほかの issue

LCrossman/microBioRust の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。