Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

diff.patch returns wrong dates in Python 3.10

Open
#1,122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, python
Domain
devtools

Research direction

Start at the diff.patch path that formats the displayed dates and trace how Arrow timestamps are serialized. Reproduce the output with Python 3.10 and arrow==1.2.2, then verify that diff.patch contains timestamp values rather than a bound-method representation.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
1.7k
Forks
408
Avg merge
2d 57m
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libgit2/pygit2

All issues in libgit2/pygit2

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.