libgit2 / libgit2/pygit2

diff.patch returns wrong dates in Python 3.10

オープン
#1,122 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
Python
スター
1.7k
フォーク
408
平均マージ
2日 57分
マージ済み PR(30日)
7

説明

The newest version of arrow library doesn't have timestamp property anymore, only method.

When I try to run the pygit2 with latest arrow (arrow==1.2.2) I get this in the output of diff.patch:

diff --git a/ff637b965cc54980ba5d852d662d0793 b/ff637b965cc54980ba5d852d662d0793                                                                                                                                                              
index d88c807..1d33f32 100644                                                                                                                                                                                                                 
--- a/ff637b965cc54980ba5d852d662d0793                                                                                                                                                                                                        +++ b/ff637b965cc54980ba5d852d662d0793                                                                                                                                                                                                        @@ -62,7 +62,9 @@                                                                                                                                                                                                                                  "content": "We should work on this",                                                                                                                                                                                                     
     "custom_fields": [],                                                                                                                                                                                                                     
     "date_created": "<bound method Arrow.timestamp of <Arrow [2022-02-02T14:55:22.090307+00:00]>>",                                                                                                                                          
-    "depends": [],                                                                                                                                                                                                                           
+    "depends": [                                                                                                                                                                                                                             +        "3"                                                                                                                                                                                                                                  +    ],                                                                                                                                                                                                                                            "full_url": "http://localhost.localdomain/test/issue/1",                                                                                                                                                                                 
     "id": 1,                                                                                                                                                                                                                                 
     "last_updated": "<bound method Arrow.timestamp of <Arrow [2022-02-02T14:55:23.637241+00:00]>>",

As you can see there is only a reference to method instead of value.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

表示される日付をフォーマットする diff.patch パスから始め、Arrow のタイムスタンプがどのようにシリアライズされるかを追跡します。Python 3.10 と arrow==1.2.2 で出力を再現し、その後、diff.patch に bound-method の表現ではなくタイムスタンプ値が含まれていることを確認します。

索引モデルが issue の本文から書いたものです。

評価

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

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

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