Bug 244546

Summary: lang/python37: Backport pull request 17960 (Fix for broken ctypes)
Product: Ports & Packages Reporter: Loïc Bartoletti <lbartoletti>
Component: Individual Port(s)Assignee: freebsd-python (Nobody) <python>
Status: Closed Overcome By Events    
Severity: Affects Some People Keywords: needs-qa
Priority: --- Flags: bugzilla: maintainer-feedback? (python)
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://bugs.python.org/issue16575
See Also: https://github.com/python/cpython/pull/17960
https://bugzilla.redhat.com/show_bug.cgi?id=1794572
Attachments:
Description Flags
python37 patch for bpo-16575 none

Description Loïc Bartoletti freebsd_committer freebsd_triage 2020-03-01 19:21:10 UTC
Created attachment 212081 [details]
python37 patch for bpo-16575

databases/grass7 gui cannot run without theses patches. It's already patched upstream.

Some contexte and links:

- databases/grass7 https://trac.osgeo.org/grass/ticket/4015
- fedora discussion https://bugzilla.redhat.com/show_bug.cgi?id=1794572
- python upstream issue https://bugs.python.org/issue16575
- python fix https://github.com/python/cpython/pull/17960


tested on FreeBSD 12 amd64 with databases/grass7 (my 7.8.2 wip)
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-02 00:34:47 UTC
Thank for the report and patch Loïc.

Could you clarify:

- Whether the present python38 port version is affected (or if the backport to 3.8 upstream has alrady been released upstream, and the fix is present in the port)

- Whether or other Python port versions still in the tree < 3.7 are also affected
Comment 2 Loïc Bartoletti freebsd_committer freebsd_triage 2020-03-02 06:55:39 UTC
I use this test file: https://bugs.python.org/file28155/test184_lib.tgz

Tl;DR

python 3.8.2 OK (but KO for 3.8.1
python < 3.7 OK

---

python3.8.1 (old pkg installed) KO

```
    ~/test184_lib  python3.8 test184_lib.py                                                                                                                                                                                                    ✔  1m 42s   07:35:08  
Traceback (most recent call last):
  File "test184_lib.py", line 10, in <module>
    extn.argtypes = [Foo]
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.
```

python 3.8.2 (from ports) OK
```
 python3.8 test184_lib.py                                                                                                                                                                                                        ✔  9s   07:43:01  
1.2300000190734863
1.2300000190734863
1067282596
x:nan
y:nan
z:-9072
```
python 3.7.6 KO
```
python3.7 test184_lib.py                                                                                                                                                                                                    ✔  3m 14s   07:49:41  
Traceback (most recent call last):
  File "test184_lib.py", line 10, in <module>
    extn.argtypes = [Foo]
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.
```

python 3.7.6 (with the pathces) OK
```
    ~/test184_lib  python3.7 test184_lib.py                                                                                                                                                                                                           INT ✘  07:43:42  
1.2300000190734863
1.2300000190734863
1067282596
x:nan
y:nan
z:-9184
```

python 3.6 OK
```
 python3.6 test184_lib.py                                                                                                                                                                                                           INT ✘  07:44:53  
1.2300000190734863
1.2300000190734863
1067282596
x:nan
y:nan
z:-8720


python 3.5 OK
```
 python3.5 test184_lib.py                                                                                                                                                                                                       ✔  36s   07:52:02  
1.2300000190734863
1.2300000190734863
1067282596
x:nan
y:nan
z:-8656
Comment 3 Loïc Bartoletti freebsd_committer freebsd_triage 2020-03-27 10:18:20 UTC
Closed fixed in python 3.7.7