You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/01/11 22:29:07 UTC
[Bug 121612] New: Mail merge broken due to Python3 conversion
https://issues.apache.org/ooo/show_bug.cgi?id=121612
Bug ID: 121612
Issue Type: DEFECT
Summary: Mail merge broken due to Python3 conversion
Classification: Code
Product: framework
Version: AOO 3.4.1
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: P3
Component: scripting
Assignee: issues@openoffice.apache.org
Reporter: arielch@apache.org
CC: issues@openoffice.apache.org
revision 1423676 seems to have applied the "2to3 source-to-source conversion
tool, all print statements are automatically converted to print() function
calls, so this is mostly a non-issue for larger projects."
http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function
Converting statements as the following:
Old: print >>sys.stderr, "fatal error"
New: print("fatal error", file=sys.stderr)
print("fatal error", file=sys.stderr) is no valid Python 2 syntax, so this
broke mailmerge.py
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121612] Mail merge broken due to Python3 conversion
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121612
--- Comment #1 from SVN Robot <sv...@dev.null.org> ---
"arielch" committed SVN revision 1432668 into trunk:
i121612 - Fix broken python mail component
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121612] Mail merge broken due to Python3 conversion
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121612
Ariel Constenla-Haile <ar...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |FIXED
Assignee|issues@openoffice.apache.or |arielch@apache.org
|g |
Target Milestone|--- |AOO 4.0
--- Comment #2 from Ariel Constenla-Haile <ar...@apache.org> ---
Fixed by replacing
print( "$STRING", file=sys.stderr)
only valid in Python3, with
out = sys.stderr
out.write("$STRING\n")
that works both in Python2 and Python3.
I only checked the mail component, but other stuff might be broken to.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
[Bug 121612] Mail merge broken due to Python3 conversion
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121612
Pedro Giffuni <pf...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pfg@apache.org
--- Comment #3 from Pedro Giffuni <pf...@apache.org> ---
(In reply to comment #2)
> Fixed by replacing
>
> print( "$STRING", file=sys.stderr)
>
> only valid in Python3, with
>
> out = sys.stderr
> out.write("$STRING\n")
>
> that works both in Python2 and Python3.
>
> I only checked the mail component, but other stuff might be broken to.
Thank you for the fix!
I opengroked "sys.stderr" and it appears it was the only case where this
happened.
--
You are receiving this mail because:
You are on the CC list for the bug.