[GRASS-dev] [GRASS GIS] #3811: grass.lib.gis.G_getenv returns bytes in Python 3

#3811: grass.lib.gis.G_getenv returns bytes in Python 3
--------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: Python | Version: svn-trunk
Keywords: | CPU: Unspecified
Platform: All |
--------------------+-------------------------
{{{grass.lib.gis.G_getenv}}} returns bytes in Python 3. Consequently code
that expects the return value to be {{{str}}} is failing. E.g.
https://grass.osgeo.org/grass77/manuals/libpython/_modules/pygrass/gis.html#Mapset.is_current
(btw, there are no tests for {{{is_current}}}).

There are tests for {{{G_getenv}}}, but they are also failing:
{{{lib/gis/testsuite/gis_lib_env_test.py}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3811&gt;
GRASS GIS <https://grass.osgeo.org>

#3811: grass.lib.gis.G_getenv returns bytes in Python 3
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: Python | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by annakrat):

In [changeset:"74383" 74383]:
{{{
#!CommitTicketReference repository="" revision="74383"
pygrass: use getenv from utils to decode bytes, see #3811
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3811#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>