[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#719941: libreoffice-script-provider-python: python 3 porting issues



tag 719941 + upstream
forwarded 719941 Michael Stahl <mstahl@redhat.com>
retitle 719941 libreoffice-script-provider-python: python 3 porting fixes for debug logging
tag 719941 + moreinfo
thanks

Hi,

On Fri, Aug 16, 2013 at 07:21:50PM -0500, Mike Dupont wrote:
> here are some patches for python 3 porting.

I forwarded this upstream (on IRC) today:

16:21 <@_rene_> mst___: it *seems* that some debugging stuff in the script provider do not work. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719941
[...]
16:22 <@_rene_> mst___: has two patches, one of them doesn't work with python 2.x..
[...]
16:24 <@_rene_> mst___: no idea whether we want to stop python2 support for pythonscript.py...
[...]
16:24 <@_rene_> mst___: if not, it should be checked like he sugggests.
16:25 < mst___> _rene_, actually it ought to work, but i don't think i've ever tested it
[...]
16:25 <@_rene_> it itself works, he claims that some logging is broken or so :)
16:26 <@_rene_> (at least "it works" enough for librelogo and some macros I've seen...)
[...]
16:30 <@_rene_> mst___: want a fdo bug? :)
[...]
[...]
16:38 < mst___> http://docs.python.org/2/library/functions.html#open
[...]
[...]
16:41 <@_rene_> mst___: hmm, I can ask him :)
[...]
17:19 < mst___> _rene_, i've just pushed a different version of the encoding fix, tested on python3 here

> --- /usr/lib/libreoffice/program/pythonscript.py~    2013-08-16
> 18:51:06.865451812 -0500
> +++ /usr/lib/libreoffice/program/pythonscript.py    2013-08-06
> 12:25:04.000000000 -0500
>  #-------------------------------------------------------------------
> @@ -70,7 +70,7 @@
>              userInstallation =  pathSubst.getSubstituteVariableValue( "user" )
>              if len( userInstallation ) > 0:
>                  systemPath = uno.fileUrlToSystemPath(
> userInstallation + "/Scripts/python/log.txt" )
> -                ret = open( systemPath , "a" )
> +                ret = file( systemPath , "a" )

So why is this needed?

> And another one  :
> 104c106
> +                     encfile(msg).decode() +
> -                     encfile(msg) +

That's the commit he mentioned, which is
http://cgit.freedesktop.org/libreoffice/core/commit/?id=5be1f5234b46a89a7660a9cfe3deaa00e2aa124b

Regards,

Rene


Reply to: