Bug 283097 - lang/python311: backport fix for dev_t
Summary: lang/python311: backport fix for dev_t
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-03 13:28 UTC by Dan Villiom Podlaski Christiansen
Modified: 2024-12-06 10:49 UTC (History)
1 user (show)

See Also:
linimon: maintainer-feedback? (python)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Villiom Podlaski Christiansen 2024-12-03 13:28:39 UTC
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