[GRASS-dev] Add support for Python3

Anna Petrášová kratochanna at gmail.com
Tue Aug 25 19:06:16 PDT 2015


On Thu, Aug 6, 2015 at 9:16 AM, Glynn Clements <glynn at gclements.plus.com>
wrote:

>
> Vaclav Petras wrote:
>
> > However, now I see at least 3 tests which were not failing before [3, 4,
> > 5]. It seems like a trivial issue caused by some automatic changes
> (percent
> > operator is missing). This issue should be visible on any machine.
>
> The bug which is causing the test to fail has been present in
> v.db.addtable for 2 years (since r56701).
>
> If the tests only started failing recently, it can only be because of
> changes to how v.db.addtable was invoked.
>
> A database connection having a "schema" option where none existed
> before would seem likely. The error arises from:
>
>     if schema is not '':
>         table = '%s.%s' (schema, table)
>

The problem is related to the Python 3 support - the condition is wrong and
schema is now empty unicode string instead of empty string (coming from
db_connection()). I am not sure if unicode here is what we want, but that's
a different problem, the condition works for any empty string now.

Anna


> where "schema" is set by:
>
>     kv = grass.db_connection()
>     database = kv['database']
>     driver = kv['driver']
>     schema = kv['schema']
>
> --
> Glynn Clements <glynn at gclements.plus.com>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150825/c9563795/attachment.html>


More information about the grass-dev mailing list