Apache OpenOffice (AOO) Bugzilla – Issue 71327
update to python 2.5
Last modified: 2011-04-11 08:03:13 UTC
changing parameters
cws python25
reassign to pj
Hi, I send the issue back to development (Liyuan), CWS python25 is not ready yet. (BTW, is Liutao still a member of this project?) Please review for general CWS process: http://wiki.services.openoffice.org/wiki/CWS ... and for QA CWS approval: http://wiki.services.openoffice.org/wiki/Approve_a_CWS and some of the links within these documents. Peter
yes,I am still a member of this project.
That cws will break building with system python because of http://go-oo.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=framework/scripting/source/pyprov&command=DIFF_FRAMESET&file=mailmerge.py&rev1=1.2&rev2=1.2.44.3&root=/var/cvsup scripting/source/pyprov/mailmerge.py: - from email.MIMEBase import MIMEBase + from email.mime.base import MIMEBase This changed import causes the packaging to fail: register component 'vnd.openoffice.pymodule:mailmerge' in registry '/Users/buildslave/compile/shadow/instsetoo_native/unxmacxp.pro/OpenOffice//services.rdb/en-US_inprogress_1/services.rdb' failed! error (RuntimeException): Couldn't load vnd.openoffice.pymodule:mailmerge for reason type email.mime.base.MIMEBase is unknown
from http://www.python.org/download/releases/2.5/NEWS.txt - email 4.0 package now integrated. This is largely the same as the email 3.0 package that was included in Python 2.3, except that PEP 8 module names are now used (e.g. mail.message instead of email.Message). The MIME classes have been moved to a subpackage (e.g. email.mime.text instead of email.MIMEText). The old names are still supported for now. Several deprecated Message methods have been removed and lots of bugs have been fixed. More details can be found in the email package documentation. "The old names are still supported for now" So please revert that import and add a "deprecated - since python 2.5 other package-name" style comment.
I have updated the file, scripting/source/pyprov/mailmerge.py: +#if defined(MAC) || defined(MACOSX) +from email.MIMEBase import MIMEBase +#else from email.mime.base import MIMEBase +#endif http://go-oo.org/bonsai/cvsview2.cgi? diff_mode=context&whitespace_mode=show&root=/var/cvsup&subdir=framework/scriptin g/source/pyprov&command=DIFF_FRAMESET&root=/var/cvsup&file=mailmerge.py&rev1=1.2 .44.4&rev2=1.2.44.5 Is it effective ?
it is not the simplest way as the problem is on python version and not the platform. some linux-distro-build use other python version we do not know perharps use the still supported but deprecated import declaration deprecation is made for this : backward compatibility
I did not check, but I'd be surprised if you could use c-style #if statements in python code.. But even if that statement would do what is intended, then this still would only work for Mac, not for linux or other platforms. Since python 2.5 still supports the old names, and the version that OOo will ship will not change every month, using the old name is much better solution. The new name should only be changed once: * OOo switches to an internal python that doesn't support the old names anymore or * All linux distributions (including stable debian, etc...) switched to python 2.5 for a long time. (this could take a while...) Besides that, ifdefing for a platform should really be avoided if its not really necessary (IMHO) So if there is no compelling reason to insist on the new name, please use the old name and add a deprecation hint. An alternative solution (but way to complicated for this one) is to check for the python version that is used for compiling OOo. But still I prefer to just use the old name until it won't work anymore for OOo.
:-( , Sorry , I treated the python file as a C file. #python2.5: from email.mime.base import MIMEBase from email.MIMEBase import MIMEBase
the current version works wor both system and internal python. Thanks.
Thank you very much, Cloph The CWS python25 has been built successfully on Mac OSX gcc-4.0.1(X11) and linux-gcc-4.0.2(sun-java). http://go-oo.org/tinderbox/python25/status.html
fixed just for test
sorry for test
Did this ever get integrated? Will it?
Will Python 2.5.2 be included at least in OOo 2.4.2 and 3.0? Please be aware that Python 2.6 and 3.0 will be finished in September.
Our OpenOffice.org 3.0 Vietnamese release will depend heavily upon an extension converting pre- Unicode to Unicode files in our language. This is a major takeup factor for us. It relies on Python. Please, what is the status of this issue?
I too am interested in seeing this go in. Can someone in the know please give us a status update?
the code have been resynced by me and the tag is DEV300_m30 but there are some issues(or conflics). eric.bachard told me he will help me to solve that issues. I think he is doing this now.
This issue is not listed in the 3.0 RC2 release notes: http://development.openoffice.org/releases/3.0.0rc2.html I hope it will be integrated before the next release candidate.
Is there any hope of seeing this in 3.0, or do we have to wait for 3.1? I have a project that needs Python > 2.3 on all platforms. How can we help?
OpenOffice.org 3.0.0 has been uploaded on Oct 6th and published yesterday (at least for en-US), the newest files it contains are from September. It still contains python23.dll (2.3.4150.1012) like OpenOffice.org 2.4.1. It seems 2 years are still not enough to update on time for the new major release. Let's hope the patch created 23 days ago will be reviewed in the next months...
Maybe python 2.6 better?
This problem is also discussed in issue 92413 Oliver
I don't want python in OOo. use some other scripting language.
To me this issue sounds somehow duplicate to issue 92413 *** This issue has been marked as a duplicate of issue 92413 ***