pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

diff.patch returns wrong dates in Python 3.10

Open Zlopez opened this issue 3 years ago • 0 comments

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.

Zlopez avatar Feb 02 '22 15:02 Zlopez