[GRASS-dev] [release planning] GRASS GIS 7.8.0 with Python3 support

Anna Petrášová kratochanna at gmail.com
Thu Jan 10 06:34:25 PST 2019


On Thu, Jan 10, 2019 at 7:08 AM Maris Nartiss <maris.gis at gmail.com> wrote:

> trešd., 2019. g. 9. janv., plkst. 18:47 — lietotājs Markus Neteler
> (<neteler at osgeo.org>) rakstīja:
> >
> > On Wed, Jan 9, 2019 at 4:01 PM Maris Nartiss <maris.gis at gmail.com>
> wrote:
> > ...
> > > Too late. Python is already broken (I had to fix my scripts;
> > > previously working tests are now broken). Do not expect your 7.2/7.4
> > > Python scripts to work with 7.6/7.8 without modifications (depends on
> > > functionality in use).
> >
> > This is weird. Can you elaborate?
> Unfortunately I just fixed my code and moved on (as transitioning to
> Python 3 has to be done). But here are two examples from the top of my
> head:
> https://trac.osgeo.org/grass/ticket/3707
> grass.script.parse now returns unicode strings, previously – byte
> strings (too lazy to search for a specific revision when it was
> introduced). Took a while to understand why calls to an external
> library started to fail.
>

All the recent Python3 changes are in 7.8 only. Pietro did some Python 3
changes early on (not sure which version), unfortunately these were not
clearly communicated. In general, all Python API functions should now
(since 7.8) return unicode (for both Python 2 and 3), because that's what
users would expect with python 3.

It's hard to know exactly how much work is still needed, because tests
cover just part of the codebase. GUI is mostly working, some issues might
come up for less used components, but these are mostly easy to fix, some of
the issues are due to the switch to wxPython 4 (wxPython 3 doesn't support
Python3). Python components with ctypes need more work. PyGRASS is getting
there, tests should be mostly running (not doctests), but there is more
work with temporal framework. Add-ons will probably need some small
adjustments, but I haven't looked at that. Of course, I am testing only
linux now.

Anna

>
> > > Still – it is not so bad – some Python parts never have been working
> > > correctly anyway ;-)
> >
> > Please open ticket(s) if you want to see it fixed.
> This is really tricky as for many aspects of GRASS Python code there
> are no working examples in the GRASS source or add-ons and thus it is
> hard to understand if it is broken or just "I'm holding it the wrong
> way" ;-)
> I'll try to come up with a test case for raster.history, as it is one
> of things I can not get working at the moment.
>
> > Markus
> Māris.
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20190110/d032bf13/attachment-0001.html>


More information about the grass-dev mailing list