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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

GRASS GIS
#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>
GRASS GIS <https://grass.osgeo.org>


_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

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

GRASS GIS
#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>
GRASS GIS <https://grass.osgeo.org>


_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev