[Bug 283097] python311: backport fix for dev_t

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 03 Dec 2024 13:28:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283097

            Bug ID: 283097
           Summary: python311: backport fix for dev_t
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: danchr@gmail.com

Python 3.12 includes a fix for `dev_t` being a 64-bit unsigned value rather
than a signed value. This can cause issues in certain issues, where native code
_does_ then assume that it's unsigned. I ran into issues with this when testing
self-compiled Rust extensions for Mercurial.

```
$ python3.9 -c 'import os; print(os.stat(".hg/dirstate").st_dev)'
-1165136122586117506
$ python3.11 -c 'import os; print(os.stat(".hg/dirstate").st_dev)'
-1165136122586117506
$ /usr/bin/stat .hg/dirstate
17281607951123434110 53950 -rw-r--r-- 1 dan wheel 0 107163 "Dec  2 16:11:49
2024" "Dec  2 16:11:49 2024" "Dec  2 16:11:49 2024" "Dec  2 16:11:49 2024"
107520 89 0x800 .hg/dirstate
```

As neither Python 3.12 nor 3.13 are currently available as packages, could you
perhaps backport those patches to the ports?

https://github.com/python/cpython/issues/89928
https://github.com/python/cpython/pull/120054

-- 
You are receiving this mail because:
You are the assignee for the bug.