AttributeError: cffi library 'pygit2._libgit2' has no function, constant or global variable named 'git_remote_save'
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
I've installed using pip install pygit2==1.12.1. The environment is a python:3.10 docker container.
I'm receiving:
Traceback (most recent call last):
...
File "...", line 197, in pull_repo
remote.save()
File "/app/env/lib/python3.10/site-packages/pygit2/remote.py", line 117, in save
err = C.git_remote_save(self._remote)
AttributeError: cffi library 'pygit2._libgit2' has no function, constant or global variable named 'git_remote_save'. Did you mean: 'git_remote_name'?
The relevant code associated with this error is as follows:
repo = pygit2.Repository(checkout_location)
remote = repo.remotes['origin']
remote.fetch(callbacks=callbacks)
remote.save()
I attempted to use the Remote.save method because the call to Remote.fetch didn't appear to do anything to the repository, which is known to have changed.
Note, I could be using this all wrong, but I would still think an AttributeError shouldn't be raised. Also, there isn't a good example or clear way to do the equivalent of a git pull, which is why I'm fiddling with fetching the remote in order to advance the index.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
pygit2==1.12.1 を使用する python:3.10 コンテナで traceback を再現し、その後 pygit2/remote.py の Remote.save 周辺と、同梱されている libgit2 バインディングを調べます。Remote.fetch がリポジトリの状態をどのように更新することを想定されているか、また文書化されたワークフローでこの欠落シンボルを回避できるかを確認します。報告された操作で AttributeError が発生しなくなり、その動作がテストでカバーされるか、明確に文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100