[GRASS-dev] [GRASS GIS] #4018: GRASS ctypes fail with Python 3.7.6+

GRASS GIS trac at osgeo.org
Sat Jan 11 11:57:31 PST 2020


#4018: GRASS ctypes fail with Python 3.7.6+
---------------------------+---------------------------------
 Reporter:  mmetz          |      Owner:  grass-dev@…
     Type:  defect         |     Status:  new
 Priority:  critical       |  Milestone:  7.8.3
Component:  Python ctypes  |    Version:  git-releasebranch78
 Keywords:  ctypes         |        CPU:  All
 Platform:  All            |
---------------------------+---------------------------------
 GRASS ctypes generated with the GRASS internal
 [https://github.com/OSGeo/grass/tree/master/lib/python/ctypes ctypes
 generator] are no longer accepted by Python 3.7.6+, see also
 [https://github.com/davidjamesca/ctypesgen/issues/77#issuecomment-569820931
 ctypesgen issue 77]. Tested with Debian testing (Python 3.7.6) and Alpine
 edge (Python 3.8.1). Both distro versions are development versions, but
 they use released Python versions.

 The errors are that a union is no longer accepted as a function argument,
 affecting e.g. the
 [https://github.com/OSGeo/grass/blob/master/lib/python/ctypes/preamble.py#L289
 class string], and that strings consisting of of any number of characters
 terminated by the '\0' character are sometimes truncated to the first
 character.

 Unfortunately, the main maintainer of ctypesgen does not test
 [https://github.com/davidjamesca/ctypesgen/issues/77#issuecomment-570145399
 python versions > 3.6].

 We need to fix the GRASS-internal ctypes generator to work with Python <
 3.7.6 as well as Python >= 3.7.6.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/4018>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list